98

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.

5
  • 3
    Here's the reason why: mail.gnome.org/archives/commits-list/2015-March/msg01019.html
    – gravity
    Jan 6, 2017 at 14:42
  • 4
    So it sounds like it just is not going to be possible for the moment? Jan 6, 2017 at 16:52
  • 1
    Usually, I use the restart to re-index the app (after install), is there a better way?
    – Abdillah
    Sep 18, 2019 at 0:25
  • it's also inconvenient when a bug in another program crashes the alt+tab switcher whenever an e-mail is sent. forcing a reboot, apparently, to get alt+tab back. which is beyond ridiculous.
    – Michael
    May 19, 2022 at 15:00
  • Have a look at my answer, I hope it's going to work for you as well. Sep 1, 2022 at 13:15

7 Answers 7

26

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.

1
  • 2
    and yet, this is possible under X11...
    – Michael
    May 19, 2022 at 15:00
23

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.

2
  • If you are a single desktop user, for example, with the username foo... killall -u foo
    – noobninja
    Feb 7, 2018 at 2:55
  • After using killall, I was able to restart using export DISPLAY=:N Xwayland. (where you can find N using alt Fn keys).
    – S2L
    Apr 25, 2023 at 0:24
10

I wanted to restart due notifications being stuck all the time, especially because of Google Calendar notifications. On X.Org I used to solve this issue by restarting Gnome (i.e. ALT + F2 and then r).

On Wayland I simply use the lock screen feature (don't logout!) and then I log back in. Just press SUPER + L.

That's it, the notifications are gone when I log back in so it's quite possible that Gnome got restarted as well. The advantage is that I don't have to close all my applications.

1
  • Wow this worked for me and no need to log out. This might be the answer to accept!
    – Oliver
    Aug 30, 2023 at 14:46
7

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.

But, as you already pointed out, on Xorg it is possible by just doing ALT + F2 and then entering r in the dialogue.

4

There is an extension that allows you to restart any extension from the notice bar itself.

Tested on Gnome 3.38

1
  • 2
    Unfortunately the extension page starts off with this: >Gnome Shell Extension Reloader, extension-reloader@nls1729 - Effective March 29, 2021 the extension is NOT MAINTAINED. I give my permission to anyone who may want to become the maintainer. I no not have the free time or energy necessary to maintain the extension.
    – DaveLak
    Apr 22, 2023 at 2:45
4

I found another cool way to debug a shell extension instead of reloading it, by running it in a nested session:

dbus-run-session -- gnome-shell --nested --wayland
3

EDIT DEC 2021: This solution no longer works on Gnome 3.38. shell command returns

Reloading extensions does not work correctly and is no longer supported

I found a way to load/enable manually installed shell-extensions on Wayland. This article explains how to do this,

The gnome-shell command will give you the shell version currenlty installed to make sure you download the correct extension version,

> gnome-shell --version
GNOME Shell 3.30.2

in my case I have version 3.30.2. I Downloaded a shell extension for that version and proceeded to extract it content into a new folder. The name of this folder must match the uuid string found in the metadata.json file in the root of the extension. I then proceeded to create a new folder under,

mkdir ~/.local/share/gnome-shell/extensions/<uuid-string-found-in-metadata.json-file>/

After unzip the extension archive content into this folder, I used the following command to enable the the new extension,

gnome-shell-extension-tool -e <uuid-string-found-in-metadata.json-file>

the gnome-shell-extension-tool also allows you to reload an extension (-r) and disable it too (-d).

5
  • 1
    I don't see how this answers the question. The linked article states that it's author doesn't now a solution to this question other than logout/login. Not enough karma to downvote.
    – dreua
    Jul 6, 2021 at 16:23
  • 3
    Read the question, not just the title! It answers the question of how to get newly installed extensions to reload and take effect. One way to do this is to restart Wayland, another is to reload the extension as explained in this answer.
    – Aurovrata
    Jul 7, 2021 at 13:21
  • Huh if -r actually works that would be great, thanks
    – dreua
    Jul 8, 2021 at 14:55
  • 1
    Reloading doesn't work on recent versions. Tried this on Fedora 34, got the following message: .. > Reloading extensions does not work correctly and is no longer supported
    – Gareve
    Dec 2, 2021 at 19:01
  • I confirm, current running Gnome 3.38 and getting the same msg
    – Aurovrata
    Dec 6, 2021 at 11:37

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .