Welcome!

Please read this important information about Spectre and Meltdown vulnerabilities.
Please read this important information about MX sources lists.
News
  • MX Linux on social media: here
  • Mepis support still here
Current releases
  • MX-17 Final release info here
  • MX-16.1 release info here
  • antiX-17 release info here
    New users
    • Please read this first, and don't forget to add system and hardware information to posts!
    • Read Forum Rules

How to remove Suspend or Hibernate or both from KDE kicker

Here you can exchange scripts that you created or have permission to share with other users.
Message
Author
User avatar
GDixon
Forum Regular
Forum Regular
Posts: 358
Joined: Fri Nov 02, 2007 4:39 pm

How to remove Suspend or Hibernate or both from KDE kicker

#1 Postby GDixon » Mon Jul 21, 2014 7:12 pm

After changing many scripts I finally found the right one to modify.

You can remove both Suspend and Hibernate or just what you don't want showing on the KDE kicker menu.
I use Suspend (to ram) but not Hibernate due to my hard drive being a ssd for example.
Edit the script below

/etc/bin/pm-is-supported

Code: Select all

#!/bin/sh
#
# Copyright 2007 Red Hat, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of version 2 of the GNU General Public License as
# published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
#



####### MAKE SURE YOU BACK UP THE ORIGINAL SCRIPT FOR THE FUTURE #######

. "/usr/lib/pm-utils/pm-functions"

help_options()

# EDIT OUT WHAT YOU DO NOT WANT ON THE MENU BELOW, FOR EXAMPLE I DELETED ALL
# BUT SUSPEND SINCE I HAVE A SSD----IT LOOKED LIKE THE LINE BELOW ORIGINALLY
# echo "pm-is-supported [--suspend | --hibernate | --suspend-hybrid ]"
# REBOOT AFTER YOUR DONE FOR THE CHANGES TO SHOW

{
   echo "pm-is-supported [--suspend ]" # CHANGES MADE TO THIS LINE FOR SUSPEND ONLY
   echo
}

ARG="$(echo ${1#--}|tr - _)"

case "$ARG" in
   suspend)                               # ALSO CHANGED HERE
      "check_$ARG" ;;
   help)    help_options ;;
   *)    help_options 1>&2
      exit 1 ;;
esac

Return to “Scripts”

Who is online

Users browsing this forum: No registered users and 1 guest