Is it possible to disable / hide the suspend option in the shutdown dialog?


#1

Hello,
I would like to disable or hide the "Suspend" option from the shutdown menu that appears when you choose the shutdown option. The menu I'm talking about is this one:
shutdown_menu

I've found a possible way to achieve it on the Internet, by creating the /etc/polkit-1/localauthority/90-mandatory.d/disable-suspend.pkla file with the following content:

[Disable suspend (upower)]
Identity=unix-user:*
Action=org.freedesktop.upower.suspend
ResultActive=no
ResultInactive=no
ResultAny=no

[Disable suspend (logind)]
Identity=unix-user:*
Action=org.freedesktop.login1.suspend
ResultActive=no

[Disable suspend for all sessions (logind)]
Identity=unix-user:*
Action=org.freedesktop.login1.suspend-multiple-sessions
ResultActive=no

However, I would like to know if this also applies Ubuntu MATE before proceeding. If it doesn't, how could I remove the option from the menu?

Thanks in advance.


#2

I just tried it in a VM I'm using for testing stuff and it works on 19.04.


#3

It works in Ubuntu MATE 18.04.2 LTS too, which is the version I have installed (I forgot to mention it).

Thanks for testing it, @ouroumov .