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