[Linux] 用 Mac 連上 Ubuntu 15.04 的 vino VNC server
自從裝好了 Ubuntu 15.04 之後,一直有個困擾,
就是從我的 Mac 再也沒辦法用 VNC 連上 Ubuntu 了,
從其他的 CentOS 機器上也是連不上…
找了一些資料,下面這兩篇裡的網友留言頗有幫助:
Enable remote VNC from the commandline?
Can no longer use Screen Share to connect Mac to Ubuntu since upgrading to 14.04
1. 啟用 vino 服務,並關閉加密選項
執行下面的指令啟用 vino service,同時把加密的選項關閉:
gsettings set org.gnome.Vino enabled true gsettings set org.gnome.Vino require-encryption false
如果沒有啟用 vino service 的話,在執行 vino-server 時會出現下面的錯誤:
testuser@localhost ~ $ /usr/lib/vino/vino-server ** (vino-server:2761): WARNING **: The desktop sharing service is not enabled, so it should not be run.
本來這樣也就 OK 了,但是 Mac 似乎不支援 Ubuntu 15.04 上的 vino 的加密設定,
所以也得把加密選項關閉才行~
2. 執行 vino-server
執行 /usr/lib/vino/vino-server:
testuser@localhost ~ $ /usr/lib/vino/vino-server (vino-server:2800): EggSMClient-CRITICAL **: egg_sm_client_set_mode: assertion 'global_client == NULL || global_client_mode == EGG_SM_CLIENT_MODE_DISABLED' failed 09/10/2015 12:29:28 AM Autoprobing TCP port in (all) network interface 09/10/2015 12:29:28 AM Listening IPv6://[::]:5900 09/10/2015 12:29:28 AM Listening IPv4://0.0.0.0:5900 09/10/2015 12:29:28 AM Autoprobing selected port 5900 09/10/2015 12:29:28 AM Advertising security type: 'TLS' (18) 09/10/2015 12:29:28 AM Re-binding socket to listen for VNC connections on TCP port 5900 in (all) interface 09/10/2015 12:29:28 AM Listening IPv6://[::]:5900 09/10/2015 12:29:28 AM Listening IPv4://0.0.0.0:5900 09/10/2015 12:29:28 AM Clearing securityTypes 09/10/2015 12:29:28 AM Advertising security type: 'TLS' (18) 09/10/2015 12:29:28 AM Clearing securityTypes 09/10/2015 12:29:28 AM Advertising security type: 'TLS' (18) 09/10/2015 12:29:28 AM Advertising authentication type: 'No Authentication' (1) 09/10/2015 12:29:28 AM Re-binding socket to listen for VNC connections on TCP port 5900 in (all) interface 09/10/2015 12:29:28 AM Listening IPv6://[::]:5900 09/10/2015 12:29:28 AM Listening IPv4://0.0.0.0:5900 09/10/2015 12:29:28 AM Clearing securityTypes 09/10/2015 12:29:28 AM Clearing authTypes 09/10/2015 12:29:28 AM Advertising security type: 'TLS' (18) 09/10/2015 12:29:28 AM Advertising authentication type: 'No Authentication' (1) 09/10/2015 12:29:28 AM Advertising security type: 'No Authentication' (1)
以上設定好之後,就可以在 Mac 上用 VNC 連上遠端的 Ubuntu 了,
而且使用的是 DISPLAY=:0 (也就是平常電腦螢幕上看到的那個畫面),
不像平常執行 vncserver 的話看到的是另外產生出來的桌面囉~方便多了~^^
(本頁面已被瀏覽過 1,276 次)