How to disable the hibernate and suspend buttons in KDE

Description:

The suspend and hibernate features of Linux can be unreliable. To prevent this feature from being used accidentally, the suspend and hibernate buttons can be disabled in KDE.

Tested Distributions:

Instructions:

As root:

  1. Make a backup copy of /usr/bin/pm-is-supported
    # mv /usr/bin/pm-is-supported /usr/bin/pm-is-supported.orig
    
  2. Create a new /usr/bin/pm-is-supported
    # echo "exit 1" > /usr/bin/pm-is-supported
    # chmod +x /usr/bin/pm-is-supported
    
  3. Reboot the system

The next time Shut Down is selected from the menu, these options will no longer be present.