all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* emacs terminal colors
@ 2008-10-02 13:22 egor.shalashnikov
  2008-10-02 14:31 ` Egor
  2008-10-03  3:36 ` Tim X
  0 siblings, 2 replies; 5+ messages in thread
From: egor.shalashnikov @ 2008-10-02 13:22 UTC (permalink / raw)
  To: help-gnu-emacs

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)


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: emacs terminal colors
  2008-10-02 13:22 emacs terminal colors egor.shalashnikov
@ 2008-10-02 14:31 ` Egor
  2008-10-02 14:56   ` Peter Dyballa
       [not found]   ` <mailman.47.1222959387.25473.help-gnu-emacs@gnu.org>
  2008-10-03  3:36 ` Tim X
  1 sibling, 2 replies; 5+ messages in thread
From: Egor @ 2008-10-02 14:31 UTC (permalink / raw)
  To: help-gnu-emacs

On 2 окт, 17:22, egor.shalashni...@gmail.com wrote:
> 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've found than xterm-color is not exists on Solaris 10..


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: emacs terminal colors
  2008-10-02 14:31 ` Egor
@ 2008-10-02 14:56   ` Peter Dyballa
       [not found]   ` <mailman.47.1222959387.25473.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 5+ messages in thread
From: Peter Dyballa @ 2008-10-02 14:56 UTC (permalink / raw)
  To: Egor; +Cc: help-gnu-emacs


Am 02.10.2008 um 16:31 schrieb Egor:

> I've found than xterm-color is not exists on Solaris 10..


It's possible to extract the xterm-color description from a termcap  
file (GNU Emacs' etc/termcap.src) and save it on the remote Solaris  
host. Then add there an environment variable TERMPATH which names  
this file. Could be Solaris 10 does not offer this ...

Another option is to use dterm (CDE terminal). It is quite ANSI  
compliant.

--
Greetings

   Pete

Bake pizza not war!







^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: emacs terminal colors
       [not found]   ` <mailman.47.1222959387.25473.help-gnu-emacs@gnu.org>
@ 2008-10-02 16:03     ` Egor
  0 siblings, 0 replies; 5+ messages in thread
From: Egor @ 2008-10-02 16:03 UTC (permalink / raw)
  To: help-gnu-emacs

On 2 окт, 18:56, Peter Dyballa <Peter_Dyba...@Web.DE> wrote:
> Am 02.10.2008 um 16:31 schrieb Egor:
>
> > I've found than xterm-color is not exists on Solaris 10..
>
> It's possible to extract the xterm-color description from a termcap
> file (GNU Emacs' etc/termcap.src) and save it on the remote Solaris
> host. Then add there an environment variable TERMPATH which names
> this file. Could be Solaris 10 does not offer this ...
>
> Another option is to use dterm (CDE terminal). It is quite ANSI
> compliant.
>
> --
> Greetings
>
>    Pete
>
> Bake pizza not war!

Already done!
Thanks, that is the solution. Take a file 'xterm-color' from (i take
from my debian desktop) an external source, place it into appropriate
dir (see man terminfo to find it), and use not TERM=xterm as usual but
TERM=xterm-color.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: emacs terminal colors
  2008-10-02 13:22 emacs terminal colors egor.shalashnikov
  2008-10-02 14:31 ` Egor
@ 2008-10-03  3:36 ` Tim X
  1 sibling, 0 replies; 5+ messages in thread
From: Tim X @ 2008-10-03  3:36 UTC (permalink / raw)
  To: help-gnu-emacs

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


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2008-10-03  3:36 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-02 13:22 emacs terminal colors egor.shalashnikov
2008-10-02 14:31 ` Egor
2008-10-02 14:56   ` Peter Dyballa
     [not found]   ` <mailman.47.1222959387.25473.help-gnu-emacs@gnu.org>
2008-10-02 16:03     ` Egor
2008-10-03  3:36 ` Tim X

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.