[plug] Shutdown on X exit

Craig Ringer craig at postnewspapers.com.au
Mon Dec 16 14:20:17 WST 2002


> How can I set up a debian box to shutdown when qvwm exits? It is going 
> to have auto login. 

Not particularly easily.

Perhaps instead of having qvwm exit and expect [QKX]DM to notice you 
could have the user run a "shutdown" command from the qvwm menu instead 
of "logout"? Just install sudo, and have a little script called by the 
command:

#!/bin/bash
sudo /sbin/shutdown

and configure your sudoers file to have:

Cmnd_Alias SHUTDOWN = /sbin/shutdown
username	ALL = NOPASSWD: SHUTDOWN

so that sudo doesn't require a password to halt the machine but won't 
let them do anything else.

Also how do  I change the default display manager?
> (KDM, GDM, ...)

just install only the one you want to use; debian will make the required 
changes automatically. Eg dpkg --purge gdm ; apt-get install kdm . 
Alternately you can edit the /etc/rc2.d/ symlinks to disable loading of 
all but the one you want.




More information about the plug mailing list