在Linux上的Emacs / xterm颜色烦恼 [英] Emacs/xterm color annoyance on Linux
问题描述
我在控制台窗口中使用emacs在我的本地Linux框和远程集群的登录节点上。我定期使用emacs,我的前景颜色设置为白色在我的.emacs文件像这样:
- 地面颜色白色)
(set-background-colorblack)
但是,当我运行emacs,前台不是白色;它是灰色的,很难阅读。在我的Mac上,具有相同设置的控制台窗口中的emacs显示为正确的白色。
在这种情况下,我有 TERM
设置为xterm-color,桌面正在运行RHEL 5,集群节点正在运行RHEL 4(CentOS)。
up终端颜色?
注意:这是与控制台emacs,而不是在X下的emacs。 解决方案 颜色 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屋!