How to shutdown on app close

Florian Diesch diesch at spamfence.net
Fri Jul 24 16:51:28 UTC 2009


Liam Proven <lproven at gmail.com> writes:

> I'm setting up an Ubuntu box which will run a single full-screen app,
> all the time, and nothing else. I have set it up to automatically log
> in and then automatically start the app, but I am missing one step,
> the final one.
>
> When the user quits the app, I want the machine to shut down.
>
> Is there a straightforward way to accomplish this?
>
> All I could think of was that rather than run my app, I'd run a
> script, and the next line would say "shutdown now" or "telinit 0". The
> snag is, I think that requires root privileges & I don't want them to
> have to enter a password just to quit!

See <https://help.ubuntu.com/community/Sudoers> for how to configure
sudo to not require a password.



   Florian
-- 
<http://www.florian-diesch.de/>




More information about the ubuntu-users mailing list