1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-26 04:35:39 +03:00
aports/community/kodi/60-kodi.rules
Bart Ribbers c3b0700daa community/kodi: allow running kodi-gbm at boot as it's own user
If kodi-gbm gets installed, it creates the "kodi" system user.
Then using the service file Kodi can be started on boot to run in KMS
mode (kodi-gbm) as the kodi user. In combination with a polkit rule in
kodi-polkit the user can then shut down the system from within Kodi.

With this setup Alpine Linux with Kodi becomes viable for HTPC devices
and smart TV's.
2019-08-20 13:02:54 -03:00

12 lines
491 B
Text

// DO NOT EDIT THIS FILE, it will be overwritten on update
//
// Allows shutting down the system when using Kodi with a dedicated user
polkit.addRule(function(action, subject) {
if (( (action.id.indexOf("org.freedesktop.udisks.") == 0) ||
(action.id.indexOf("org.freedesktop.upower.") == 0) ||
(action.id.indexOf("org.freedesktop.login1.") == 0) ) &&
subject.user == "kodi") {
return polkit.Result.YES;
}
});