You are not logged in.

#1 2010-01-25 12:46:53

stiffy420
Member
Registered: 2009-12-11
Posts: 99

Keybinds

Hello everybody!

Im using keybinds in openbox to shutdown the computer with the On/Off button with the command "sudo halt". Im also using the command "sudo vbetool dpms off/on" to turn off the screen. But this creates a problem for me. If the sudo password has expired the computer will get unresponsive and i have to force shutdown.

My solution so far is to set the sudo timeout to 999min. doesnt feel like a good solution, so please help me out!

is there any other shutdown command that doesnt requires sudo?

Offline

#2 2010-01-25 12:55:27

foret
Member
Registered: 2010-01-25
Posts: 12

Re: Keybinds

Have 2 ideas:
1. change permission to halt program
2. i think that sudo, and it's config file /etc/sudoers allow you to do sudo without password in some configurations. It can be done for groups or for users.

Offline

#3 2010-01-25 13:15:29

bernarcher
Forum Fellow
From: Germany
Registered: 2009-02-17
Posts: 2,281

Re: Keybinds

Putting these lines into /etc/sudoers should help:

<user>      ALL=NOPASSWD: /sbin/reboot
<user>      ALL=NOPASSWD: /sbin/halt

where <user> is your user id.


To know or not to know ...
... the questions remain forever.

Offline

#4 2010-01-25 14:36:15

stiffy420
Member
Registered: 2009-12-11
Posts: 99

Re: Keybinds

bernarcher wrote:

Putting these lines into /etc/sudoers should help:

<user>      ALL=NOPASSWD: /sbin/reboot
<user>      ALL=NOPASSWD: /sbin/halt

where <user> is your user id.

Thanks! i was looking for just that. any suggestions how to go around the vbetool command? or should i just settle with closing the lid?

Offline

Board footer

Powered by FluxBB