GNOME Bugzilla – Bug 684118
Allow disable-logout without disabling Power Off
Last modified: 2021-07-05 14:29:44 UTC
For the Ubuntu GNOME Remix live environment, we set org.gnome.desktop.lockdown disable-log-out since it doesn't make sense for the live user to log out. But this also disables the Power Off option in the user menu which is not wanted since the user should be able to turn off or restart the computer. By the way, Unity has these schemas under com.canonical.indicator.session: - suppress-logout-menuitem - suppress-logout-restart-shutdown (This just disables the confirmation dialogs) - suppress-restart-menuitem - suppress-shutdown-menuitem What should happen: disable-log-out shouldn't affect Power Off. Maybe you'll want to add a disable-power-off schema for those that want that option too.
This seems like it's a Shell bug. Punting to gnome-shell.
Seems to have been introduced in https://bugzilla.gnome.org/show_bug.cgi?id=652038 without discussion. Florian could reply better here.
Created attachment 224432 [details] [review] the lockdown is set in gnome-session manager, and needs to be seperated there. gsm: seperate lockdown settings for log-out and shutdown Setting lockdown disable-log-out also disables power-off. In some cases such as liveCD sessions, it would be useful to disable log-out only.
Created attachment 224433 [details] [review] add a new key in the lockdown schema Schemas: add a seperate lockdown key, for power-off Setting lockdown disable-log-out also disables power-off. In some cases such as liveCD sessions, it would be useful to disable log-out only.
Created attachment 224434 [details] [review] userMenu: seperate lockdown settings for log-out and shutdown update the usermenu to make use of seperate lockdown setting for disable-power-off
Review of attachment 224433 [details] [review]: ::: schemas/org.gnome.desktop.lockdown.gschema.xml.in.in @@ +60,3 @@ <_summary>Disable log out</_summary> <_description> + Prevent the user to shutdown. umm
Created attachment 224435 [details] [review] Schemas: add a new lockdown key, disable-power-off Adds a new lockdown key to prevent users from shutting down the system. Previously this was bundled in with the disable-log-out setting. In some cases such as liveCD sessions, it would be useful to disable log-out only, but still allow the user to shutdown the system.
Created attachment 224436 [details] [review] Schemas: add a new lockdown key, disable-power-off Adds a new lockdown key to prevent users from shutting down the system. Previously this was bundled in with the disable-log-out setting. In some cases such as liveCD sessions, it would be useful to disable log-out only, but still allow the user to shutdown the system.
(In reply to comment #0) > For the Ubuntu GNOME Remix live environment, we set org.gnome.desktop.lockdown > disable-log-out since it doesn't make sense for the live user to log out. But > this also disables the Power Off option in the user menu [...] Yes. The lockdown setting is disable-log-out, not hide-log-out - it is about not allowing the user to end the session, which both "Log Out" and "Power Off" do. I certainly agree that log out does not make sense for a live CD session, which is why "Log Out" is supposed to be hidden in that case(*) without abusing lockdown (see bug 675802). If it is not working as expected, that's the bug to be fixed (in gnome-shell, accountsservice or libgdm). (*) well, the actual criteria for hiding the item is the system having only a single user and not more than one session, but that should really cover any common live CD uses
No, that doesn't quite cover it as we have both GNOME and GNOME Classic sessions on the disk.
In that case, log out _does_ make some sense (to switch sessions)...
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org. As part of that, we are mass-closing older open tickets in bugzilla.gnome.org which have not seen updates for a longer time (resources are unfortunately quite limited so not every ticket can get handled). If you can still reproduce the situation described in this ticket in a recent and supported software version, then please follow https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines and create a new ticket at https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/ Thank you for your understanding and your help.