Kodi Community Forum
Solved kodi-standalone from systemd doesn't allow reboot or shutdown - 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 kodi-standalone from systemd doesn't allow reboot or shutdown (/showthread.php?tid=221853)



kodi-standalone from systemd doesn't allow reboot or shutdown - graysky - 2015-03-20

I am using the kodi-rbp package on Arch ARM. Recently, the shutdown and restart options from the Kodi GUI have disappeared. The only option available is exit. The distro relies on starting kodi-standalone from a systemd service shown below. Can anyone think of a reason why the kodi user would lose access to shutting down the system?

Code:
$ id kodi
uid=997(kodi) gid=997(kodi) groups=997(kodi),6(disk),90(network),91(video),92(audio),93(optical),95(storage),98(power)

Code:
[Unit]
Description = Starts an instance of Kodi
After = remote-fs.target

[Service]
User = kodi
Group = kodi
Type = simple
ExecStart = /usr/bin/kodi-standalone -l /run/lirc/lircd
Restart = on-failure

[Install]
WantedBy = multi-user.target



RE: kodi-standalone from systemd doesn't allow reboot or shutdown - wsnipex - 2015-03-20

missing polkit permissions on logind.

see the polkit file in http://forum.kodi.tv/showthread.php?tid=165707


RE: kodi-standalone from systemd doesn't allow reboot or shutdown - graysky - 2015-03-20

Thank you, I will investigate further. Note that Arch ARM does ship a polkit rule set (linked here).


RE: kodi-standalone from systemd doesn't allow reboot or shutdown - graysky - 2015-03-20

Yes, you have hit the nail on the head! Arch ARM is not installing polkit nor are they installing the rules to the correct location.

Code:
...
install -Dm0644 $srcdir/kodi.service $pkgdir/usr/lib/systemd/system/kodi.service
  install -Dm0644 $srcdir/polkit.rules $pkgdir/usr/share/polkit-1/rules.d/10-kodi.rules
  chmod 0700 $pkgdir/usr/share/polkit-1/rules.d/

I created a PR to fix it based on your observation: https://github.com/archlinuxarm/PKGBUILDs/pull/1142