topgrade icon indicating copy to clipboard operation
topgrade copied to clipboard

FR: Ask to reboot/logout

Open psydvl opened this issue 3 years ago • 4 comments

When you install new kernel or kernel module or something, zypper (OpenSUSE pm) may request to reboot Also, GNOME Shell extensions expect shell restart to be reapplied (there are enough to logout)

Which operating systems are supported by this tool?

  1. OpenSUSE
  2. Linux+GNOME

What should Topgrade do to figure out if the tool needs to be invoked?

  1. If after update zypper needs-rebooting returns true, ask for reboot (probably, /usr/sbin/reboot)
  2. If any GNOME Shell extension updated: a. On Wayland: logout with gnome-session-quit b. On X: restart shell with busctl --user call org.gnome.Shell /org/gnome/Shell org.gnome.Shell Eval s 'Meta.restart("Restarting…")' or if Shell version >= 41 logout too

psydvl avatar Oct 18 '22 14:10 psydvl

This is a good idea for OpenSUSE, but for Gnome it's too much to ask for unless this could be read like on openSuse because it would require the analysis of the changed packages.

s34m avatar Oct 19 '22 20:10 s34m

For GNOME, 'hasUpdate' option can be used from gdbus call --session --dest org.gnome.Shell.Extensions --object-path /org/gnome/Shell/Extensions --method org.gnome.Shell.Extensions.ListExtensions

psydvl avatar Oct 20 '22 07:10 psydvl