Like us on Facebook?

Linux VNC 虛擬桌面

  • 在已裝有圖形介面的環境下建立 VNC 虛擬桌面
  • 在純文字環境下建立 VNC 虛擬桌面
環境: Fedora 13

在已裝有圖形介面 (GNOME) 的環境下建立 VNC 虛擬桌面
安裝 VNC Server
sudo yum install tigervnc-server
安裝 LXDE 桌面環境
sudo yum install @lxde-desktop
mkdir ~/.vnc
vi ~/.vnc/xstartup

#!/bin/sh
lxsession
chmod +x ~/.vnc/xstartup
vncserver :3

You will require a password to access your desktops.
Password: 設定 vnc 連線密碼
Verify: 確認 vnc 連線密碼
netstat -ntul | grep 5903
tcp 0 0.0.0.0:5903 0.0.0.0:* LISTEN
測試
使用 VNC Viewer 連入本機 LXDE 桌面環境
vncviewer localhost:3
停止虛擬桌面
vncserver -kill :3
在純文字環境下建立 VNC 虛擬桌面
安裝 VNC Server
sudo yum install tigervnc-server perl xorg-x11-xkb-utils
安裝 LXDE 桌面環境
sudo yum install @lxde-desktop fedora-icon-theme
安裝必要字型
sudo yum install wqy-zenhei-fonts dejavu-sans-mono-fonts
安裝瀏覽器與中文輸入法
sudo yum install epiphany gcin
vi ~/.bash_profile

export GTK_IM_MODULE=gcin
export QT_IM_MODULE=gcin
啟動 VNC 虛擬桌面
mkdir ~/.vnc
vi ~/.vnc/xstartup

#!/bin/sh
lxsession

chmod +x ~/.vnc/xstartup
vncserver :3
解決 failed to read machine uuid 問題
錯誤訊息:
process xxxx: D-Bus library appears to be incorrectly set up; failed to read machine uuid: Failed to open "/var/lib/dbus/machine-id": No such file or directory
See the manual page for dbus-uuidgen to correct this issue.
D-Bus not built with -rdynamic so unable to print a backtrace
Aborted
解決方法:
sudo dbus-uuidgen --ensure
vncserver 常用參數
  • -kill :3 終止 :3 虛擬桌面
  • -localhost 只允許本機連線
  • -geometry 1024x768 桌面大小
  • -depth 16 色彩濃度
-
參考資料: Remotely Accessible Virtual Desktops
-
本站相關文章:

0 意見