I want to restart the Gnome Shell from within a script I’m working on.
While researching how other applications do this, I saw they use the
dbus message system to communicate with the Shell using the following message :
busctl --user call org.gnome.Shell /org/gnome/Shell org.gnome.Shell Eval s 'Meta.restart("Restarting…")'.
However, when executing this from either the terminal or from the script it does not restart the shell and just returns
bs false "", which is the expected response unless unsafe mode is on.
Other strategies I found in the internet that try to restart the Shell externally like
killall -HUP gnome-shell are buggy and workflow breaking.
Is there any “official” way to trigger a shell restart programmatically?