How to remove the Shutdown entry from the System menu

Hi all,

I am using Ubuntu Mate on an X2Go Terminal Server and I want to disable the shutdown entry in the system menu for all users of the terminal server. This cannot be done through the menu editor. Does anyone know how to achieve this.

Thanks for any hints.

Not sure if this is the best way to do it, but:
Launch dconf editor, then navigate to org -> mate -> desktop -> lockdown, and check "Disable Logout".

If you're a command-line enthusiast:

gsettings set org.mate.lockdown disable-log-out true

Cheers

Edit: most definitely not the best way to do it since it doesn't prevent users from simply reactivating the thing by typing the same command with "false" instead of "true"

2 Likes

Hi @umoser,

right click the power button in the top right panel, unlock it and then "Remove From Panel":

OK so I spent some more time rooting around the question, and after reading this, wondering why in the hell it didn’t work, searching some more, and rebooting 25 times, I finally found something that works, but it’s kind of ugly.

Here’sthething:

  • Open the file /usr/share/polkit-1/actions/org.freedesktop.login1.policy with admin privilege (I recommend a graphical editor, see second step for why)
  • Edit the lines (I’m not kidding) 658, 709, 811, 862, 964, 1014, 1116 and 1166, replacing “yes” with “no”