使用自带的vnc服务总是会遇到各种的限制,所以还是使用x11vnc比较好,这个只是把主屏的内容直接传输过来,而不经过任何的权限管理方面的处理。
- 安装x11vnc
$ sudo apt-get update
$ sudo apt-get install x11vnc
- 创建密码
$ x11vnc -storepasswd
Enter VNC password: *********
Verify password: *********
Write password to /home/xx/.vnc/passwd? [y]/n y
Password written to: /home/xx/.vnc/passwd
- 启动x11vnc
$ sudo x11vnc -auth guess -forever -loop -noxdamage -repeat -rfbauth /home/xx/.vnc/passwd -rfbport 5900 -shared
- 设置开机启动
$ sudo vi /etc/init/x11vnc.conf
# description "Start x11vnc on system boot"
description "x11vnc"
start on runlevel [2345]
stop on runlevel [^2345]
console log
respawn
respawn limit 20 5
exec /usr/bin/x11vnc -auth guess -forever -loop -noxdamage -repeat -rfbauth
/home/xx/.vnc/passwd -rfbport 5900 -shared
网友评论