Kodi Community Forum

Full Version: [atv1][linux]How to reboot, shutdown within xbmc
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I have installed Ubuntu Linux on Apple tv1 using this thread.
I have done this on 2 separate ATV1's (actually 3 installs as I messed up my sudoers file and well... thats another story)

Both ATV1's to automatically start XBMC and I can watch all of my content in without problems. It is, however, when I choose to exit XBMC in some manner that I have a problem. I can just exit XBMC and get to a command prompt. But when I choose SHUTDOWN, or REBOOT, it gets out to a command prompt that appears frozen until I hit return on the keyboard which will shows something like:
[done] startx && clear
*I am at work so I cannot see the actual message but that is really close

I tried to modify my .xsession to include "sudo reboot" but it is ingnored
*reference link
*I added xbmc to sudoers to allow all commands - so as xbmc command line I can successfully "sudo reboot" and that works

Does anyone know how to get shutdown, reboot to work on APPLE TV 1 running Linux?

Thanks in advance
I did the following with NO change in results

(reference)
XBMC will need to control power settings of the computer:

sudo apt-get install pm-utils policykit

And give your user access to these power features:

sudo polkit-auth --user xbmc --grant org.freedesktop.hal.power-management.suspend
sudo polkit-auth --user xbmc --grant org.freedesktop.hal.power-management.hibernate
sudo polkit-auth --user xbmc --grant org.freedesktop.hal.power-management.reboot
sudo polkit-auth --user xbmc --grant org.freedesktop.hal.power-management.shutdown
sudo polkit-auth --user xbmc --grant org.freedesktop.hal.power-management.reboot-multiple-sessions
sudo polkit-auth --user xbmc --grant org.freedesktop.hal.power-management.shutdown-multiple-sessions



Anyone have this working?
atari800 Wrote:so as xbmc command line I can successfully "sudo reboot" and that works


Can you do it without entering xbmc's password?
First...Thanks for a response!!!

but yes, as xbmc user I can execute:
sudo reboot {enter}
and not get prompted for a password and it does shutdown and restart the machine
How is XBMC xbmc being launched?
You need to install hal
Code:
sudo apt-get install hal
and edit your /etc/PolicyKit/PolicyKit.conf file. It should look something like this if the users name is xbmc
Code:
<config version="0.1">
    <match user="root">
        <return result="yes"/>
    </match>
    <match user="xbmc">
        <return result="yes"/>
    </match>
    <define_admin_auth group="admin"/>
</config>

If your going to be running hardy have you looked at crystalbuntu its what you've already done but without the hard work plus some performance tweaks as well. And the big plus is that its constantly being updated so when it comes time to update xbmc it will all be done for you no need to build xbmc for source and playing around with missing dependancies.
I think it may have something to do with
Code:
clear && startx -- -br & >/dev/null

What does 'ck-list-sessions' return? See what is-local returns.

http://forum.xbmc.org/showpost.php?p=804...stcount=52
Change:
Code:
startx -- -br > /dev/null 2>&1
to
Code:
startx > /dev/null 2>&1
@DV3B - That did it. Thank you. I look into crystalubuntu
@darkscout - thank you for jumping in so quick and helping me out
scratch that....
I did a successful reboot from xbmc
Then I did a halt (shutdown) from xbmc and now I cannot boot up
I got the penguin sitting on apple tv box logo and no activity
*except flashing yellow light on apple tv box itself
unscratch that...
I booted into NORMAL Apple TV OS...which asked for what language to use (like 1st time setting it up)
it restarted normally
Then I plugged back in USB drive and started apple tv (power on) and all is normal.
I guess a halt must dink something up somewhere

anyways - thanks again