Fedora 28, Tiger VNC Server black screen
I want to start by saying that I've been dealing with this issue for a while. I've done much research and haven't found a solution. I have Fedora 28 installed with the Tiger VNC Server (tigervnc.x86_64 1.9.0-3-fc28).
I have disabled SELinux and have followed the instructions to setup tigervnc as a service through systemd. My service file is as follows:
"/etc/systemd/system/vncserver@.service" file:
[Unit]
Description=Remote desktop service (VNC)
After=syslog.target network.target
[Service]
Type=forking
WorkingDirectory=/root
User=root
Group=root
PIDFile=/root/.vnc/%H%i.pid
ExecStartPre=/bin/sh -c '/usr/bin/vncserver -kill %i > /dev/null 2>&1 || :'
ExecStart=/usr/bin/vncserver
Restart=on-success
RestartSec=15
[Install]
WantedBy=multi-user.target
Now my xstartup file
"~/.vnc/xstartup" file:
#!/bin/sh
set SESSION_MANAGER
unset DBUS_SESSION_BUS_ADDRESS
exec /usr/bin/gnome-session &
# exec /etc/X11/xinit/xinitrc
# exec startxfce4
# exec /usr/bin/mate-session
The service starts up successfully and I have made a vnc password for the root user. My issue revolves around the xstartup file. Whenever I try to VNC in with gnome-session, I only get a black screen. I installed the mate desktop environment and that works. However, I want to run gnome over VNC since there are applications that I can't run via mate.
Here's the process the service is running:
‣ 32265 /usr/bin/Xvnc :1 -auth /root/.Xauthority -desktop mydomain.net:1 (root) -fp catalogue:/etc/X11/fontpath.d -geometry 1024x768 -pn -rfbauth /root/.vnc/passwd -rfbport 5901 -rfbwait 30000
Please let me know how to make this work with gnome.
Many thanks
Can you try to start with
/usr/bin/dbus-launch --exit-with-session /usr/bin/gnome-session
.gnome prefers wayland, you have to tell it to use xOrg in the desktop session manager. When you enter your password there is small icon below it.. change it and don't mess your password us, because you hve to reselect it until you login correctly. Wayland has no screengrab feature yet, so you see a black screen from vnc.