How to suppress or disable the shutdown option from indicator menu or shutdown dialog?
- by user73093
My goal is to allow user only to restart the system, and deny any shutdown (suspend, hibernate). I am running unity-2d.
I 've managed to deny suspend and hibernate with polkit policy files like explained in How to disable shutdown/reboot/suspend/hibernate?
I observed that is has somehow disable shutdown abilities, but hasn't removed "shutdown" entry from the indicator panel menu neither as well as the "shutdown..." button from the shutdown dialog. Pressing shutdown button at this point restarts lightdm, returning to the login screen.
My goal is to remove any "shutdown" action and button.
So, I 've added an ovveride file in /usr/share/glib-2.0/schemas that contains some rules:
[com.canonical.indicator.session]
suppress-shutdown-menuitem = true
(all suppress-*-menuitem has "false" value by default in the schema)
Compiling, restarting X, now there is an entry "close session..." in the indicator panel menu...: it's not what I want.
at this point, if I set another entry suppress-logout-menuitem to true I got no entry in the indicator panel menu.
Trying like this all combination doesn't give the opportunity to remove "shutdown" references/buttons without removing restart option.
All I want is to remove any reference to "shutdown" but keep a "restart" option somewhere in the indicator menu...
Thanks !