Peppermint | Linux OS Community Forum
 
It is currently Sun Sep 15, 2019 6:46 pm

All times are UTC - 5 hours [ DST ]





Post new topic Reply to topic  [ 14 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Hide Suspend and hibernate options [SOLVED]
PostPosted: Fri Mar 21, 2014 10:34 pm 
Offline

Joined: Fri Mar 21, 2014 10:18 pm
Posts: 6
Hi there,

I'm running Peppermint55 and the suspend option was about to break my hard disk. When selected, it turns off my computer and instantly back on.
I'm not really looking to make it work as I don't usually use suspend.. I'm just trying now to remove it from the power off menu.
I tried suggestions using xfconf but nothing seems to work.
xfconf-query -c xfce4-session -np '/shutdown/ShowSuspend' -t 'bool' -s 'false'
xfconf-query -c xfce4-session -p /shutdown/ShowSuspend --create --set false --type bool

Any idea how to remove the suspend from the power off menu?

BR


Last edited by ayakout on Tue Mar 25, 2014 5:35 pm, edited 1 time in total.

Top
 Profile  
 
 

 Post subject: Re: Hide Suspend and hibernate options
PostPosted: Sat Mar 22, 2014 7:24 am 
Offline
User avatar

Joined: Tue Sep 27, 2011 12:15 am
Posts: 940
Location: Lake Gaston NC
I'm assuming that Peppermint55 is a typo and also that you're running PeppermintOS 4. If that is, indeed, the case...

Try running the following command...
Code:
sudo gedit /usr/share/polkit-1/actions/org.freedesktop.upower.policy

Find the following entry (it will appear twice)...

systemet i vänteläge</message>
<defaults>
<allow_inactive>no</allow_inactive>
<allow_active>yes</allow_active>
</defaults>
</action>


Change yes to no in both instances, i.e....
change
Code:
<allow_active>yes</allow_active>

to read
Code:
<allow_active>no</allow_active>


Save the changes, exit gedit, reboot.
I'm not sure, however, if it will survive an update.

_________________
Peppermint: Standing Out from the Cloud
Reg. Linux User #432835
http://peppermintos.com/guide/
viewforum.php?f=5
viewforum.php?f=44


Top
 Profile  
 
 Post subject: Re: Hide Suspend and hibernate options
PostPosted: Sat Mar 22, 2014 9:19 am 
Offline

Joined: Fri Mar 21, 2014 10:18 pm
Posts: 6
Hi

I did the change exactly as you mentioned

<defaults>
<allow_inactive>no</allow_inactive>
<allow_active>no</allow_active>
</defaults>

I rebooted my computer but still see "Suspend/Hibernate" in the "Logout" menu

Image
jpg images


Top
 Profile  
 
 Post subject: Re: Hide Suspend and hibernate options
PostPosted: Sat Mar 22, 2014 9:28 am 
Offline
User avatar

Joined: Tue Sep 27, 2011 12:15 am
Posts: 940
Location: Lake Gaston NC
Does it still work?

_________________
Peppermint: Standing Out from the Cloud
Reg. Linux User #432835
http://peppermintos.com/guide/
viewforum.php?f=5
viewforum.php?f=44


Top
 Profile  
 
 Post subject: Re: Hide Suspend and hibernate options
PostPosted: Sat Mar 22, 2014 9:38 am 
Offline

Joined: Fri Mar 21, 2014 10:18 pm
Posts: 6
I'm afraid to click on it.. last time I did so, my computer switched off and on instantly...
The fan went crazy high and I thought that the disks were damaged,


Top
 Profile  
 
 Post subject: Re: Hide Suspend and hibernate options
PostPosted: Sat Mar 22, 2014 11:00 am 
Offline
User avatar

Joined: Tue Sep 27, 2011 12:15 am
Posts: 940
Location: Lake Gaston NC
Suspend should be disabled but there's no guarantee so don't try it if you feel uneasy about it. I know no way of removing buttons in the logout menu but I'll look around a bit and see what I can find. I'll get back to you but it may be a while. How does your computer behave if you use the other buttons, say, Reboot or Shutdown?

_________________
Peppermint: Standing Out from the Cloud
Reg. Linux User #432835
http://peppermintos.com/guide/
viewforum.php?f=5
viewforum.php?f=44


Top
 Profile  
 
 Post subject: Re: Hide Suspend and hibernate options
PostPosted: Sat Mar 22, 2014 11:16 am 
Offline

Joined: Fri Mar 21, 2014 10:18 pm
Posts: 6
I found this topic viewtopic.php?f=8&t=5375
It seems that there is no easy way...

I can shutdown normally.. no issues. Its just the Suspend that wants to break my computer :)


Top
 Profile  
 
 Post subject: Re: Hide Suspend and hibernate options
PostPosted: Sat Mar 22, 2014 1:26 pm 
Offline
User avatar

Joined: Tue Sep 27, 2011 12:15 am
Posts: 940
Location: Lake Gaston NC
Sorry ayakout, I've looked everywhere I know to look and tried several different approaches but cannot for the life of me get anything to work. I believe PCNetSpec is right (he most often is)....
PCNetSpec wrote:
...lxsession-logout is a binary executable with no config file .. so without rewriting the lxsession-logout application this can't be done...

I'll keep an eye out for anything that looks promising and will let you know in the unlikely event that I actually find something.

Meanwhile, welcome to the forum! :D

_________________
Peppermint: Standing Out from the Cloud
Reg. Linux User #432835
http://peppermintos.com/guide/
viewforum.php?f=5
viewforum.php?f=44


Top
 Profile  
 
 Post subject: Re: Hide Suspend and hibernate options
PostPosted: Sat Mar 22, 2014 7:05 pm 
Offline
User avatar

Joined: Tue Apr 17, 2012 12:25 pm
Posts: 5521
Location: Cornwall, England
I guess the easiest way to break suspend and hibernate would probably be to rename both

/usr/sbin/pm-suspend
and
/usr/sbin/pm-suspend

or maybe to uninstall pm-utils (which will also uninstall xfce4-power-manager)

Neither of the above will remove them from the lxsession-logout menu, but it should break them.

=======================================================

Can I ask that you not post oversized images in any forum other than the "Artwork"
forum it makes navigating the topic rather difficult

Thanks in advance :)

_________________
Please be sure to sign up to the new Peppermint forum and post any new question there .. this forum will be made read-only on the 1st April 2014

You can read the announcement here:
http://peppermintos.net/viewtopic.php?f=6&t=6608
Or here's a direct link to the new forum:
http://forum.peppermintos.com


Top
 Profile  
 
 Post subject: Re: Hide Suspend and hibernate options
PostPosted: Mon Mar 24, 2014 12:31 pm 
Offline

Joined: Fri Mar 21, 2014 10:18 pm
Posts: 6
Hi

I thought that the picture would look nice... May be I should have re-sized it.

I have tried both solutions and they do enough..
The Suspend button still appears on the menu but its not functioning.. it says "not authorized" when selected
and thats because of modifying the xml actions.

Code:
sudo sed -i 's/yes/no/' /usr/share/polkit-1/actions/org.freedesktop.upower.policy


I did also remove the executable bit from the power script /usr/lib/pm-utils/bin/pm-action which is pointed by pm-suspend
That gives error can't execute when selecting Suspend from the menu..

Code:
sudo chmod -x /usr/lib/pm-utils/bin/pm-action


Thanks guys.. I'm feeling safe now.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 14 posts ]  Go to page 1, 2  Next

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

Powered by php B.B. © 2000, 2002, 2005, 2007 php B.B. Group
Template made by DEVPPL