Open jarrah31 opened 1 month ago
Actually, the black screen can be fixed by ensuring you install "dbus-x11" when choosing the Desktop Environment Option 1 (Gnome), but it still results in a minimal desktop, so the xstartup modification is still required.
This post is to both report an issue and solution to the blank screen problem I had when using default installation options on Ubuntu Jammy 22.04 Desktop.
As per https://www.kasmweb.com/kasmvnc/docs/latest/install.html, I installed KasmVNC as follows:
After creating a new user, I chose option 1 for the Desktop Environment:
Browsing to the Ubuntu VNC server both locally (https://127.0.1.1:8444) and from another client on my network (https://192.168.1.207:8444/) results in a black screen.
For reference, the
~/.vnc/xstartup
file looks like this:The solution
The first part of the solution results in a basic Gnome desktop with no menu bar, so to have the full desktop environment some edits to xstartup and an additional package install is required which is shown later in these instructions. First let's get the basic desktop working.
rm -rf ~/.vnc
vncserver
againFor reference, the xstartup file looks like this now. The reason for the basic desktop is
twm
at the bottom of the file.The next part of the solution is to change the xstartup file contents and install dbus-x11.
vncserver -list
vncserver -kill :1
cp ~/.vnc/xstartup ~/.vnc/xstartup.bak
nano ~/.vnc/xstartup
unset SESSION_MANAGER unset DBUS_SESSION_BUS_ADDRESS
[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup [ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
vncconfig -iconic &
export XKL_XMODMAP_DISABLE=1 export GNOME_SHELL_SESSION_MODE=ubuntu export XDG_CURRENT_DESKTOP=ubuntu:GNOME export XDG_SESSION_DESKTOP=ubuntu export XDG_SESSION_TYPE=x11 export DISPLAY=:1
dbus-launch --exit-with-session gnome-session &