I add x11vnc start command to /etc/rc.local before exit 0

x11vnc -display :0 -auth ~/.Xauthority -rfbauth ~/.vnc/passwd -forever

after reboot, the systemctl status was failed:

process:408 execstart=/etc/rc.local start (code=exited, status=1/FAILURE)

I try to enable used command:

systemctl enable rc-local

the error:

The Unit files have no installation config (WantedBy ...

so, I created overflow.conf in /etc/systemd/system/rc-local.service.d, add :


but failed again after reboot. It can be changed to active, I think there is some steps I have skipped for systemctl. Please help what need i do. thanks.

  • Welcome. Can you confirm that all the paths are correct and have the proper permissions?
    – Twisty
    Oct 22, 2018 at 5:18
  • This might also help in troubleshooting: tecmint.com/…
    – Twisty
    Oct 22, 2018 at 5:21
  • @Twisty thank you, all the path I have checked, and manually run, no problem
    – mstkris
    Oct 22, 2018 at 5:31

1 Answer 1


There are some things mixed up with your setup. Execution of /etc/rc.local is emulated from systemd by Compatibility with SysV but it cannot do it 100 % compatible. This job is done by the unit rc-local.service. There are two types of units: active and static. Static units have no [Install] section and cannot be enabled to run at startup by itself. They can only run if they are Wants= or Requires= by other units. rc-local.service is deep integrated into the systemd bootup environment and there are good reasons that it is static. If you fiddle on this integrated configuration you risk to break the whole systemd installation. To get an idea what I mean you can:

rpi ~$ systemctl list-dependencies rc-local.service
rpi ~$ systemctl show multi-user.target

and in the pager search for rc-local.

If you want to work with systemd then you should revert all settings, better start with a fresh flashed image, and then make a clean unit to start x11vnc without touching rc.local. If there are some problems then ask a new question.

  • Thanks Ingo, I found the rc.local cannnot be modified manually like before, so follow your advice, it's working now, thank you again.
    – mstkris
    Oct 25, 2018 at 2:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.