Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
non-root software suspend
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
RealityMage
Apprentice
Apprentice


Joined: 15 Dec 2003
Posts: 151

PostPosted: Wed Feb 04, 2004 3:07 am    Post subject: non-root software suspend Reply with quote

Hello,

I finally got software suspend working with the suspend.sh script, but unfortunately, you need to be root to do it. I'd like to give non-root users the ability to suspend w/o having to enter a password.

Using sudo with hibernate does not work. Ideally, there would be a daemon that took requests for hibernation from the user via a hotkey or command, and the daemon suspended the computer. Or just something that would allow user suspending without a (big) security risk.
Back to top
View user's profile Send private message
andyjeffries
Apprentice
Apprentice


Joined: 14 Apr 2004
Posts: 196
Location: Stevenage, Herts, UK

PostPosted: Fri May 14, 2004 10:15 am    Post subject: Reply with quote

I got swsusp working for users with a script I found on this thread, saved as /usr/local/sbin/nice-hibernate and a simple /bin/hibernate script which I have as:

Code:

#!/bin/bash

/usr/bin/zenity --question --title="Hibernate?"

if ["$?" = 0 ] ; then
     sudo /usr/local/sbin/nice-hibernate
else
     echo "Cancelled"
fi


The entry in my /etc/sudoers looks like this:

Code:

%wheel ALL=NOPASSWD:/usr/local/sbin/nice-hibernate


Obviously though you could make up a new group called "hibernate", add the users you want to be able to hibernate the machine to that, then use %hibernate.

I'm new to swsusp so I don't know how much help I'll be tracking it down, but I got it working quite quickly and am willing to help if you have problems.
_________________
Developer of gPHPEdit
A8N-SLI/AMD X2 4800+/2GB Dual Channel/GF 7900GT OC
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
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
You cannot vote in polls in this forum