jFbterm 與 Fbterm

jFbterm

 

Linux 默認的 terminal 是無法顯示中文的, 如果以前在 terminal 碰上中文真是很頭痛的 ~

現在有 jFbterm 的幫助一切都迎刃而解, 而 Fbterm 則是它的強化版 (支援 UTF-8 字體顯示的終端)

比 zhcon 來得要好, 因為 zhcon 有以下兩缺點

* 只能在 640x480 解像下工作
* 時不時漏字

Fbterm 的主頁: http://code.google.com/p/fbterm/


所需:

  • FrameBuffer ( 系統要有 /dev/fb )
  • unifont(8MB) 套件, ( 它又依賴 xfonts-unifont ( 16MB !!! ), ttf-unifont )

安裝:

apt-get install jfbterm unifont

# 設定

  • /etc/jfbterm.conf
  • ~/.fbtermrc
# 配置字體
font_family=Courier New, simsun

# locale 相關設定
export LC_ALL="zh_CN.UTF-8"

 


# 在tty2中自動啟用Fbterm

if [[ -z "$DISPLAY" ]] && [[ $(tty) = /dev/vc/2 ]]; then
    exec Fbterm
fi

 


額外功能:

Fbterm 提供了兩種額外功能, 分別是 虛擬終端 及 翻頁

虛擬終端:

Ctrl + Alt + c 創建新的虛擬終端
Shift + Left 移動到上一個虛擬終端
Shift + Right 移動到下一個虛擬終端
Ctrl + Alt + n 移動到第 n 個虛擬終端

配合 gpm server 實現 copy/past

翻頁:

Shitf Page Up : 向上翻頁
Shitf Page Down : 向下翻頁

 


中文字

 

mkdir /usr/share/fonts/truetype

cd /usr/share/fonts/truetype

# 把細明體放入去

Create fonts.scale and fonts.dir

# mkfontscale && mkfontdir
# fc-cache

Add the new font directory to the X11 font path

# chkfontpath --add /usr/share/fonts/truetype

fc-list

Xfce Terminal

 

Creative Commons license icon Creative Commons license icon