How to start GNOME Wayland session from command line/tty?

49,584

Solution 1

A working solution per Jonas Ådahl a mutter developer:

Usually what I do is switch to a VT and run:

dbus-run-session -- gnome-shell --display-server --wayland

Solution 2

XDG_SESSION_TYPE=wayland dbus-run-session gnome-session

to force firefox and QT applications as well to wayland, in 2019-12-31 they do not respect XDG_SESSION_TYPE=wayland:

MOZ_ENABLE_WAYLAND=1 QT_QPA_PLATFORM=wayland XDG_SESSION_TYPE=wayland dbus-run-session gnome-session

if it should log out the command line session after pressing "logout" in the gnome GUI, add an exec: XDG_SESSION_TYPE=wayland exec dbus-run-session gnome-session

From docs: https://wiki.archlinux.org/index.php/GNOME#Wayland_sessions

Solution 3

Never mind, I found the solution:

gnome-session --session gnome-wayland

Source:
GNOME / Wayland in Fedora | Goings on https://blogs.gnome.org/mclasen/2013/10/03/gnome-wayland-in-fedora/

[EDIT] This no longer seems to work with recent fedora (24). At the moment I haven't found a solution for this. The only way I get Wayland working these days is to use the gear at login and set the system to log into wayland. If anyone has a solution to this...

Share:
49,584

Related videos on Youtube

Leo Ufimtsev
Author by

Leo Ufimtsev

Updated on April 24, 2021

Comments

  • Leo Ufimtsev
    Leo Ufimtsev about 3 years

    I'm experimenting with wayland.

    You can start Gnome with X through startx command. Is there an way to start Gnome with wayland through some command?

    I would like to be able to run Gnome/X on my main display. Then switch to display :2 (Ctrl+alt+win+F2/F3) and then run something like:

    startWayland 
    

    So that I have a seconday desktop with gnome running with wayland.

    Is this possible? (A near-alternative is also welcome)

  • Leo Ufimtsev
    Leo Ufimtsev almost 8 years
    That seems to work. Is there a way to terminate the session? Logout doesn't seem to do anything.
  • Hi-Angel
    Hi-Angel almost 8 years
    @LeoUfimtsev well, I didn't ask, but I just ran killall gnome-shell.
  • rugk
    rugk over 5 years
    In Fedora 28 this is the only answer that actually worked. Thanks!
  • ACyclic
    ACyclic over 5 years
    This didn't work well in Fedora 29 (no start-up apps, couldn't log out). The answer by soloturn fixes this.
  • Scrooge McDuck
    Scrooge McDuck about 3 years
    @Acyclic use XDG_SESSION_TYPE=wayland dbus-run-session gnome-session then.