LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Bodhi
User Name
Password
Bodhi This forum is for the discussion of Bodhi Linux.

Notices


Reply
  Search this Thread
Old 04-22-2019, 01:35 PM   #1
r0bur
LQ Newbie
 
Registered: Jun 2018
Posts: 24

Rep: Reputation: Disabled
Moksha DE - How to disable menu items "System-Suspend" and "System-Hibernate"?


How to disable menu items "System-Suspend" and "System-Hibernate"?
 
Old 04-22-2019, 01:58 PM   #2
the_waiter
Bodhi Developer
 
Registered: Jun 2018
Location: Banská Bystrica, Slovakia
Distribution: Bodhi Linux
Posts: 403

Rep: Reputation: 363Reputation: 363Reputation: 363Reputation: 363
Why?
 
Old 04-22-2019, 02:04 PM   #3
r0bur
LQ Newbie
 
Registered: Jun 2018
Posts: 24

Original Poster
Rep: Reputation: Disabled
The system doesn't return from the sleeping mode. This is not Bodhi only issue. Windows has the same behaviour.
And existing menu items are eventually pressed...
 
Old 04-22-2019, 02:12 PM   #4
the_waiter
Bodhi Developer
 
Registered: Jun 2018
Location: Banská Bystrica, Slovakia
Distribution: Bodhi Linux
Posts: 403

Rep: Reputation: 363Reputation: 363Reputation: 363Reputation: 363
It is not possible for a common user. There is no feature to disable it. You have to get rid it from the code, recompile and install. Honestly, I don't know any desktop where you can disable it.

So try not to pressing it I don't know which items you use but try to use Power off button for shutting system down instead of going through the menu.

Stefan

EDIT: pressing the last item "system" in the main menu will bring GUI with buttons for items which are also in the menu. Maybe more suitable for you...

Last edited by the_waiter; 04-22-2019 at 02:14 PM.
 
Old 04-22-2019, 02:49 PM   #5
enigma9o7
Member
 
Registered: Jul 2018
Location: Silicon Valley
Distribution: Bodhi 5 (Ubuntu 18.04)
Posts: 232

Rep: Reputation: Disabled
Random idea. In my experience, I don't really use the start menu on a daily basis, only when I need settings or an app I don't use regularly, as my daily use apps I have on the ibar and my occasionally used apps are in my favorites menu, and I shutdown from the shutdown shelf icon.

If you were in my position and wanted to get rid of them from the shelf power button (not the menu), you could make your own shutdown button and put it on the ibar, link it to shutdown now command...

Then you could even take the start menu off the shelf.

(Of course, someone could still suspend/hibernate with a mouse even after all that, by pulling up start menu from blank desktop click...)

Seems better to just not click it! But - maybe there is a way to make it non-functional without messing with source... I'm only guessing here, but maybe there is a bin that is called when you select hibernate or suspend. Maybe you could just delete that bin, then you'd probably get an error message, but at least wouldn't get into the state you're trying to avoid - on my athlon if I try to hibernate it hangs forever until I power cycle, and it'll boot slower saying something about attempting to resume or something for a while bewfore it gives up, so if my kids were doing it accidentally or something I might try something like that...
 
1 members found this post helpful.
Old 04-22-2019, 03:17 PM   #6
the_waiter
Bodhi Developer
 
Registered: Jun 2018
Location: Banská Bystrica, Slovakia
Distribution: Bodhi Linux
Posts: 403

Rep: Reputation: 363Reputation: 363Reputation: 363Reputation: 363
Yes, I must confess it is doable with some effort

Maybe this will help (maybe obsolete article):
https://sites.google.com/site/easyti...te-and-suspend

Last edited by the_waiter; 04-22-2019 at 03:18 PM.
 
1 members found this post helpful.
Old 04-22-2019, 11:56 PM   #7
r0bur
LQ Newbie
 
Registered: Jun 2018
Posts: 24

Original Poster
Rep: Reputation: Disabled
enigma9o7,the_waiter - thank you for the recommendations!
I'll try them and will write the result later.
 
Old 04-24-2019, 01:19 AM   #8
r0bur
LQ Newbie
 
Registered: Jun 2018
Posts: 24

Original Poster
Rep: Reputation: Disabled
The most preferable way with polkit rules doesn't work for me. The sample file contains action "org.freedesktop.upower.suspend", but Bodhi doesn't have one:
Code:
$ pkaction | grep suspend
org.freedesktop.login1.inhibit-handle-suspend-key
org.freedesktop.login1.suspend
org.freedesktop.login1.suspend-ignore-inhibit
org.freedesktop.login1.suspend-multiple-sessions
The other rules give no effect.
 
Old 04-24-2019, 01:42 AM   #9
r0bur
LQ Newbie
 
Registered: Jun 2018
Posts: 24

Original Poster
Rep: Reputation: Disabled
The correct solution for Bodhi is to disable two lines in the configuration file /etc/enlightenment/sysactions.conf:
Code:
. . .
#action: suspend sudo pm-suspend
#action: hibernate sudo pm-hibernate
. . .
After doing this the menu items "Suspend" and "Hibernate" become grayed. This is exactly what I need.
 
4 members found this post helpful.
Old 04-24-2019, 02:35 AM   #10
the_waiter
Bodhi Developer
 
Registered: Jun 2018
Location: Banská Bystrica, Slovakia
Distribution: Bodhi Linux
Posts: 403

Rep: Reputation: 363Reputation: 363Reputation: 363Reputation: 363
Interesting info

THX
 
1 members found this post helpful.
Old 04-24-2019, 11:30 AM   #11
enigma9o7
Member
 
Registered: Jul 2018
Location: Silicon Valley
Distribution: Bodhi 5 (Ubuntu 18.04)
Posts: 232

Rep: Reputation: Disabled
Good info r0bur, that's probably a lot better idea than deleting /usr/sbin/pm-suspend and /usr/sbin/pm-hibernate as I was implying! I'm going to apply your solution on my athlon since they don't function that machine anyway.

Just curious how you figured it out, as you were the original one with the question in the first place... not important tho.

Last edited by enigma9o7; 04-24-2019 at 11:31 AM.
 
2 members found this post helpful.
Old 04-24-2019, 01:33 PM   #12
the_waiter
Bodhi Developer
 
Registered: Jun 2018
Location: Banská Bystrica, Slovakia
Distribution: Bodhi Linux
Posts: 403

Rep: Reputation: 363Reputation: 363Reputation: 363Reputation: 363
Yes, very advanced and elegant solution.

Hmmm: moment, I can not find /etc/enlightenment/sysactions.conf file

EDIT: OK, I have found it in /usr/etc/enlightenment/, probably because I installed moksha from source due the development purpose

Last edited by the_waiter; 04-24-2019 at 01:43 PM.
 
1 members found this post helpful.
Old 04-24-2019, 06:18 PM   #13
crajor
LQ Newbie
 
Registered: Mar 2019
Location: Akron, Ohio
Distribution: bodhi linux
Posts: 27

Rep: Reputation: Disabled
Great info

After reading this thread, I took upon myself to edit sysactions.conf according to instructions and
can say that it works exactly as claimed. I have no real need for hibernate or suspend, either. And if I should
discover a need in future, (unlikely) I can always reverse the edits in the file. Simple effective solution!
Thanks so much for the info.
 
2 members found this post helpful.
  


Reply

Tags
bodhi, desktop environment, menu


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
USB device connection overrides Moksha DE's lock screen (Bodhi 4.5.0, Moksha 0.2.1) Kazuhira_x3 Bodhi 1 11-08-2018 02:54 AM
BLFS 7.9 Plasma 5 brightness control and suspend/hibernate menu entries absent ordealbyfire83 Linux From Scratch 3 01-17-2017 09:58 AM
remove "Suspend" and "Hibernate" from the "Shut Down" applet cccc Debian 2 05-02-2011 10:05 AM
Disable suspend/sleep/hibernate/whatever-you-call-it arizonagroovejet Linux - General 4 02-06-2009 04:33 AM
Disable hibernate / suspend on desktop Dell Inspiron 531s bcarl314 Mandriva 2 09-04-2007 10:48 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Bodhi

All times are GMT -5. The time now is 05:38 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration