Linux中安裝使用RXVT命令列終端視窗程序的教程

來源:互聯網
上載者:User

rxvt 是一個功能強大的的終端,它佔用資源少,啟動速度快,很多人都喜歡使用它。所以我在這裡介紹一下Debian系統中rxvt中文終端的安裝。在 Debian中有很多個rxvt包,可用apt-cache search rxvt命令查詢。主要有以下三類,一個就叫rxvt,不支援中文顯示;一個叫rxvt-ml,支援GB和BIG5中文編碼;還有一個叫rxvt- unicode,支援unicode編碼。第一種不支援中文,這裡就不討論了。下面分別討論rxvt-ml和rxvt-unicode兩種rxvt終端的安裝。

在使用rxvt中文終端前,需先把GNOME或KDE案頭的中文環境配置好。這樣才能在rxvt中正常顯示中文和使用中文IME(我用fcitx)。

安裝rxvt-ml

這裡我們以debian系的Linux為例:

代碼如下:

apt-get install rxvt-ml

安裝完成後,在/usr/bin目錄下會產生幾個rxvt程式,分別是crxvt crxvt-big5 crxvt-gb grxvt krxvt 和一個指向/etc/alternatives/rxvt的連結檔案rxvt。這六個程式分別對應不同的語言編碼環境,crxvt-gb用於中文GB編碼環境;crxvt-big5用於大五碼編碼環境;krxvt用於日文環境,我測試過,krxvt也可用於中文環境;grxvt用於greek鍵盤環境; crxvt也是用於大五碼環境;rxvt連結預設指向krxvt。

對於我們來說,只需使用crxvt-gb這個程式就可以了。為了能正常顯示中文,我們需把locale環境配置成zh_CN.GB2312。具體配置方式可參見GNOME和KDE案頭環境中的locale配置。重啟X會話使 locale生效,這樣就可用crxvt-gb使用rxvt中文終端了。

個人的設定檔配置樣本:

代碼如下:

!!$HOME/.Xdefaults

Rxvt.preeditType: root</p> <p>!!視窗大小及標題

Rxvt.geometry: 80x25

Rxvt.title: hutaow-rxvt</p> <p>!!IME設定

Rxvt.inputMethod: fcitx</p> <p>!!透明度設定

!Rxvt.transparent: true

!Rxvt.shading: 110

!Rxvt.tintColor: grey

!Rxvt.inheritPixmap: false</p> <p>!!擴充設定

Rxvt.perl-ext-common: default, matcher, fullscreen</p> <p>!!URL操作

Rxvt.urlLauncher: /usr/bin/chromium

Rxvt.matcher.button: 1</p> <p>!!標籤設定

!Rxvt.per-ext-common: ..., tabbed, ...

!Rxvt.tabbed.tabbar-fg: 2

!Rxvt.tabbed.tabbar-bg: 0

!Rxvt.tabbed.tab-fg: 3

!Rxvt.tabbed.tab-bg: 0

!Rxvt.tabbed.new-button: false

!Rxvt.tabbed.autohide: true

!RXvt.tabbed.reopen-on-close: no

!Rxvt.keysym.Control-t: perl:tabbedex:new_tab

!Rxvt.keysym.Control-Tab: perl:tabbedex:next_tab

!Rxvt.keysym.Control-Shift-Tab: perl:tabbedex:prev_tab

!Rxvt.keysym.Control-Shift-Left: perl:tabbex:move_tab_left

!Rxvt.keysym.Control-Shift-Right: perl:tabbex:move_tab_right

!Rxvt.keysym.Control-Shift-R: perl:tabbex:rename_tab</p> <p>!!全螢幕模式

!Rxvt.perl-ext-common: ..., fullscreen, ...

Rxvt.keysym.F11: perl:fullscreen:switch</p> <p>!!捲軸設定

Rxvt.scrollBar: true

Rxvt.scrollBar_right: true

Rxvt.scrollBar_floating: false

Rxvt.scrollstyle: plain</p> <p>!!滾屏設定

Rxvt.mouseWheelScrollPage: false

Rxvt.scrollTtyOutput: false

Rxvt.scrollWithBuffer: true

Rxvt.scrollTtyKeypress: true</p> <p>!!游標閃爍

Rxvt.cursorBlink: true</p> <p>!!緩衝行數

Rxvt.saveLines: 5000</p> <p>!!邊框設定

Rxvt.borderLess: false</p> <p>!!字型設定

Rxvt.dpi: 96

Rxvt.*font: xft:Terminus,xft:WenQuanYi Bitmap Song</p> <p>!!顏色設定

Rxvt.depth: 32

Rxvt.background: #2C2C2C

Rxvt.foreground: 7

Rxvt.colorBD: 7

Rxvt.colorUL: 7</p> <p>!!基本顏色

!Black

Rxvt.color0: #3F3F3F

Rxvt.color8: #709080

!red

Rxvt.color1: #705050

Rxvt.color9: #DCA3A3

!Green

Rxvt.color2: #60B48A

Rxvt.color10: #72D5A3

!Yellow

Rxvt.color3: #DFAF8F

Rxvt.color11: #F0DFAF

!Blue

Rxvt.color4: #9AB8D7

Rxvt.color12: #94BFF3

!Magenta

Rxvt.color5: #DC8CC3

Rxvt.color13: #EC93D3

!Cyan

Rxvt.color6: #8CD0D3

Rxvt.color14: #93E0E3

!White

Rxvt.color7: #DCDCDC

Rxvt.color15: #FFFFFF

配置後的終端運行效果如下圖:

  

 

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.