This simple tutorial shows beginners how to restart Gnome Shell, the user interface of Gnome Desktop in Ubuntu, Debian, Fedora Linux.
In the previous tutorial, I’ve written about how to reset Gnome Desktop if you mess things up.
What if your Gnome Desktop freezes and becomes unresponsive, or you just need to restart Gnome to apply changes after changing system settings or installing an extension, and you don’t want to close any running application?
1. Restart Gnome Shell via “Run a Command” Box:
Simply press Alt + F2 on keyboard will bring up a small “Run a Command” dialog in Linux Gnome.
Type r in the command box and hit Enter! And it will restart Gnome Shell without closing any running application on X11.
NOTE for Wayland session, Gnome Shell is running as display server. Restarting the display server will cause all running applications go down!
2. Restart Gnome Shell via Linux Command:
While the previous global keyboard shortcut is the best way to restart Gnome Shell, a Linux command may be useful if you want to bind the function into a script.
Though you can simply kill Gnome Shell via killall -HUP gnome-shell
command, it’s reported some applications are also killed after that.
To be exactly the equivalent to Alt+F2 -> r way, you should run this command instead:
busctl --user call org.gnome.Shell /org/gnome/Shell org.gnome.Shell Eval s 'Meta.restart("Restarting…")'
That’s it. Enjoy!