Code: Select all
sudo nano /var/lib/polkit-1/localauthority/50-local.d/50-kodi.pkla
Code: Select all
[Actions for kodi user]
Identity=unix-user:kodi
Action=Action=org.freedesktop.upower.*;org.freedesktop.consolekit.system.*;org.f?reedesktop.udisks.*
ResultActive=yes
ResultAny=yes
ResultInactive=no
Code: Select all
sudo chown root:root /var/lib/polkit-1/localauthority/50-local.d/50-kodi.pkla
Code: Select all
sudo chmod 0644 /var/lib/polkit-1/localauthority/50-local.d/50-kodi.pkla
Code: Select all
sudo reboot
Code: Select all
[Actions for kodi user]
Identity=unix-user:kodi
Action=org.freedesktop.upower.*;org.freedesktop.consolekit.system.*;org.freedesktop.udisks.*,org.freedesktop.login1.*
ResultActive=yes
ResultAny=yes
ResultInactive=no
Code: Select all
sudo -ukodi pkaction
Code: Select all
[email protected]:~# sudo -ukodi pkaction
org.freedesktop.hostname1.set-hostname
org.freedesktop.hostname1.set-machine-info
org.freedesktop.hostname1.set-static-hostname
org.freedesktop.locale1.set-keyboard
org.freedesktop.locale1.set-locale
org.freedesktop.login1.attach-device
org.freedesktop.login1.flush-devices
org.freedesktop.login1.hibernate
org.freedesktop.login1.hibernate-ignore-inhibit
org.freedesktop.login1.hibernate-multiple-sessions
org.freedesktop.login1.inhibit-block-idle
org.freedesktop.login1.inhibit-block-shutdown
org.freedesktop.login1.inhibit-block-sleep
org.freedesktop.login1.inhibit-delay-shutdown
org.freedesktop.login1.inhibit-delay-sleep
org.freedesktop.login1.inhibit-handle-hibernate-key
org.freedesktop.login1.inhibit-handle-lid-switch
org.freedesktop.login1.inhibit-handle-power-key
org.freedesktop.login1.inhibit-handle-suspend-key
org.freedesktop.login1.power-off
org.freedesktop.login1.power-off-ignore-inhibit
org.freedesktop.login1.power-off-multiple-sessions
org.freedesktop.login1.reboot
org.freedesktop.login1.reboot-ignore-inhibit
org.freedesktop.login1.reboot-multiple-sessions
org.freedesktop.login1.set-user-linger
org.freedesktop.login1.suspend
org.freedesktop.login1.suspend-ignore-inhibit
org.freedesktop.login1.suspend-multiple-sessions
org.freedesktop.policykit.exec
org.freedesktop.policykit.lockdown
org.freedesktop.systemd1.bus-access
org.freedesktop.systemd1.reply-password
org.freedesktop.timedate1.set-local-rtc
org.freedesktop.timedate1.set-ntp
org.freedesktop.timedate1.set-time
org.freedesktop.timedate1.set-timezone
Code: Select all
cat <<EOF | sudo tee /etc/polkit-1/localauthority/50-local.d/custom-actions.pkla
[Actions for kodi user]
Identity=unix-user:kodi
Action=org.freedesktop.upower.*;org.freedesktop.consolekit.system.*;org.freedesktop.udisks.*;org.freedesktop.login1.*
ResultAny=yes
ResultInactive=yes
ResultActive=yes
EOF
Thanks! This and installing consolekit helped.Wrechid wrote:Ok 2 weeks later i figured it out, or at least i think... i should of included in my last post, i'm using the latest Raspbian build and installed Kodi from the repositories... After doing a lot of research, the problem seems to be user name related... When installing Kodi from the repositories, it creates a new user called "kodi" and runs using that name... Well I've still a lot to learn in the linux field, but during my research there's something called "polkit" (PolicyKit)... It appears that since the user kodi does not have the authority to reboot or power off the RPi the Media Center (Kodi) does not give the options in the shutdown menu... I stumbled across this site, http://www.forum-raspberrypi.de/Thread- ... own-dialog ...
I used the exact info, but change the "xbmc" user names to "kodi", rebooted and WaLaa it worked...
Create a file in, /var/lib/polkit-1/localauthority/50-local.d/
called "50-kodi.pkla"fill the file with the info belowCode: Select all
sudo nano /var/lib/polkit-1/localauthority/50-local.d/50-kodi.pkla
save the file and set the owner and group to rootCode: Select all
[Actions for kodi user] Identity=unix-user:kodi Action=Action=org.freedesktop.upower.*;org.freedesktop.consolekit.system.*;org.f?reedesktop.udisks.* ResultActive=yes ResultAny=yes ResultInactive=no
set the permissionsCode: Select all
sudo chown root:root /var/lib/polkit-1/localauthority/50-local.d/50-kodi.pkla
reboot...Code: Select all
sudo chmod 0644 /var/lib/polkit-1/localauthority/50-local.d/50-kodi.pkla
good luck, hope this helps...Code: Select all
sudo reboot
Code: Select all
[email protected]:/home/pi# cat /etc/polkit-1/localauthority/50-local.d/power.pkla
[Allow consolekit]
Identity=unix-group:plugdev
Action=org.freedesktop.consolekit*
ResultAny=yes
ResultInactive=no
ResultActive=yes
[Allow login1]
Identity=unix-group:plugdev
Action=org.freedesktop.login1*
ResultAny=yes
ResultInactive=no
ResultActive=yes
[Allow Upower]
Identity=unix-group:plugdev
Action=org.freedesktop.upower*
ResultAny=yes
ResultInactive=no
ResultActive=yes
[email protected]:/home/pi#
Code: Select all
# sudo apt-get install policykit-1
Code: Select all
# sudo cat ] /etc/polkit-1/localauthority/50-local.d/50-kodi.pkla [[ EOL
[Actions for pi user]
Identity=unix-group:pi
Action=Action=org.freedesktop.upower.*;org.freedesktop.consolekit.system.*;org.f?reedesktop.udisks.*
ResultActive=yes
ResultAny=yes
ResultInactive=no
EOL
Code: Select all
# pkaction | egrep 'power-off|reboot'
org.freedesktop.login1.power-off
org.freedesktop.login1.power-off-ignore-inhibit
org.freedesktop.login1.power-off-multiple-sessions
org.freedesktop.login1.reboot
org.freedesktop.login1.reboot-ignore-inhibit
org.freedesktop.login1.reboot-multiple-sessions
bowlofred wrote:I also had the items disappear shortly after going to 17. (Was working before with consolekit).
Installed policykit, but no changes to the menu.
Is there a log file somewhere that Kodi creates detailing why the menu options aren't being shown?
Code: Select all
[Actions for kodi user]
Identity=unix-group:kodi
Action=org.freedesktop.upower.*;org.freedesktop.udisks.*;org.freedesktop.login1*
ResultActive=yes
ResultAny=yes
ResultInactive=no