XBMCbuntu: How to Automatically Shutdown your PC Tips, Tricks and Tutorials 03 JUL 2014

Because XBMCbuntu is essentially a light-weight Ubuntu install configured to run XBMC at startup, you have access to most of the basic commands that a normal Ubuntu box would have. In other words, you have access to all the normal niceties of Ubuntu – like the crontab, the perfect way of scheduling an automatic shutdown of your XBMC media server. You know, because a) you like the idea of saving electricity, or b) your old hardware powering your media server is a little… well noisy.

Anyway, bring up a terminal by pressing ALT+CTRL+F1. Your login details will be those that you setup during install. If you don’t have those on hand, then you could try the default XMBC root user which has the details of username=’xbmc’ and password=” (blank).

Now to edit the crontab (as sudo of course) to set up our scheduled task:

sudo crontab -e

Add the shutdown rule as follows. In this case, it is set to run the shutdown command every evening at 1 o’clock in the morning – everyone should be asleep by then, movie nights done and dusted for sure! (Obviously you can set whatever times you want, play around a little if you must.)

0 1 * * * /sbin/shutdown -P now

Save the crontab and on exit of the editor, you should see the line saying “Installing new crontab”. You can obviously test the command yourself right then and there by running:

sudo /sbin/shutdown -P now

Although this will of course shutdown your machine. If you just want to jump back to XBMC, hit ALT+CTRL+F7.

A useful tip if your small child isn’t quite capable of controlling XBMC just yet! :)


Related Link: http://wiki.xbmc.org/?title=XBMCbuntu

Related Posts:

About Craig Lotter

Software developer, husband and dad to two little girls. Writer behind An Exploring South African. I don't have time for myself any more.