mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-07-26 04:35:39 +03:00
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.
12 lines
491 B
Text
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;
|
|
}
|
|
});
|