The link that darkscout posted uses uid 1000 and my xbmc user's uid is 1001.
I don't know if that script is the actual one used in my install, I will have to check.
The script adds the xbmc user if it doesn't exist but at one point, as far as I can tell, it sets the variable 'xbmcUser' to the username of uid 1000?
Don't know if that is a problem since I have theese lines in my sudoers file:
Code:
Cmnd_Alias SHUTDOWN_CMDS = /sbin/shutdown, /sbin/reboot, /sbin/halt # XBMC
Cmnd_Alias MOUNT_CMDS = /bin/mount, /bin/umount # XBMC
xbmc ALL=(ALL) ALL # XBMC
xbmc ALL=NOPASSWD: SHUTDOWN_CMDS, MOUNT_CMDS # XBMC
My /var/lib/polkit-1/localauthority/50-local.d/20-xbmclive.pkla:
Code:
[Actions for xbmc user]
Identity=unix-user:xbmc
Action=org.freedesktop.upower.*;org.freedesktop.consolekit.system.*;org.freedesktop.udisks.*
ResultActive=yes
ResultAny=auth_admin
ResultInactive=yes
ck-list-sessions says that the xbmc X session isn't local:
Code:
unix-user = '1001'
realname = 'XBMC'
seat = 'Seat1'
session-type = ''
active = FALSE
x11-display = ':0'
x11-display-device = '/dev/tty7'
display-device = ''
remote-host-name = ''
is-local = FALSE
on-since = '2011-05-24T19:09:24.142196Z'
login-session-id = ''
Could that be one of the problems? Will also try substituting 'ResultAny=auth_admin' to 'ResultAny=yes' and see if that helps.
Still think that it's strange that xbmc only allows suspend and hibernate as shutdown options.