x11vnc是连接到真实的X会话,相比vnc4server和tightvncserver自己创建不同分辨率的xserver来说,画面延时和显示效果应该要好一些。两种服务都试过,个人感觉x11vnc要好
x11vnc是连接到真实的X会话,相比vnc4server和tightvncserver自己创建不同分辨率的xserver来说,画面延时和显示效果应该要好一些。两种服务都试过,个人感觉x11vnc要好。
- 安装x11vnc
sudo apt-get install x11vnc
- 创建vnc连接密码
sudo x11vnc -storepasswd <password> /etc/x11vnc.pass
- 配置x11vnc开机启动创建文件/etc/init/x11vnc.conf,并添加如下代码
start on login-session-startscriptx11vnc -display :0 -auth /var/run/lightdm/root/:0 -forever -bg -o /var/log/x11vnc.log -rfbauth /etc/x11vnc.pass -shared -noxdamage -xrandr "resize" -rfbport 5900end script
其中,/var/run/lightdm要根据实际的桌面管理器修改,gdm或者kdm。
- 配置虚拟分辨率服务器如果没有外接外接显示器,x-session不能从外部获取分辨率,需要在xorg.conf中设置虚拟分辨率。参考:http://askubuntu.com/questions/100604/set-desktop-resolution-for-standard-11-10-vnc-serverubuntu默认已经没有/etc/X11/xorg.conf,也没有必要用Xorg -configure创建,直接手动创建就行,并添加如下代码(客户端显示屏分辨率是1680x1050,可以根据实际情况修改Virtual参数)
Section "Device" Identifier "Configured Video Device"EndSectionSection "Monitor" Identifier "Configured Monitor"EndSectionSection "Screen" Identifier "Default Screen" Monitor "Configured Monitor" Device "Configured Video Device" SubSection "Display" Depth 24 Virtual 1680 1050 EndSubSectionEndSection
[吐槽] 那些要安装xserver-xorg-video-dummy,再用gft或cvt获取Modeline的方法都是不管用滴!