How can I restart the GNOME shell on Wayland?

40

4

When making changes to extensions or installing applications I have sometimes found it neccessary to restart the GNOME shell for the changes to take effect. In the past, pressing Alt + F2, typing 'r' and pressing enter would do this.

However, this does not seem to be available on Wayland.

enter image description here

I can log out and back in but this is not convenient when I have many apps and windows open working on a project.

HarlemSquirrel

Posted 2017-01-06T14:37:40.763

Reputation: 501

1

Here's the reason why: https://mail.gnome.org/archives/commits-list/2015-March/msg01019.html

– gravity – 2017-01-06T14:42:27.770

3So it sounds like it just is not going to be possible for the moment? – HarlemSquirrel – 2017-01-06T16:52:16.853

Usually, I use the restart to re-index the app (after install), is there a better way? – Abdillah – 2019-09-18T00:25:16.973

Answers

10

Turning @gravity's comment into an answer, a Gnome mailing list thread says that:

runDialog: Disable restart command on wayland

Clients can be expected to deal with the WM going away temporarily, but not the display server - so when running as wayland compositor, a restart is generally a fancy way of killing the user session, and there's little we can do about it except for preventing the user to shoot herself in the foot by throwing an error.

dmh

Posted 2017-01-06T14:37:40.763

Reputation: 203

5

Under Wayland, gnome-shell does not have a graceful way to restart and leave the applications open. If you must restart gnome-shell then you are probably better off saving all of your work and using the menu to log out. If that's not working for some reason, the command killall -HUP gnome-shell will get it done from the command runner (Alt+F2) or terminal.

Segfault

Posted 2017-01-06T14:37:40.763

Reputation: 413

If you are a single desktop user, for example, with the username foo... killall -u foo – noobninja – 2018-02-07T02:55:26.750

3

There is no way on wayland, see this QA:

In an Xorg session one can restart GNOME shell without losing application state as applications are running against a separate server (X). But unlike Xorg in case of a Wayland session GNOME shell is not separate from the Wayland server.

So there isn't any way to restart GNOME shell in Wayland without losing application state as the display server also goes down. It's similar to restarting X server in an Xorg session.

That is the reason why this shell restart option is disabled in Wayland (recall that usually the key sequence to kill the X server is also disabled by default in the Xorg session) and there will probably never be any non-destructive way to restart GNOME shell in Wayland.

You may see this GNOME bug report for details.

1: https://bugzilla.gnome.org/show_bug.cgi?id=741665

But on Xorg it is possible by just doing ALT + F2 and then entering r in the dialogue.

rubo77

Posted 2017-01-06T14:37:40.763

Reputation: 2 822