Linux HOW-TO make XBMC for Linux auto start on Ubuntu
#59
hitman Wrote:After using the beginning of this post to implement autostarting without a Window Manager the only problem I had was shutting down, I was getting the dreaded dbus permission denied errors.

I tried the various solutions in this thread but they did not work for me. I decided to delve into things a bit more and found a solution that worked for me.

Use the following command to find out which actions are available to the user that runs xbmc (replace <xbmc_user> with the user you autologin and run xbmc with):
Code:
polkit-auth --user <xbmc_user>
I found that I had none on Hardy so and empty list was returned (Intrepid had 1 item not related to power). I then added actions as follows :

Code:
sudo polkit-auth --user <xbmc_user> --grant org.freedesktop.hal.power-management.shutdown

Running polkit-auth --user <xbmc_user> now lists the action, and allows xbmc to shutdown the system. This was persistent across reboots.

I also added the following as I thought they would be useful, unfortunately I couldn't figure out how to add the whole lot so just did them individually:

Code:
sudo polkit-auth --user <xbmc_user> --grant org.freedesktop.hal.power-management.shutdown-multiple-sessions
sudo polkit-auth --user <xbmc_user> --grant org.freedesktop.hal.power-management.reboot
sudo polkit-auth --user <xbmc_user> --grant org.freedesktop.hal.power-management.reboot-multiple-sessions
sudo polkit-auth --user <xbmc_user> --grant org.freedesktop.hal.power-management.set-powersave
sudo polkit-auth --user <xbmc_user> --grant org.freedesktop.hal.power-management.suspend
sudo polkit-auth --user <xbmc_user> --grant org.freedesktop.hal.power-management.hibernate

I also tested the above in Intrepid in a VM and it worked for me there too.

EDIT: In Hardy I also had to comment out a line under "default" policy in /etc/dbus-1/system.d/hal.conf as follows:
Code:
<!--    <deny send_interface="org.freedesktop.Hal.Device.SystemPowerManagement"/> -->
and also changed the policy user from "0" to "<xbmc_user>" in the last section.

Hope this helps.

Hitman

Hitman,

Did you place these lines in the PolicyKit.conf file?

Thanks,

Dave
Reply


Messages In This Thread
[No subject] - by malloc - 2008-10-06, 07:05
[No subject] - by althekiller - 2008-10-06, 07:52
[No subject] - by QuietTime - 2008-10-07, 02:09
[No subject] - by MrCerulean - 2008-10-07, 17:39
[No subject] - by proctor - 2008-10-08, 00:42
[No subject] - by MrCerulean - 2008-10-08, 01:29
[No subject] - by covert - 2008-10-08, 06:41
[No subject] - by Chaos_666 - 2008-10-08, 10:53
[No subject] - by proctor - 2008-10-08, 16:15
[No subject] - by MrCerulean - 2008-10-08, 17:16
[No subject] - by QuietTime - 2008-10-08, 23:57
[No subject] - by covert - 2008-10-09, 02:59
[No subject] - by tomsun - 2008-10-09, 09:53
[No subject] - by onderduiker - 2008-10-09, 17:26
[No subject] - by covert - 2008-10-10, 01:58
[No subject] - by onderduiker - 2008-10-10, 21:46
[No subject] - by Chaos_666 - 2008-10-15, 20:58
selectable at grub? - by zerobravo - 2008-10-26, 18:13
[No subject] - by topfs2 - 2008-10-26, 18:51
[No subject] - by twood - 2008-10-28, 00:04
[No subject] - by topfs2 - 2008-10-28, 08:04
[No subject] - by Chaos_666 - 2008-10-28, 11:11
[No subject] - by twood - 2008-10-28, 11:21
[No subject] - by topfs2 - 2008-10-28, 12:02
[No subject] - by twood - 2008-10-29, 00:23
[No subject] - by Chaos_666 - 2008-10-29, 00:40
[No subject] - by kernel - 2008-10-29, 01:11
[No subject] - by Chaos_666 - 2008-11-03, 19:26
[No subject] - by twood - 2008-11-04, 09:53
[No subject] - by ringgh0st - 2008-11-09, 18:25
[No subject] - by Kryspy - 2008-11-09, 18:40
[No subject] - by Kryspy - 2008-11-11, 15:04
[No subject] - by FoolsRun - 2008-11-11, 17:32
[No subject] - by Kryspy - 2008-11-11, 19:18
[No subject] - by frostwork - 2008-11-11, 23:30
[No subject] - by Kryspy - 2008-11-12, 13:52
[No subject] - by pike - 2008-11-12, 14:30
[No subject] - by frostwork - 2008-11-12, 16:51
Problems - by sexus6 - 2008-11-13, 13:07
[No subject] - by frostwork - 2008-11-13, 13:22
[No subject] - by cejstrup - 2008-11-13, 15:56
[No subject] - by PainToad - 2008-11-16, 13:11
[No subject] - by Morgyn - 2008-11-17, 06:19
[No subject] - by PainToad - 2008-11-18, 13:34
[No subject] - by zyxbox - 2008-11-20, 00:37
[No subject] - by PainToad - 2008-11-21, 04:25
[No subject] - by IG82 - 2008-11-21, 16:33
[No subject] - by IG82 - 2008-11-21, 19:36
[No subject] - by zyxbox - 2008-11-23, 18:13
a couple of notes - by oldnemesis - 2008-11-27, 11:24
[No subject] - by Gurney - 2008-11-30, 10:49
[No subject] - by gilgongo - 2008-12-11, 23:25
[No subject] - by delneet - 2009-01-03, 15:34
[No subject] - by hitman - 2009-01-05, 11:22
[No subject] - by rodercot - 2009-01-17, 15:30
[No subject] - by hitman - 2009-01-18, 11:35
[No subject] - by timecmdr - 2009-01-18, 13:55
[No subject] - by rodercot - 2009-01-18, 15:08
[No subject] - by delneet - 2009-01-19, 11:10
[No subject] - by MP3HiFi - 2009-03-30, 22:01
NO SOUND after doing all steps - by morph3u5 - 2009-05-16, 10:46
[No subject] - by MP3HiFi - 2009-05-16, 13:34
[No subject] - by morph3u5 - 2009-05-16, 17:25
[No subject] - by morph3u5 - 2009-05-19, 19:02
[No subject] - by xanadu1979 - 2009-05-19, 19:11
[No subject] - by MacUsers - 2009-06-03, 13:58
[No subject] - by Giland - 2009-07-10, 20:38
[No subject] - by pinchy - 2009-08-02, 21:05
[No subject] - by arxe41 - 2009-10-02, 23:00
[No subject] - by davidw - 2009-10-05, 16:28
[No subject] - by DDM123 - 2009-10-14, 02:59
[No subject] - by davidw - 2009-10-14, 08:53
[No subject] - by dogk1cker - 2009-10-22, 18:37
[No subject] - by outleradam - 2009-10-23, 03:34
[No subject] - by Freek - 2009-10-23, 21:07
[No subject] - by DaveHope - 2009-10-29, 23:43
[No subject] - by ukasz - 2009-10-30, 00:05
[No subject] - by camdagr8 - 2009-12-07, 15:24
[No subject] - by bolzerrr - 2010-01-25, 19:48
[No subject] - by OldOne - 2010-09-03, 20:11
[No subject] - by acid_junkie - 2010-09-04, 14:11
[No subject] - by osirisjem - 2011-03-19, 21:19
[No subject] - by vikjon0 - 2011-03-29, 20:40
Logout Mark Read Team Forum Stats Members Help
HOW-TO make XBMC for Linux auto start on Ubuntu5