You are not logged in.

#1 2016-04-13 21:47:31

JashandeepSohi
Member
Registered: 2016-04-13
Posts: 3

Launch Gnome 3.20 Wayland from Command Line

Does anyone know how to launch a Gnome session from the command-line (i.e. without GDM) that uses Wayland?

Pre 3.20 one could do:

gnome-session --session=gnome-wayland

Now that

/usr/share/gnome-session/sessions/gnome-wayland.session

has been removed, that is no longer a valid option. Any suggestions for 3.20?

Offline

#2 2016-04-14 03:47:22

ooo
Member
Registered: 2013-04-10
Posts: 1,638

Re: Launch Gnome 3.20 Wayland from Command Line

Offline

#3 2016-04-14 19:56:44

JashandeepSohi
Member
Registered: 2016-04-13
Posts: 3

Re: Launch Gnome 3.20 Wayland from Command Line

Setting XDG_SESSION_TYPE=wayland does not work. It fails when trying to start gnome-shell:

$ XDG_SESSION_TYPE=wayland gnome-session --debug
...
gnome-session-binary[1101]: DEBUG(+): GsmAutostartApp: starting org.gnome.Shell.desktop: command=/usr/bin/gnome-shell startup-id=10e2c31fb592fba9e614605247674188500000011010000
gnome-session-binary[1101]: DEBUG(+): GsmAutostartApp: started pid:1115
gnome-session-binary[1101]: DEBUG(+): GsmAutostartApp: (pid:1115) done (status:1)
gnome-session-binary[1101]: WARNING: App 'org.gnome.Shell.desktop' exited with code 1
gnome-session-binary[1101]: DEBUG(+): GsmManager: disposing manager
...

Offline

#4 2016-04-14 20:57:28

JashandeepSohi
Member
Registered: 2016-04-13
Posts: 3

Re: Launch Gnome 3.20 Wayland from Command Line

While I await an "official" solution to this, I've figured out a temporary solution. If anyone is interested here's how.

Copy `org.gnome.Shell.desktop` file locally:

$ cp /usr/share/applications/org.gnome.Shell.desktop ~/.local/share/applications/org.gnome.Shell-Wayland.desktop

Edit it so that it so that it runs `gnome-shell` as a wayland compositor:

$ less ~/.local/share/applications/org.gnome.Shell-Wayland.desktop
...
Exec=/usr/bin/gnome-shell --wayland
...

Copy `gnome.session` file locally:

$ cp /usr/share/gnome-session/sessions/gnome.session ~/.config/gnome-session/sessions/gnome-wayland.session

Edit it to use `org.gnome.Shell-Wayland`:

$ less ~/.config/gnome-session/sessions/gnome-wayland.session
...
RequiredComponents=org.gnome.Shell-Wayland;gnome-settings-daemon;
...

Now you can run a wayland session:

$ gnome-session --session=gnome-wayland

Last edited by JashandeepSohi (2016-04-14 20:58:42)

Offline

#5 2023-07-19 05:26:40

asklow
Member
Registered: 2022-11-07
Posts: 58

Re: Launch Gnome 3.20 Wayland from Command Line

JashandeepSohi wrote:

While I await an "official" solution to this, I've figured out a temporary solution. If anyone is interested here's how.

Your method works, but applications take very long time to load.

EDIT: issue was xdg-desktop-portal-gnome. Replaced it with xdg-desktop-portal-gtk & resolved slow loading.

Last edited by asklow (2023-08-30 09:54:39)

Offline

Board footer

Powered by FluxBB