VNC教程
需求:Windows系统使用VNC服务访问Ubuntu系统
环境说明:
-
服务端系统:Ubuntu16.4
-
客户端系统:Windows10
服务端配置:
-
安装X11VNC
[autox@mkz-cn-001 ~]$sudo apt-get install -y x11vnc
-
创建X11VNC配置文件目录
[autox@mkz-cn-001 ~]$mkdir -p /home/autox/.vnc/
-
配置当前用户VNC访问密码
[autox@mkz-cn-001 ~]$sudo x11vnc -storepasswd /home/autox/.vnc/x11vnc.pass Enter VNC password: Verify password: Write password to /home/autox/.vnc/x11vnc.pass? [y]/n y Password written to: /home/autox/.vnc/x11vnc.pass #说明:输入两次密码-->确认密码文件所在路径-->密码文件写入到指定文件中
-
编辑VNC配置文件
[autox@mkz-cn-001 ~]$vim /lib/systemd/system/x11vnc.service --->配置文件存放路径(便于配置开机启动) [Unit] Description=Start x11vnc at startup. After=multi-user.target [Service] Type=simple ExecStart=/usr/bin/x11vnc -auth guess -once -loop -noxdamage -repeat -rfbauth -geometry 1366x768 /home/autox/.vnc/x11vnc.pass -rfbport 5900 -shared [Install]