Description of problem: using systemctl in Mageia 6 to autostart x11vnc at boot-up does not work whereas it does in Mageia 5 For Mageia 5 I adapted the instructions from this webpage http://c-nergy.be/blog/?p=8984 which worked as advertised. The only change from the instructions found there is with regard to installing x11vnc. Using the procedure will successfully configured autostarting x11vnc server on Mageia 5 at boot-up; no local (or remote ssh) login is required to start it. Using the same setup on Mageia 6 fails. Installing the systemctl control file "x11vnc.service" in /usr/lib/systemd/system on Mageia 6 gets x11vnc running at boot-up (as reported by "ps") but refusing to accept connections. For both Mageia 5 and 6 the file /usr/lib/systemd/system/x11vnc.service contains the following: [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 After enabling and reloading the daemons for systemctl and restarting the server, the command ps ax | grep x11vnc returns output similar to the following for both 5 and 6: 23129 ? Ss 0:00 /usr/bin/x11vnc -auth guess -forever -loop -noxdamage -repeat -rfbauth /etc/x11vnc.pass -rfbport 5900 -shared The test of functionality is to logon to the console of the server and try to telnet to port 5900: telnet localhost 5900 The result on the Mageia 6 machine will be Trying 127.0.0.0... telnet: connect to 127.0.0.1: Connection refused If that(those) daemon(s) is(are) killed ("kill -9 <x11vnc process number(s)>") and the x11vnc server started up manually: /usr/bin/x11vnc -auth guess -forever -loop -noxdamage -repeat -rfbauth /etc/x11vnc.pass -rfbport 5900 -shared then the the same attempt to connect using telnet from the local console is successful. Attempts to connect from a remote vnc client mirror these responses: failure if started from systemctl and success if started manually. Additionally, "netstat -an | grep 5900" validates this performance. When started manually port 5900 is listening for connections. When started from systemctl no such instances are reported.
Assigning to all packagers collectively, since there is no registered maintainer for x11vnc. CC'ing the basesystem maintainers, because systemd is involved. Also CC'ing some x11vnc committers.
CC: (none) => basesystem, cjw, guillomovitch, marja11, mramboAssignee: bugsquad => pkg-bugsSource RPM: (none) => x11vnc, systemd
In the Unit section for the systemd service, try adding the line ... After=network.target
CC: (none) => davidwhodgins
The suggested change, to add that line to the systemd service file, fixed the problem. Thank you very much!
Status: NEW => RESOLVEDResolution: (none) => WORKSFORME
Rather than closing the bug, you might want to leave it open so that it can be fixed in the package. However, the better way to run x11vnc is to SSH into the machine and create an SSH tunnel and then run x11vnc only listening on localhost, that way only you can connect to it, encrypted, through your SSH tunnel, at the times you want to use it, rather than leaving a globally open listener on your machine all the time.