How to remove the "shutdown, hibernate and suspend" options shown in the KDE start menu ?
Environment
- Red Hat Enterprise Linux 6
- KDE
Issue
- In RHEL6, the shutdown, hibernate and suspend options are shown in the KDE Kickoff menu.
- We don't want normal users to be able to shutdown this servers. How can we remove these options from KDE start menu ?
- How to customize KDE Kickoff menu?
- How to switch off, globally, the ability to suspend the OS from the
"kickoff"->"Leave"menu?
Resolution
-
Below mentioned steps can be used to disable shutdown, hibernate and suspend options that are shown in the KDE start menu.
To Disable Shutdown and Restart options:
- Open
System Settings-> click onadvanced tab-> Click onsession manager-> Uncheck"Offer shutdown options"
To disable hibernate and suspend options:
- Edit
/usr/bin/pm-is-supportedscript and comment all lines. After that add "exit 1" at the end of that file.
Eg:
#!/bin/sh #. "/usr/lib64/pm-utils/pm-functions" #help_options() #{ # echo "pm-is-supported [--suspend | --hibernate | --suspend-hybrid ]" # echo #} # #ARG="$(echo ${1#--}|tr - _)" # #case "$ARG" in # suspend|hibernate|suspend_hybrid) # "check_$ARG" ;; # help) help_options ;; # *) help_options 1>&2 # exit 1 ;; exit 1- Then reboot the system to apply changes.
- Open
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
