gnome-shell-extension-hibernate-status icon indicating copy to clipboard operation
gnome-shell-extension-hibernate-status copied to clipboard

custom reboot

Open slaclau opened this issue 3 months ago • 3 comments

Addresses #112

  • Add customreboot functionality
  • Add preferences for customreboot

slaclau avatar Mar 27 '24 12:03 slaclau

I don't think that quick reboot functionality is good in the current form. Regenerating the grub config needs extra caution, because it can break boot, especially with custom configs. And the timeout will remain disabled if e.g. the user logs in into a session other than GNOME after reboot, or not authenticated to run the command to reconfigure grub.

I think it would better to drop this functionality.

City-busz avatar Mar 29 '24 21:03 City-busz

The code in its current from mostly comes from https://extensions.gnome.org/extension/5542/custom-reboot/, I do agree about the issue with disabling the timeout

slaclau avatar Mar 29 '24 23:03 slaclau

Generally, I think it would better to implement this functionality based on the D-Bus interface of systemd-logind. You can get the boot loader entries by reading BootLoaderEntries, and there is a SetRebootToBootLoaderEntry() method.

UPDATE: However, BootLoaderEntries just gives the list of IDs, but not the titles, so the current code that process the output of bootctl list gives better result.

For the reboot, it would better to use the SetRebootToBootLoaderEntry() D-Bus method (or the command systemctl reboot --boot-loader-entry=ID), because it does not require to be authenticated as root, since reboot is allowed for all users by default. But it needs some refactoring, a custom reboot dialog is needed for this feature.

City-busz avatar Mar 30 '24 09:03 City-busz