How to suppress or disable the shutdown option from indicator menu or shutdown dialog?
Posted
by
user73093
on Ask Ubuntu
See other posts from Ask Ubuntu
or by user73093
Published on 2012-10-01T10:04:00Z
Indexed on
2012/10/02
21:51 UTC
Read the original article
Hit count: 280
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 !
© Ask Ubuntu or respective owner