by nestlin (nestlin.bbs@nestlin.Dorm13.NCTU.edu.tw)
Q: 請教一下,在 w2k 中執行 vnc 去抓 bsd 的 xwin 3.3.6 版, 是可以抓進來,但沒有中文,但如果在 bsd 上頭使用 startx 跑 xwin 時中文確是正常的,請問要如何解決 vnc 中 中文的問題。
A: 如果是 GNOME2 的軟體,中文不會有問題, 但是如果是傳統 XLFD 吃字的話,可以參考以下的安裝過程:
安裝 net/vnc。
接著修改 /usr/X11R6/bin/vncserver:
--- vncserver.orig Fri Jan 4 15:45:23 2002 +++ vncserver Fri Jan 4 16:07:47 2002 @@ -149,6 +149,7 @@ # Add font path and color database stuff here, e.g.: # +$cmd .= " -fp /usr/X11R6/lib/X11/fonts/misc/,/usr/X11R6/lib/X11/fonts/100dpi/,/usr/X11R6/lib/X11/fonts/local/"; # $cmd .= " -fp /usr/lib/X11/fonts/misc/,/usr/lib/X11/fonts/75dpi/"; # $cmd .= " -co /usr/lib/X11/rgb"; #
接著就可以啟動囉。
# vncserver :1 (啟動) You will require a password to access your desktops. Password: passwd Verify: passwd xauth: creating new authority file /root/.Xauthority New 'X' desktop is statue2.elife.idv.tw:1 Creating default startup script /root/.vnc/xstartup Starting applications specified in /root/.vnc/xstartup Log file is /root/.vnc/statue2.elife.idv.tw:1.log # vncpasswd (換密碼) Password: passwd Verify: passwd # ps -aux |grep Xvnc (檢查狀態) root 7103 0.9 0.7 5652 5288 p1 I 3:36下午 0:42.89 Xvnc :1 -desktop # vncserver -kill :1 (終止)
vncviewer 則是以 statue2.elife.idv.tw:1 來連線。
如果不想修改 vncserver 或是想以其他的 window Manager 來啟動, 那麼就要修改 ~/.vnc/xstartup:
xset +fp /usr/X11R6/lib/X11/fonts/misc/ xset +fp /usr/X11R6/lib/X11/fonts/100dpi/ xset +fp /usr/X11R6/lib/X11/fonts/local/ xcin2.5 & icewm
由於 vnc 是由 XFree86-3 改的,所以現在還不知道該怎麼使用 TTF。
VNC 是一個很好用的 Remote Desktop Controller,但其 X version 是改自 XFree86 3.3.2,所以沒有支援 TrueType 字型。
TridiaVNC 是由 Tridia 公司發展,延續 vnc 的開發,為 vnc 加上許多功能, 如提供更多的壓縮方式,及加入對 xtt 的 TrueType 字型支援。(XFree86-4 內含 xtt module,故 TridiaVNC 可以直接使用 XFree86-4 的 TrueType 字型)
安裝 net/tridiavnc。
若系統中已經有 xtt 字型目錄,請於 ~/.vnc/xstart 內加入:
xset +fp /usr/X11R6/lib/X11/fonts/TrueType
若無,請安裝 ports 裡的 TrueType 字型。
VNC 裡面怎麼打中文?只要Ctrl+Space不要被 Windows 吃了就好了, 或是改變 VNC 內的 xin2.5 切換中文的熱鍵也可以。
RealVNC WWW: http://www.realvnc.com
tridiaVNC WWW: http://www.tridiavnc.com
tightVNC WWW: http://www.tightvnc.com