How to start VNC server on boot

Hi,

I’m in the process of building an headless server for the purpose of backing up all of the computers here. I have LEAP 42.1 installed (and applied all updates) with the XFCE desktop. I’ve installed VNC server, and it works. But, when this machine boots, the VNC server does not automatically start. As this computer will have no keyboard, monitor or mouse, I would like the VNC server to start on boot. How do I do this?

Many thanks,

Mark

You can either enable Remote Administration in YaST - in this case you will get usual login screen. It may not work with all DMs though (it definitely works with lightdm). Or you can write custom systemd unit that starts vncserver as specific user. In this case you will only need to enter vncserver password when connecting. If you need multiple users, each must use different port number obviously.

To enable the VNC service to start on boot,
On a systemd system like openSUSE you should “enable” the service, in this case xinetd.service for VNC

systemctl enable xinetd.service

You can stop/start/restart or check the status of the VNC server service using this command as well

systemctl start|stop|restart|status xinetd.service

HTH,
TSU