Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support 256 colors #3

Closed
andersk opened this issue Oct 13, 2011 · 8 comments
Closed

Support 256 colors #3

andersk opened this issue Oct 13, 2011 · 8 comments

Comments

@andersk
Copy link
Member

andersk commented Oct 13, 2011

Because 256 colors ought to be enough for anybody.

@ternus
Copy link

ternus commented Mar 15, 2012

This is what keeps me from using mosh for barnowl, so I'd be interested in a fix.

@keithw
Copy link
Member

keithw commented Mar 15, 2012

Hmm, why does it keep you from using barnowl? Do you really want the 256 colors, or is something broken?

@keithw
Copy link
Member

keithw commented Mar 15, 2012

(Some people seem to have added a line to their .screenrc that tells screen to modify the "xterm" terminfo entry to make it support 256color mode. The line looks like "termcapinfo xterm 'Co#256[...]".

The byobu people sometimes mistakenly recommend this, but it's terribly misguided -- "xterm" only supports the ANSI 8 colors, and this is what mosh advertises. If you want 256color mode, it's fine to use "xterm-256color", but please don't modify the xterm entry, as it will give lousy results on terminals that implement it. I wonder if this is the problem you're having...?)

@ternus
Copy link

ternus commented Mar 15, 2012

I had a line like that in my .screenrc (barnowl-256color doesn't seem to display all 256 colors without it). Removing it reverted to the 8 ANSI colors.

I use 50-60 colors at a time in my barnowl and have gotten used to the differentiation this provides.

@andersk
Copy link
Member Author

andersk commented Mar 16, 2012

Instead of putting that in your ~/.screenrc, use this ~/.bashrc snippet to set your TERM to xterm-256color. Then you’ll get 256 colors in ssh+screen+barnowl and a decent fallback to the nearest 16 colors in mosh+screen+barnowl.

I agree, though, that I’d use mosh more if it actually supported 256 colors.

@keithw
Copy link
Member

keithw commented Mar 16, 2012

I pushed tentative support for 256 colors to the 256color branch. (It assumes a 256-color local terminal.)

Could you please test and let me know if it works for your applications?

I put the server on linerva and you can get it with --server='athrun mosh_project mosh-server-256-beta'

@ternus
Copy link

ternus commented Mar 16, 2012

Works for me. Thanks!

@ericboehs
Copy link

Edit: DOH! I was setting the $TERM on the server but not my local machine. I found my problem using mosh-client -c. Working great now!

Still having problems getting this to work. I tried compiling the server from github and installing the latest client for mac (via the pkg).

I have my $TERM set to xterm-256color (I also tried screen-256color and screen-256color-bce). When running a colortest I'm only seeing 16 colors. If I connect directly via ssh I see the full 256 colors in the colortest.

I've dug around and the only place I can find mention of 256 color support is in some commit messages from a month ago. Any suggestions?

Thanks!

cgull added a commit to cgull/mosh that referenced this issue Oct 5, 2015
cgull added a commit to cgull/mosh that referenced this issue Mar 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants