Simple Headless VNC

I have a few servers I use without a display but I do like the option of having access to a graphical desktop when needed. The solution I provided here is not secure and not setup to auto-spawn vnc sessions for all users on a computer. I have not had much luck with vncsession-start so I use vncserver instead.

On openSUSE anyway you need to install the tigervnc package:

You need to setup a vnc screen password for the user wishing to login:

You need to setup default display options in /etc/tigervnc/vncserver-config-defaults

I use KDE but do change to whatever you want that is present in /usr/share/xsessions

Also note that the default kde display manager (sddm) does not work for vnc so you need to install another such as lightdm and switch to it.

You then need to assign a virtual screen to a user in /etc/tigervnc/vncserver.users

This means port 5092 will be assigned to the user/screen

Setup a simple systemd service in /etc/systemd/system

After this:

If everything works well you can enable on boot:

After that you can use you vncviewer to connect to ip address:5902 using the password you setup.

Leave a Reply

Your email address will not be published. Required fields are marked *