LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Laptop and Netbook (https://www.linuxquestions.org/questions/linux-laptop-and-netbook-25/)
-   -   How to give user permission to suspend with apm (https://www.linuxquestions.org/questions/linux-laptop-and-netbook-25/how-to-give-user-permission-to-suspend-with-apm-129267/)

Bagleemo 12-27-2003 11:06 AM

How to give user permission to suspend with apm
 
Greetings -

I have Red Hat 9.0 running on my Dell Latitude Laptop. I've worked out most of the bugs except this easy one:

Every time I suspend or standby, I have to open a terminal, log in as root, and then type

apm --suspend

or -- standby.

I'd like to just have those be options in the shutdown dialog, or else buttons / shortcuts in my toolbar. But since root is the only user with permission to do these things, it seems this would be difficult.

Any suggestions?

Thanks,

Amos

burnpile 12-27-2003 12:18 PM

install/configure sudo
add them with no password at the end of the sudoers file using visudo.

thats what i do here with the /sbin/shutdown -h command using apci.

Bagleemo 12-27-2003 01:10 PM

I see... sudo is handy.
 
Hi - Thanks for the tip.

That did in fact work, after finding out how to setup sudo properly.

For the record, I found the program visudo, ran it, and added the following line at the bottom of the file:

username computername = NOPASSWD: /usr/bin/apm

And now I have a simple launcher that just has this command to put my laptop to sleep.

sudo apm --suspend

Thanks for the help!

-Amos


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