[Sussex] Shutting down from X

Thomas Adam thomas at edulinux.homeunix.org
Wed Nov 10 17:49:45 UTC 2004


On Wed, Nov 10, 2004 at 05:20:39PM +0000, Matthew Macdonald-Wallace wrote:
> ok, I now have a wonderful system that boots into X and launches mysql,
> gpsd and gpsdrive automatically (thatnks geoff, thomas and others, but
> mainly thomas...</grovel>)
>
> I now would like to shutdown the system after I exit X.

Assuming your window manager was "fvwm". In your ~/.xinitrc file, you
might have a line:

exec fvwm

The exec simply replaces the current PID with the fvwm process. What
you therefore want is:

fvwm
shutdown -h now

Removing the "exec" word and replacing the remaining command after it
ensure it will run. Note also that using sudo to allow non-root users to
shut the machine down is overkill. See "man shutdown" and in particular
"/etc/shutdown.allow".

-- Thomas Adam

-- 
I know nothing, and understand even less.




More information about the Sussex mailing list