help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: emacs terminal colors


From: Tim X
Subject: Re: emacs terminal colors
Date: Fri, 03 Oct 2008 13:36:32 +1000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)

egor.shalashnikov@gmail.com writes:

> Hi!,
> I have a problem with emacs colors in terminal, spent all day on it.
> I'm connecting to a remote shell 1 (rhel):
> 'ssh <rhel>'
> And connecting from my computer to a remote shell 2 (solaris)
> 'ssh <sol>'
>
> The settings are nearly the same, but emacs on <rhel> displays many
> colors by default, and on <sol> by default are only 2 colors.
> How do enable --color=auto emacs switch by using only evn settings?
> (If I use emacs --color on <sol> emacs starts with many colors).
>
> Note: It's not a problem always use --color for emacs, but:
> I play with parameters in some functions into .emacs, so --color is
> the additional parameter and it breaks up logic into function when I
> use emacs as a diff utility (emacs -diff file1 file2: works, but emacs
> --color -diff file1 file 2: doesn't)
>
> env:
> TERM=xterm
> COLORTERM=gnome-terminal (mc works fine with color after I've added
> this env setting)
>
> .emacs:
> (global-font-lock-mode 1)


I suspect the problem is with the terminfo/termcap setting on the
solaris box. If I udnerstand you correctly, you get good colors on the
solaris box if you run emacs directly in a terminal on that box, but if
you ssh into that box, you only get limited colors? 

Check to see if you get the same TERM setting in both cases. I suspect
that solaris either isn't recognising the TERM setting that is
initialised when you connect via ssh and is either defaulting to a
related TERM entry that only supports limited colors or something
similar. I remember exactly this type of problem when color consoles
were first introduced into Linux. If you ssh to a remote system that
wasn't a Linux box, you wouldn't get any colors. This was because at
that time, the terminal setting was linux-color console-color and remote
non-linux systems were not able to recognise the terminal type, so they
would default to something without any colors or with more limited
capabilities. 

The solution was to add the terminfo entry from the linux box to the
remote terminfo database or set the TERM variable to something that the
remote system recognises and which provides full color support. 

HTH

Tim


-- 
tcross (at) rapttech dot com dot au


reply via email to

[Prev in Thread] Current Thread [Next in Thread]