歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> 關於Linux >> Ubuntu下VNC配置

Ubuntu下VNC配置

日期:2017/3/1 12:26:48   编辑:關於Linux
通過將服務器配置成VNC SERVER,可以讓其他主機使用圖形方式登錄這台服務器。
在ubuntu下配置vnc server很簡單,方法如下:

服務器端:
1、先安裝VNC服務程序:
Shell代碼
$ sudo apt-get install vnc4-common vnc4server

2、給當前用戶設置vnc登錄密碼:
Shell代碼
$ vncpasswd

3、修改vnc的默認設置,使啟動時運行gnome作為X的桌面(如果不設置,vnc將使用twm,你可以試試,相信你會很不習慣的):
Shell代碼
$ vncserver :1
$ vncserver -kill :1
注意:裡面的":1"代表display號,客戶登錄的時候得寫相同的display號才能登錄(見後面客戶端部分)。
修改~/.vnc/xstartup文件,建議拷貝系統中Xsession的配置文件:
Shell代碼
$ cp /etc/X11/Xsession ~/.vnc/xstartup

然後再次啟動VNC SERVER:
Shell代碼


$ vncserver -geometry 1280x800 :1

客戶端:
1、安裝VNC客戶程序:
Shell代碼
$ sudo apt-get install vnc4-common xvnc4viewer

2、然後你就通過Terminal Server Client登錄了:Applications -> Internet -> Terminal Server Client;Computer為:服務器IP:display#,例如:192.168.10.36:1;protocol選擇:VNC。
或者命令行:
Shell代碼
$ vncviewer 192.168.10.36:1
Copyright © Linux教程網 All Rights Reserved