Skip to main content
Apr 13, 2018 5:16 PM UTC

No colors running over ssh in Cygwin

As the title says, I don’t see colors in the ssh screen. I use Cygwin’s ssh to connect to USS. I’m clueless about TERM/TERMINFO/TERMCAP/etc. I read the thread here, but it rambles a bit and I can’t extract a solution from it. Are there any smart people out there who can help?

Edit: I am in fact not seeing colors in Git, either. I have color.ui=auto and color.branch.current=red, but git branch -v gives me:

    9 replies

    Tatiana Balaburkina
    Rocketeer
    Apr 16, 2018 4:29 AM UTC

    As the title says, I don’t see colors in the ssh screen. I use Cygwin’s ssh to connect to USS. I’m clueless about TERM/TERMINFO/TERMCAP/etc. I read the thread here, but it rambles a bit and I can’t extract a solution from it. Are there any smart people out there who can help?

    Edit: I am in fact not seeing colors in Git, either. I have color.ui=auto and color.branch.current=red, but git branch -v gives me:

    Hi Tony,
    Can you provide the output of the command “infocmp” on your Linux machine?

    Apr 16, 2018 9:16 AM UTC

    As the title says, I don’t see colors in the ssh screen. I use Cygwin’s ssh to connect to USS. I’m clueless about TERM/TERMINFO/TERMCAP/etc. I read the thread here, but it rambles a bit and I can’t extract a solution from it. Are there any smart people out there who can help?

    Edit: I am in fact not seeing colors in Git, either. I have color.ui=auto and color.branch.current=red, but git branch -v gives me:

    Hi, Tatyana. I don’t use Linux to connect at work; I use SSH over Cygwin. Here’s the output from the infocmp command there:

    09:09 /proj/rdl/git/work (s) > infocmp
    Error: Term "xterm-256color" not found in /usr/share/lib/terminfo
    ,
            bitwin#0, bitype#0, btns#0, bufsz#0, colors#0,
            cols#0, cps#0, it#0, lh#0, lines#0, lm#0, lw#0, ma#0,
            maddr#0, mcs#0, mjump#0, mls#0, ncv#0, nlab#0,
            npins#0, orc#0, orhi#0, orl#0, orvi#0, pairs#0, pb#0,
            spinh#0, spinv#0, vt#0, widcs#0, wnum#0, wsl#0,
            xmc#0,
    

    Which looks promising. I don’t know what it means, but it looks promising.

    Apr 16, 2018 12:23 PM UTC

    Hi, Tatyana. I don’t use Linux to connect at work; I use SSH over Cygwin. Here’s the output from the infocmp command there:

    09:09 /proj/rdl/git/work (s) > infocmp
    Error: Term "xterm-256color" not found in /usr/share/lib/terminfo
    ,
            bitwin#0, bitype#0, btns#0, bufsz#0, colors#0,
            cols#0, cps#0, it#0, lh#0, lines#0, lm#0, lw#0, ma#0,
            maddr#0, mcs#0, mjump#0, mls#0, ncv#0, nlab#0,
            npins#0, orc#0, orhi#0, orl#0, orvi#0, pairs#0, pb#0,
            spinh#0, spinv#0, vt#0, widcs#0, wnum#0, wsl#0,
            xmc#0,
    

    Which looks promising. I don’t know what it means, but it looks promising.

    You can download ftp://ftp.invisible-island.net/ncurses/terminfo.src.gz file and install this database our local machine
    using the following commands in Cygwin:

    wget --ftp-user=anonymous ftp://ftp.invisible-island.net/ncurses/terminfo.src.gz
    gzip -d terminfo.src.gz
    export TERMINFO= < your directory >
    export TERM=xterm-256color
    tic terminfo.src
    infocmp > xterm-256color.tic

    download xterm256-color.tic file on z/OS
    using the following commands on z/OS

    export TERMINFO= < your directory >
    export TERM=xterm-256color
    tic xterm-256color.tic

    Apr 16, 2018 1:09 PM UTC

    As the title says, I don’t see colors in the ssh screen. I use Cygwin’s ssh to connect to USS. I’m clueless about TERM/TERMINFO/TERMCAP/etc. I read the thread here, but it rambles a bit and I can’t extract a solution from it. Are there any smart people out there who can help?

    Edit: I am in fact not seeing colors in Git, either. I have color.ui=auto and color.branch.current=red, but git branch -v gives me:

    Thanks, Yaroslav. Would the tic command affect only my environment? I don’t want to install a database on our local machine if it would overwrite an existing database.

    Apr 16, 2018 3:10 PM UTC

    As the title says, I don’t see colors in the ssh screen. I use Cygwin’s ssh to connect to USS. I’m clueless about TERM/TERMINFO/TERMCAP/etc. I read the thread here, but it rambles a bit and I can’t extract a solution from it. Are there any smart people out there who can help?

    Edit: I am in fact not seeing colors in Git, either. I have color.ui=auto and color.branch.current=red, but git branch -v gives me:

    Hi, Yaroslav. I’m a bit confused - you said “install this database”, then “you can not install a new database”. Do you mean that it’s safe for me to do the gzip and tic commands?

    Apr 16, 2018 4:00 PM UTC

    Hi, Yaroslav. I’m a bit confused - you said “install this database”, then “you can not install a new database”. Do you mean that it’s safe for me to do the gzip and tic commands?

    I’m a relative newbie to terminfo/ncurses/etc, but the man page indicates that tic will read the terminfo.src file and produce a new terminfo database in the directory pointed to by the TERMINFO environment variable.

    This worked for me:

    export TERMINFO=$HOME/terminfo  # This will be your personal terminfo database
    mkdir $TERMINFO
    curl ftp://ftp.invisible-island.net/ncurses/terminfo.src.gz | gzip -d >terminfo.src
    tic terminfo.src
    Apr 16, 2018 4:50 PM UTC

    I’m a relative newbie to terminfo/ncurses/etc, but the man page indicates that tic will read the terminfo.src file and produce a new terminfo database in the directory pointed to by the TERMINFO environment variable.

    This worked for me:

    export TERMINFO=$HOME/terminfo  # This will be your personal terminfo database
    mkdir $TERMINFO
    curl ftp://ftp.invisible-island.net/ncurses/terminfo.src.gz | gzip -d >terminfo.src
    tic terminfo.src

    Thanks, Jerry, but the universe has decreed that I’m not to have colors today:

    16:45 /u/tstjv > gzip -d terminfo.src.gz
    gzip: terminfo.src.gz: not in gzip format
    

    This happens when I pipe the curl output into gzip as well.

    Edit: Maybe I’m just cranky, but it feels as if this stuff should be available to everyone without having to go to an external website. In fact …

    16:53 /u/tstjv > ls /usr/lib/share/terminfo
    ls: FSUM6785 File or directory "/usr/lib/share/terminfo" is not found
    

    … despite the fact that the z/OS UNIX System Services Planning manual says that “[t]he database is in the directory /usr/share/lib/terminfo …”

    Apr 17, 2018 10:24 AM UTC

    As the title says, I don’t see colors in the ssh screen. I use Cygwin’s ssh to connect to USS. I’m clueless about TERM/TERMINFO/TERMCAP/etc. I read the thread here, but it rambles a bit and I can’t extract a solution from it. Are there any smart people out there who can help?

    Edit: I am in fact not seeing colors in Git, either. I have color.ui=auto and color.branch.current=red, but git branch -v gives me:

    Okay! Part of Yaroslav’s edited suggestion worked for me. So as not to be a DenverCoder9, I’ll recap the solution:

    Cygwin:

    wget --ftp-user=anonymous ftp://ftp.invisible-island.net/ncurses/terminfo.src.gz
    gzip -d terminfo.src.gz
    ftp <zos-machine>
    binary
    cd <home-directory>
    put terminfo.src
    

    z/OS:

    cd ~
    chtag -tc ISO8859-1 terminfo.src
    mkdir ~/.terminfo
    export TERMINFO="${HOME}/.terminfo"
    export TERM=xterm-256color
    tic terminfo.src
    

    Twelve commands, including two file transfers. It’s just that easy!

    Oh, and the export commands have to go into your .profile, too.

    Edit: This is pretty much what Jerry said, too; just expanded a little. Thanks, Jerry.

    Apr 17, 2018 11:47 AM UTC

    As the title says, I don’t see colors in the ssh screen. I use Cygwin’s ssh to connect to USS. I’m clueless about TERM/TERMINFO/TERMCAP/etc. I read the thread here, but it rambles a bit and I can’t extract a solution from it. Are there any smart people out there who can help?

    Edit: I am in fact not seeing colors in Git, either. I have color.ui=auto and color.branch.current=red, but git branch -v gives me:

    One more thing - following is part of a screenshot of vim on USS (Cygwin connection via SSH), editing the vim colors file. Because I like self-reference.