2020-08-15

VNC remote session hell

Today I was about to start up TigerVNC server in a SUSE LEAP 15,02 server. I decided to try the SUSE way, start vnc with SUSE VNC manager. Now starting up a VNC server is always a thriller sometimes I manage to set it up in just a few hours of trial and errors, sometimes it is like banging my head bloody against a brick wall for days and sometimes the VNC server just refuses to startup. But the SUSE 15,2 way seemed very simple :
  1. Start YaST › Network Services › Remote Administration (VNC).

  2. Activate Allow Remote Administration With Session Management.

  3. Activate Enable access using a web browser if you plan to access the VNC session in a Web browser window.

  4. If necessary, also check Open Port in Firewall (for example, when your network interface is configured to be in the External Zone). If you have more than one network interface, restrict opening the firewall ports to a specific interface via Firewall Details.

  5. Confirm your settings with Next.

  6. In case not all needed packages are available yet, you need to approve the installation of missing packages.


What can go wrong? Everything of course. Whatever I tried, all a got was a black screen. Asking my friend Google for advice revealed I was not alone, I found number of desperate people asking for help, none of the replies gave any help, actually most of the helpful advise I did not even understood. 
I then tried the old VNCSERVER command, with the same poor result. Then i tried to set it up exactly as in SUSE 42 still the same black screen grinned at my face. It turned out almost everything backing the VNC remote sessions was changed from the old suse version.
I have been working with Linux VNC servers since 2020 and for every fucking distro and version VNC setup is always different and the documentation never works, you have to trial and error change one thing at a time until it works.
This time after some hours of GOOGLE GOOGLE GOOGLE I stared at at a line:

The old vncserver command was started with sudo, I never in twenty years started vncserver as a privileged command. Now I tried with sudo and then the vnc session worked just like that. Tomorrow I will use the session I hope it still works😖

UPDATE:
Stupid me, sudo makes the remote session root, I should have known. I blame the present heat wave, we have temperatures above 30 centigrade, it is extreme for Stockholm and I can't think. For now I'm ok with a root session this server is for development and testing purposes and I'm the only user. In the end though I have to find the root cause. It will probably take days I have bo idea how to debug the vncserver.