Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Next] Add system reboot ability to mintUpdate when reboot is needed #905

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

timfeierabend
Copy link

Implements fix for #749

Rationale:

When a kernel update is installed, users need to reboot their system outside of mintUpdate. This adds a way for users to reboot their system from within mintUpdate.

Reboot button will present a yes/no modal dialog asking for confirmation of reboot. This can be tweaked as needed.

Before:

Screenshot from 2024-11-23 18-24-24

After:

Screenshot from 2024-11-27 08-28-42

Screenshot from 2024-11-27 08-36-40

Note: screenshots below were created from manually after temporarily disabling reboot_required condition check to trigger the infobar.

reboot button will present yes/no dialog box asking for user
confirmation
…into feature/restart-button

# Conflicts:
#	usr/lib/linuxmint/mintUpdate/mintUpdate.py
@clefebvre clefebvre changed the title Add system reboot ability to mintUpdate when reboot is needed [Next] Add system reboot ability to mintUpdate when reboot is needed Dec 5, 2024
@clefebvre
Copy link
Member

Marking as Next because it's too late to get in 22.1.

I'm not mad about the confirmation dialog... the DE is much better at handling this kind of things. For instance, cinnamon-session-quit will monitor and warn about session idlers (i.e. opened unsaved documents etc..).

We might be able to call for a reboot via systemd and have the DE dialog triggered instead of calling reboot directly.

@timfeierabend
Copy link
Author

Thanks for pointing me to cinnamon-session-quit. Looks like it uses D-Bus to tell Cinnamon to reboot. Both MATE (org.gnome.SessionManager) and XFCE (org.xfce.SessionManager) also have D-Bus reboot capabilities. Instead of using reboot/systemctl reboot to initiate the reboot process, I'll re-write this to send the reboot message via D-Bus to the DE's session manager. That way it'll mimic the behavior as if the user initiated the reboot via the DE's menu.

@mtwebster
Copy link
Member

Why not just run cinnamon-session-quit --reboot directly?

@clefebvre
Copy link
Member

Yeah either way, as long as it works everywhere.

@timfeierabend
Copy link
Author

@mtwebster That's ultimately what I ended up doing instead of re-inventing wheels. Cinnamon and XFCE had apps that trigger a reboot in their respective session. MATE's mate-session-save doesn't have a reboot option, so I ended up using dbus-send to trigger the reboot.

@timfeierabend
Copy link
Author

Cinnamon session end:
Screenshot_2024-12-06_09-54-28
Screenshot_2024-12-06_09-54-47

MATE session end:
Screenshot_2024-12-06_09-58-04

XFCE doesn't perform the same check when you go to reboot, even from the main menu, so the reboot button immediately reboots the machine without any dialog.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants