Specifiying Ubuntu desktop does not work, always GNOME
I login with command line and then connect to the desktop through TigerVNC, not through a local GUI login screen. That is, systemctl get-default
returns multi-user.target
.
In GUI login screen, we can select GNOME or Ubuntu desktop easily by mouse click. But in command line, the /ubuntu-xorg.desktop
file in /usr/share/xsessions/
provides command to start Ubuntu desktop. The contents of this file is:
[Desktop Entry] Name=Ubuntu on Xorg Comment=This session logs you into Ubuntu Exec=env GNOME_SHELL_SESSION_MODE=ubuntu /usr/bin/gnome-session --session=ubuntu TryExec=/usr/bin/gnome-shell Type=Application DesktopNames=ubuntu:GNOME X-GDM-SessionRegisters=true X-Ubuntu-Gettext-Domain=gnome-session-42
It suggests that the command to start Ubuntu desktop in ~/.vnc/xstartup
be
GNOME_SHELL_SESSION_MODE=ubuntu dbus-launch --exit-with-session gnome-session --session=ubuntu
But it does not work. The desktop is always GNOME (verified by echo $XDG_CURRENT_DESKTOP
). Did I miss anything like package or configuration to start Ubuntu desktop in TigerVNC?
I'm using Ubuntu 22.04.3 LTS. The GNOME version is 42.9. GDM3 is installed.