Linux上的Emacs / xterm颜色烦恼 [英] Emacs/xterm color annoyance on Linux

查看:209
本文介绍了Linux上的Emacs / xterm颜色烦恼的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的本地Linux机箱和远程集群的登录节点上的控制台窗口中使用emacs。我经常使用emacs,我的.emacs文件中的前景色设置为白色,如下所示:

 (设置-foreground-colorwhite)
(set-background-colorblack)

但是,当我运行emacs,前台不是白色的;它是灰色的,很难阅读。在我的Mac上,具有相同设置的控制台窗口中的emacs显示为正确的白色。但是在两个linux框上,在konsole和xterm中都是灰色的。



如果重要,我有 TERM 设置为xterm-color,桌面运行RHEL 5,集群节点正在运行RHEL 4(CentOS)。



这是一些默认的Linux设置终端颜色?



注意:这是使用控制台emacs,而不是X下的emacs。这是 emacs -nw 如果你有 DISPLAY set

解决方案

颜色 brightwhite 在我的Emacs(运行在终端,而不是X)下看起来很好。在RHEL5上,我将 TERM 环境变量设置为 xterm-256color 。如果它正常运行,您应该可以运行这些脚本,并查看256色输出。在Emacs下,当您执行 M-x list-colors-display 时,您应该会看到一个相当平滑的颜色斜坡(没有明显重复的颜色)。如果没有,你可能会错过正确的termcap条目(尝试安装 libtermcap-devel 包,我想)。



如果我将 TERM 更改为 xterm-color ,则 brightwhite list-colors-display 的输出中出现一点灰色。



我不确定关于RHEL4。


I'm using emacs in a console window both on my local Linux box and on the login node of a remote cluster. I use emacs regularly, and I've got the foreground color set to white in my .emacs file like so:

(set-foreground-color "white")
(set-background-color "black")

However, when I run emacs, the foreground isn't white; it's grey and very hard to read. On my Mac, emacs in a console window with the same settings shows up as proper white. But on both linux boxes, in konsole and xterm, it's grey.

In case it matters, I've got TERM set to xterm-color, the desktop is running RHEL 5, and the cluster node is running RHEL 4 (CentOS).

Is this some default with how Linux sets up terminal colors? How do I get white to be white?

Note: this is with console emacs, not emacs under X. That's emacs -nw if you have DISPLAY set.

解决方案

The color brightwhite looks ok on my Emacs (which is running under a terminal, not X). On RHEL5 I have my TERM environment variable set to xterm-256color. If it's working correctly, you should be able to run these scripts and see 256-color output. Under Emacs, you should see a reasonably smooth color ramp (no obviously duplicated colors) when you do M-x list-colors-display. If not, you are probably missing the right termcap entry (try installing the libtermcap-devel package, I think).

If I change TERM to xterm-color, then brightwhite comes out a bit gray in the output of list-colors-display.

I'm not sure about RHEL4.

这篇关于Linux上的Emacs / xterm颜色烦恼的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆