Kodi Community Forum
Solved Power off option in shutdown menu - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: General Support (https://forum.kodi.tv/forumdisplay.php?fid=111)
+---- Forum: Linux (https://forum.kodi.tv/forumdisplay.php?fid=52)
+---- Thread: Solved Power off option in shutdown menu (/showthread.php?tid=243394)



Power off option in shutdown menu - cassperr - 2015-10-12

Hi,

I've been trying to get the Power off button working in Kodi but for some reason I can't get this to work.

Software setup:
Ubuntu 14.04.3 LTS (minimal installation, followed this how-to)
Kodi 15.1

Initial problem: No power off option in the shutdown menu

Tried:
- Set shutdown function in settings - system - power saving - shutdown function but this only gives me the options Hibernate & Suspend
- Edit /usr/share/kodi/addons/skin.confluence/720p/DialogButtonMenu.xml to force the Power off function to show (changed visible value to static "yes")
-> Editing this file did manage to show the Power off function, but restarted Kodi instead of shutting the machine down. (weird, right?)
- Tried to install other skins and checked if they had a power off option. Most of them did not but I found one. Using this power off option causes Kodi to crash.
-> Skin is called BOX and after clicking Power off I see at the top right of the screen a "please wait" with some sort of loading circle. Doesn't seem to do anything.

Any suggestions on how to fix this?
I considered mapping the shutdown function to a button on my remote but I prefer to have a dialog asking me for confirmation.


RE: Power off option in shutdown menu - wsnipex - 2015-10-12

double check your /etc/polkit-1/localauthority/50-local.d/custom-actions.pkla


RE: Power off option in shutdown menu - cassperr - 2015-10-12

For some reason I couldn't access the localauthority folder.
I've made my user the owner of the folder, hope that's okay.

The file custom-actions.pkla shows:

Quote:[Actions for kodi user]
Identity=unix-user:kodi
Action=org.freedesktop.upower.*;org.freedesktop.consolekit.system.*;org.freedesk​top.udisks.*;org.freedesktop.login1.*
ResultAny=yes
ResultInactive=yes
ResultActive=yes

[Untrusted Upgrade]
Identity=unix-user:kodi
Action=org.debian.apt.upgrade-packages;org.debian.apt.update-cache
ResultAny=yes
ResultInactive=yes
ResultActive=yes

Edit: Username changed to the one used on my system. Solved my issue. Thanks wsnipex.