How to shutdown on app close

Liam Proven lproven at gmail.com
Fri Jul 24 16:04:28 UTC 2009


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!

-- 
Liam Proven • Profile: http://www.linkedin.com/in/liamproven
Email: lproven at cix.co.uk • GMail/GoogleTalk/Orkut: lproven at gmail.com
Tel: +44 20-8685-0498 • Cell: +44 7939-087884 • Fax: + 44 870-9151419
AOL/AIM/iChat/Yahoo/Skype: liamproven • LiveJournal/Twitter: lproven
MSN: lproven at hotmail.com • ICQ: 73187508




More information about the ubuntu-users mailing list