Can't get a GNOME session via VNC

Most of the time, I have been working with RHEL and Centos. I am trying to get into SUSE as well.

So I run openSUSE Leap 15 on a physical server in the attic. It starts up with a Gnome session on the console, but I want a graphical session from my Windows desktop in the office.

Whatever I have tried so far gives me a black screen that doesn’t react to mouse clicks, and most of the time (not always) an unmovable xterm. What can I do to get a Gnome session?

This is what I have done.

  • my client is tightVNC running on Windows 10
  • I ssh to the openSUSE server and run vncserver
    . Black screen, immovable xterm. - The documentationsays to set WINDOWMANAGER=gnome vncserver -geometry 1024x768
    . So I do it. No change. - The wikisays to use YaST. I try “Allow Remote Administration Without Session Management”. No change.
  • A recent forum entry suggests changing the windows manager. I change it from gdm to xdm. Same black screen.
  • Again using Yast, I try I try “Allow Remote Administration With Session Management”. YaST installs and runs vncmanager, apart from that, no change.

“no change” means “no change, except sometimes there is no xterm”. Also, between the steps I restart not only the display manager, but go into multi-user mode then back to graphical mode. Just in case. Being of a paranoid nature, I double-check that a new display manager process has been launched.

One observation: After using YaSt, 100 Xvnc processes are started. Really I only need one :slight_smile:

Does the openSUSE server have an active firewall perhaps? If so, did you allow the vnc-server service?

Thanks, but no. The 59xx ports had been open before. firewall-cmd --add-service vnc-server had no effect on my problem.

I had forgotten to check the logs. So this is what I find in ml330:2.log:


New 'ml330:3 (bbausch)' desktop is ml330:3

Starting applications specified in /home/bbausch/.vnc/xstartup
Log file is /home/bbausch/.vnc/ml330:3.log

Failed to connect to bus: Connection refused
dbus-update-activation-environment: error: unable to connect to D-Bus: Failed to connect to socket /run/user/1000/bus: Connection refused
...
sourcing /etc/X11/xim.d/en/40-ibus ...
libreoffice-gnome is not found. For better IBus support, please install libreoffice-gnome
/etc/X11/xim.d/en/40-ibus started sucessfully

I installed libreoffice-gnome and rebooted the server. No more error messages in the VNC log, but VNC still gives me a black screen with an xterm.

Well. When I ran vncserver, it told me


New 'ml330:2 (bbausch)' desktop is ml330:2

However, ml330:2.log contains a reference to display 3. VNC access to display 3 gives me the Gnome environment.

On the other hand, ml330:1.log talks about display 2 and contains an error:


Unable to init server: Could not connect: Connection refused

** (gnome-session-failed:13234): WARNING **: Cannot open display:

Black art, all that.

Now I still have to get rid of the other 98 Xvnc processes. When I kill them, they are restarted and use up my process limit. Why are they started?

For test purposes, I tested using ‘one-time VNC session’ configured with YaST, and I get the same ‘black screen’ on the client as you describe when gdm is used on the VNC server. I switched to lightdm and found that it worked as expected. (I didn’t try investigating other display managers or investigate creating persistent VNC sessions.)

For GDM the following configuration (/etc/gdm/custom.conf) is apparently needed…

[xdmcp]
Enable=true

[security]
DisallowTCP=false