在ubuntu上安装VNC服务

VNC有很多选择,VNC4server,tigervncserver等等,都不推荐,难装又难用。经过多次实验和测试,最后只采用 x11vnc 作为VNC服务器端。

安装方法

安装X11VNC

1
sudo apt-get install x11vnc -y

配置访问密码

1
sudo x11vnc -storepasswd /etc/x11vnc.pass 

创建服务

1
sudo vim /lib/systemd/system/x11vnc.service

输入下面代码

1
2
3
4
5
6
7
8
[Unit]
Description=Start x11vnc at startup.
After=multi-user.target
[Service]
Type=simple
ExecStart=/usr/bin/x11vnc -auth guess -forever -loop -noxdamage -repeat -rfbauth /etc/x11vnc.pass -rfbport 5900 -shared
[Install]
WantedBy=multi-user.target

重启服务

1
2
sudo systemctl enable x11vnc.service
sudo systemctl daemon-reload

配置分辨率

http://askubuntu.com/questions/100604/set-desktop-resolution-for-standard-11-10-vnc-server

http://www.cnblogs.com/elmaple/p/4354814.html

要依赖于本身的分辨率
http://www.linuxdiyf.com/linux/26388.html

参考

其它

https://blog.csdn.net/JerryGou/article/details/80787479


在ubuntu上安装VNC服务
https://blog.fengcl.com/2017/12/15/install-vnc-server-on-ubuntu/
作者
frank
发布于
2017年12月15日
许可协议