Skip to content

Use LogoutPrompt for Restart/Shut Down/Log Out (no root, adds confirmation)#9

Open
LemonAniLabs wants to merge 1 commit into
ChrTall:masterfrom
LemonAniLabs:fix-session-actions-logoutprompt
Open

Use LogoutPrompt for Restart/Shut Down/Log Out (no root, adds confirmation)#9
LemonAniLabs wants to merge 1 commit into
ChrTall:masterfrom
LemonAniLabs:fix-session-actions-logoutprompt

Conversation

@LemonAniLabs

Copy link
Copy Markdown

Fixes #8.

What

  • Restart… default: /sbin/rebootqdbus6 org.kde.LogoutPrompt /LogoutPrompt promptReboot
  • Shut Down… default: /sbin/shutdown nowqdbus6 org.kde.LogoutPrompt /LogoutPrompt promptShutDown
  • Log Out default: org.kde.Shutdown /Shutdown logoutqdbus6 org.kde.LogoutPrompt /LogoutPrompt promptLogout (consistency)
  • Remove an invalid width: parent binding on the System Preferences delegate (an Item was assigned to the real-typed width; width is already handled by Layout.fillWidth).

Why

/sbin/reboot and /sbin/shutdown now require elevated privileges on systemd systems (so they silently do nothing for an unprivileged user) and, where they do run, act immediately with no confirmation — even though the entries are labelled "Restart…/Shut Down…" and emulate the macOS Apple menu, which always confirms. org.kde.LogoutPrompt shows Plasma's standard confirmation dialog and works without privileges.

Testing

Plasma 6.6.4, Wayland, Ubuntu 26.04. Each entry now opens the expected Plasma confirmation dialog; lock / sleep / settings / app-store entries unaffected.

…nding

Restart and Shut Down ran `/sbin/reboot` and `/sbin/shutdown now`
directly. On systemd setups these need elevated privileges, so for an
unprivileged user they silently do nothing; where they do run they act
immediately with no confirmation, even though the entries are labelled
"Restart..."/"Shut Down..." and emulate the macOS Apple menu, which
always confirms.

Route Restart, Shut Down and (for consistency) Log Out through the
org.kde.LogoutPrompt D-Bus interface, which shows Plasma's standard
confirmation dialog and needs no elevated privileges.

Also remove an invalid `width: parent` binding on the System
Preferences delegate (an Item was assigned to the real-typed `width`);
width is already handled by Layout.fillWidth.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.

Restart / Shut Down do nothing (or fire with no confirmation): use LogoutPrompt instead of /sbin/reboot & /sbin/shutdown

1 participant