start x11vnc at boot with no user login

Dears

i need your help where i want to make x11vnc work with the startup but with no login user , i had try to add x11vnc.service to /etc/systemd/system and run systemctl enable x11vnc and start it but not work the file of x11vnc.service conatain this command , i hope to help me, i work on leap 15 kde plasma


[Unit]
Description=Start x11vnc at startup.
After=multi-user.target

[Service]
Type=simple
ExecStart=/usr/bin/x11vnc -auth /var/lib/xdm/authdir/authfiles/A:0-XQvaJk -rfbauth /etc/x11vnc.pass -forever -rfbport 5900 -shared

[Install]
WantedBy=multi-user.target


It would probably be better if you describe what your goal is, why you want it started automatically at boot, and how you plan to use it.

Depending on what your goal is, it is highly unlikely that you actually want it to run at boot, which is only what you think is a step to your goal of how you plan to use it.

The answer you are seeking is probably different than what you expect, and it depends on your destination, not on the path you think you need to take to get there.:wink:

For this kind of stuff,
I take a look at available references…

The ArchWiki for x11vnc is likely a good one.
https://wiki.archlinux.org/index.php/x11vnc

First thing to note when reading the ArchWiki is that x11vnc typically is invoked manually or after a graphical UI starts.
Interestingly nowhere in the ArchWiki does it describe setting up a service. I don’t know if that could be a very surprising oversight or a real reason why it’s not mentioned although you’d think it should be an option anyone would ask about.

But, there is a little gem in there,
A recommended command line to start the x11vnc process… It’s left up to you how and when to start it…
Note that the command may be close enough to your command that the following might still not work…

x11vnc -wait 50 -noxdamage -passwd PASSWORD -display :0 -forever -o /var/log/x11vnc.log -bg

Of course, you can improve the command on your own by things like setting an X Authority instead of stating the password in the command.

Don’t know if that “forever” switch is supposed to keep it running even when you terminate your remote session, if your x11vnc local session terminates, there is another option mentioned where you can “loop” restarting the process automatically.

Here’s an idea…
What if you install at least an X Windows with WM or a full Desktop, then configure your Unit file to “want” graphical.target?
This is suggested by my observation about the ArchWiki suggesting that x11vnc might require a full graphical environment.installed and running on the system.

HTH,
TSU