Color themes are strange/incorrect in terminal emulator

对着背影说爱祢 提交于 2019-12-22 06:28:36

问题


I'm running emacs-nox 23.3 in Konsole (from kde) emulator, the most color themes have strange colors.

For example, i like the Solarized Theme. I expect the theme should look like this:


(source: ethanschoonover.com)

However, this is what I get:

Broken Solarized Theme http://img824.imageshack.us/img824/3881/voronoi2.png

Most of themes that comes in emacs-color-theme package have similar behavior. I tried to change the Konsole color settings - no result. I also tried to replace my .Xresources with this one, with no success.


回答1:


You need 256 colors in your terminal for most color themes to have decent appearance. Try adding this to your .bashrc (or .zshrc):

TERM=xterm-256color

After you've sourced the setting (source .bashrc), start again emacs and hopefully the themes will be looking much better.




回答2:


No, do not put this line

TERM=xterm-256color

to .Xresources. Try to run emacs with this command:

TERM=xterm-256color emacs

and if everything is ok, put this line to your .bashrc or .bash_profile file:

alias emacs='TERM=xterm-256color emacs'

After that your can execute emacs with usual 'emacs' cmd and get the normal colors in editor.



来源:https://stackoverflow.com/questions/7865768/color-themes-are-strange-incorrect-in-terminal-emulator

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!