Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save lidgnulinux/e5f82f5e64a6c7c34217db48b7bc64ef to your computer and use it in GitHub Desktop.
Save lidgnulinux/e5f82f5e64a6c7c34217db48b7bc64ef to your computer and use it in GitHub Desktop.
Alternative way to launch Ubuntu GNOME without display manager.

How to Launch Ubuntu GNOME (Wayland) without Display Manager.

I'm not a fans of display manager (GDM, Lightdm, SDDM, etc), though for some people they could be usefull. When I'm using debian, slackware, alpine, I can launch GNOME desktop without display manager (I use tbsm / terminal based session manager). Strangely when I move to Ubuntu, I'm kind of forced to use display manager (GDM, in this case). So I tried several commands to launch ubuntu GNOME directly from tty and gladly I found it. I just need to use this command :

$ XDG_SESSION_TYPE=wayland \
    /usr/bin/env GNOME_SHELL_SESSION_MODE=ubuntu \
    dbus-run-session \
    /usr/bin/gnome-session --session=ubuntu

or just one liner :

$ XDG_SESSION_TYPE=wayland /usr/bin/env GNOME_SHELL_SESSION_MODE=ubuntu dbus-run-session /usr/bin/gnome-session --session=ubuntu

We also could put that command on ubuntu session desktop file (you could find it at /usr/share/wayland-sessions/ubuntu-wayland.desktop, so you could use it via tbsm (if you don't want to type that long command).

[Desktop Entry]
Name=Ubuntu on Wayland
Comment=This session logs you into Ubuntu
Exec=/usr/bin/dbus-run-session 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-GDM-CanRunHeadless=true
X-Ubuntu-Gettext-Domain=gnome-session-46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment