M-J*_*ack 5 ubuntu vnc gnome systemd
我在 Ubuntu 服务器 16.04 Gnome 上启动 x11vnc 服务时遇到问题。以前在14.04下运行得很好。不确定是否与 x11vnc 本身或 systemd 有关。
这是 systemd 服务文件:
[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 -o /var/log/x11vnc.log
[Install]
WantedBy=multi-user.target
Run Code Online (Sandbox Code Playgroud)
/etc/x11vnc.pass 存在并且已使用生成x11vnc -storepasswd /etc/x11vnc.passwd
重新启动后,x11vnc 启动,但无法使用 vnc 连接到它,x11vnc.log 文件显示:
03/05/2017 16:12:19 passing arg to libvncserver: -rfbauth
03/05/2017 16:12:19 passing arg to libvncserver: /etc/x11vnc.pass
03/05/2017 16:12:19 passing arg to libvncserver: -rfbport
03/05/2017 16:12:19 passing arg to libvncserver: 5900
03/05/2017 16:12:19 x11vnc version: 0.9.13 lastmod: 2011-08-10 pid: 30259
xauth: unable to generate an authority file name
03/05/2017 16:12:19 -auth guess: failed for display='unset'
03/05/2017 16:12:19 -auth guess: since we are root, retrying with FD_XDM=1
03/05/2017 16:12:19 -auth guess: failed for display='unset'
Run Code Online (Sandbox Code Playgroud)
为了验证 x11vnc 是否正常工作,我只需在服务器上手动运行:
x11vnc -rfbauth /etc/x11vnc.passwd
Run Code Online (Sandbox Code Playgroud)
这样我就可以成功连接 vnc 了。但怎样才能让它自动启动呢?
| 归档时间: |
|
| 查看次数: |
14044 次 |
| 最近记录: |