... and how can I overcome it ?
Hi folks,
I am currently trying to set up x11vnc as service started during bootup on Arch Linux.
This is my service file:
Code:
[Unit]
Description=VNC Server for X11
Requires=display-manager.service
After=display-manager.service
[Service]
Type=forking
ExecStart=/usr/bin/x11vnc -rfbauth /etc/x11vnc.pass -rfbport 5900 -display WAIT:0 -auth /var/run/lxdm/lxdm-\:0.auth -forever -bg -o /var/log/x11vnc.log -xkb -noxrecord -noxfixes -noxdamage -nomodtweak
and it almost works.
Almost means: It works if a client connects within 2 minutes. Otherwise, x11vnc gets killed. According to my log file, x11vnc caught signal 15.
The WAIT:0 option is necessary, because otherwise x11vnc my start too fast and fail to connect to x11. With WAIT, it will connect to x11 when the client connects.
I also tried
Type=oneshot instead of
Type=forking (and without the -bg option).
During the 5 minutes, systemctl status shows "
Active (running)", and after that it shows "
Failed".
Then I start the service manually with
systemd start x11vnc, it freezes until the client connects or the timeout occurs.
I have verified the
ExecStart command is correct by directly running it from the shell. This way, it works, no matter when a client connects. Even several hours later is fine.
This means that systemd must know somehow if x11vnc is connected to a client.
How does it know this ? And how can I tell it not to kill it even when there is no client ?
Thanks and Regards
Markus