linux设置终端颜色256,如何设置我的Linux X终端以便Emacs可以访问256种颜色?

news/2024/7/5 11:23:01

根据

this,除了将TERM设置为xterm-256color之外,还需要ncurses-term库.

好的,this还有其他一些尝试:

The xterm in Ubuntu Edgy does not advertise 256 color support by

default. To fix this you need to install a 256 color terminfo entry,and tell xterm to use it:

apt-get install ncurses-term

echo XTerm.termName: xterm-256color \

>>~/.Xdefaults

xrdb -merge ~/.Xdefaults

并且:

So you need a file term/screen-256color.el in your load-path. Emacs

22 expects it to contain a terminal-init-screen defun. Emacs 21

expects it to contain a bunch of top-level forms. Here's what I use:

;;; This is for GNU Emacs 22

(defun terminal-init-screen ()

"Terminal initialization function for screen."

;; Use the xterm color initialization code.

(load "term/xterm")

(xterm-register-default-colors)

(tty-set-up-initial-frame-faces))

;;; This is for GNU Emacs 21

(if (= 21 emacs-major-version)

(load "term/xterm-256color"))

For Emacs 21,you also need to install the xterm-256color.el file from

http://www.splode.com/~friedman/software/emacs-lisp/src/term/xterm-256color.el


http://lihuaxi.xjx100.cn/news/242398.html

相关文章

Linux下使用mv重命名文件或者移动文件(增强版的工具为rename)

mv命令既可以重命名,又可以移动文件或文件夹。 例子:将目录A重命名为B mv A B 例子:将/a目录移动到/b下,并重命名为c mv /a /b/c 例子:将文件A.txt重命名为B.txt mv A.txt B.txt 例子:将文件A.txt移动到B目…

CSP 2019-09-1 小明种苹果 Python实现+详解

试题 代码 # N,M分别表示树的棵树和疏果轮数 N,M [int(i) for i in input().split()]leftTrees 0#最后所有树树上的苹果总数 reduceMaxIndex 0#疏果个数最多的苹果编号 reduceMaxSum 0#上面那棵树的个数reduceMaxSum 0 reduceMaxIndex 0 leftTrees 0 for i in range(N)…

UI设计培训分享:UI设计师的设计思路

想要成为一名合格的UI设计师,那么设计思路是非常重要的,今天小编为大家带来的UI设计培训课程就是关于“UI设计师的设计思路“,不管你是已经从事UI行业了还是刚刚准备从事UI行业,都离不开三点“看、想、做”。今天的这篇文章&#…

linux 查看域名解析,linux查询服务器域名解析记录

弹性云服务器 ECS弹性云服务器(Elastic Cloud Server)是一种可随时自助获取、可弹性伸缩的云服务器,帮助用户打造可靠、安全、灵活、高效的应用环境,确保服务持久稳定运行,提升运维效率三年低至5折,多种配置可选了解详情什么是弹性…

EmEditor Professional(文本编辑) 下载地址

http://www.greenxf.com/soft/2126.html 16.1.5 http://www.cr173.com/soft/3031.html 16.3.0 http://www.pc6.com/softview/SoftView_43146.html 17.8.1 绿色注册版 EmEditor 71 个实用插件汉化版 http://www.onlinedown.net/soft/35609.htm

AC日记——传染病控制 洛谷 P1041

传染病控制 思路: 题目想问的是: 有一棵树; 对于除1外每个深度可以剪掉一棵子树; 问最后剩下多少节点; 题目意思一简单,这个题立马就变水了; 搜索就能ac; 数据有为链的情况&#xff…

UI设计培训分享:学习UI设计有哪些技巧

互联网时代的快速发展,UI设计这个行业在互联网有着一席之地,越来越多的人都想要参加UI设计培训班学习,那么对于初学者来说,学习UI设计有哪些技巧呢?来看看下面的详细介绍吧。 学习UI设计有哪些技巧? 1、基础软件操作 UI设计培训…

CSP 201909-2 小明种苹果(续)Python实现+详解

试题 代码 # N表示苹果树的棵树 N int(input()) T, D, E 0, 0, 0 # 所有树剩果总数 # 发生苹果掉落的苹果树总数 # 相邻三棵树发生苹果掉落的组数 treeMatrix [] # 存放所有数的数果疏果信息 for i in range(N):treeRow list(map(int, input().split()))treeRow treeRow…