1 頁 (共 1 頁)

x11vnc

發表於 : 2014-05-19 16:30:53
yehlu
http://maxron.pixnet.net/blog/post/2622 ... 2---x11vnc

http://ubuntuforums.org/showthread.php?t=363236

雖說Ubuntu有內建遠端桌面環境,但確是要你的遠端作業系統登入後方可使用。而X11VNC則可以在登入畫面時就可看見,方便使用!



注意,你的電腦必須先安裝 xinetd。若無請先執行安裝xinetd。若有安裝則跳過。

安裝指令:

$ sudo apt-get install xinetd



安裝指令:

$ sudo apt-get install x11vnc



建立密碼檔,指令:

$ sudo x11vnc -storepasswd [your_password] /etc/x11vnc.pass



安裝完畢之後,將x11vnc 加入xinetd 中。

指令:

$ sudo vim /etc/xinetd.d/x11vnc

按“i”,進入插入模式。鍵入或貼上下面內容

service x11vnc
{
port = 5900
type = UNLISTED
socket_type = stream
protocol = tcp
wait = no
user = root
server = /usr/bin/x11vnc
server_args = -inetd -o /var/log/x11vnc.log -display :0 -auth /var/lib/gdm/:0.Xauth -many -bg -rfbauth /etc/x11vnc.pass
disable = no
}

輸入完畢後,按“Esc”鍵跳出,再按 shift鍵 + “:” ,畫面出現冒號後, 輸入“wq!” ( w q 和 驚嘆號 ),再按Enter鍵 ( 即強制存檔後離開 )

接著,重新啟動x11vnc。

指令:

$ sudo /etc/init.d/xinetd restart





OK,大功告成!

代碼: 選擇全部

ps wwaux | grep auth

代碼: 選擇全部

service x11vnc
 {
        port            = 5900
        type            = UNLISTED
        socket_type     = stream
        protocol        = tcp
        wait            = no
        user            = root
        server          = /usr/bin/x11vnc
        server_args     = -inetd -o /var/log/x11vnc.log -display :0 -auth /var/run/lightdm/root/:0 -many -bg -rfbauth /etc/x11vnc.pass
        disable         = no
 }