Xterm的中文字体设置

直接上代码:

(~/.Xdefault)
!look and feel
XTerm*preeditType: Root
xterm.termName: xterm-256color
xterm.geometry: 80x36
xterm*scrollBar: true
xterm*rightScrollBar: true
xterm*loginshell: true
xterm*cursorBlink: true
xterm*background:  black
xterm*foreground:  gray
xterm.borderLess: true
xterm.cursorBlink: true
xterm*colorUL: yellow
xterm*colorBD: white

!fix alt key input
xterm*eightBitInput: false
xterm*altSendsEscape: true
!print color and bold/underline attributes
xterm*printAttributes: 2
xterm*printerCommand: cat > ~/xtermdump

!mouse selecting to copy, ctrl-v to paste
!Ctrl p to print screen content to file
XTerm*VT100.Translations: #override /
    Ctrl <KeyPress> V: insert-selection(CLIPBOARD,PRIMARY,CUT_BUFFER0) /n/
    <BtnUp>: select-end(CLIPBOARD,PRIMARY,CUT_BUFFER0) /n/
    Ctrl <KeyPress> P: print() /n

!其中的关键就是红色字体部分,指明了中文字体名(可以使用fc-list来查询字体名称)
xterm*locale: true
xterm.utf8:     true
xterm*utf8Title: true
xterm*fontMenu*fontdefault*Label: Default
xterm*faceName: YaHei Consolas Hybrid:pixelsize=14
xterm*faceNameDoublesize:YaHei Consolas Hybrid:pixelsize=14

xterm*xftAntialias: true
xterm.cjkWidth:true

!-- Tango color scheme
*xterm*color0: #2e3436
*xterm*color1: #cc0000
*xterm*color2: #4e9a06
*xterm*color3: #c4a000
*xterm*color4: #3465a4
*xterm*color5: #75507b
*xterm*color6: #0b939b
*xterm*color7: #d3d7cf
*xterm*color8: #555753
*xterm*color9: #ef2929
*xterm*color10: #8ae234
*xterm*color11: #fce94f
*xterm*color12: #729fcf
*xterm*color13: #ad7fa8
*xterm*color14: #00f5e9
*xterm*color15: #eeeeec

而后,需要在~/.xinitrc添加exec xrdb ~/.Xdefaults
over

btw,若是想Xtrem以“[root@myhost]的形式显示,可以在执行Xtrem加参数-ls 类似这样 Xterm -ls

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值