On Mon, 22 Dec 2008 15:31:27 +0100, Gilles <[email protected]> wrote:
> Hello
> 
> I'd like to make it easier for my dad to shutdown a server. Instead of
> having him plug a keyboard, log on as root (with a complicated
> password) and finally type "shutdown -h now", is it possible to assign
> this command to some unused key like eg. Syst? Even better, send this
> command only if the key is hit eg. three times within 2 seconds?

I have a similar setting, but it requires X, WindowMaker and a
Sun Type 6 USB keyboard. :-)

Short explaination: I have assigned the command

        xterm -class SHUTDOWN -fg black -bg red -e "shutdown -p now ; read 
DUMMY"

to the key combination Ctrl+Alt+(I) - the "switch off" or "moon"
key on the top right. This combination is impossible to press
accidentally. (Without Ctrl and Alt, this key closes the X session
and leads back to xdm for login.)

You could add a clickable menu entry or desktop icon with this
command, but make sure it's not accidentally clicked. :-)



If your father is already logged in, he could "shutdown -p now"
(or using an alias) from an xterm. He needs to be in the wheel
(or at least operator?) group for this.



What about pressing the power button on the machine itself, it
should perform a "shutdown -p now" (shut down and power off).



By tht eay, the key you're refering to is named "System Request",
or SysRq.



-- 
Polytropon
>From Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[email protected]"

Reply via email to