kodi-rbp4 & polkit & irexec [proposed solution]

Problems with packages? Post here, using [tags] of the package name.

kodi-rbp4 & polkit & irexec [proposed solution]

Postby qaron » Tue Nov 10, 2020 12:10 pm

I'm owner of Raspberry Pi 4 and i installed kodi-rbp4 the problem that I faced was that there is a wrong polkit for kodi-rbp4 and doesnt allow to reboot/poweroff the system from kodi.

the solution to my problem is to edit the /usr/share/polkit-1/rules.d/10-kodi.rules as follow:
$this->bbcode_second_pass_code('', 'polkit.addRule(function(action, subject) {
// if (subject.user == "kodi") {
polkit.log("action=" + action);
polkit.log("subject=" + subject);
if (action.id.indexOf("org.freedesktop.login1.") == 0) {
return polkit.Result.YES;
}
if (action.id.indexOf("org.freedesktop.udisks.") == 0) {
return polkit.Result.YES;
}
if (action.id.indexOf("org.freedesktop.upower.") == 0) {
return polkit.Result.YES;
}
// }
});')
I want to run kodi in general as simple "user" and not as "kodi" user
this way i have the power options menu and NOT just the exit command....
qaron
 
Posts: 13
Joined: Mon Dec 23, 2019 8:04 am

Re: kodi-rbp4 & polkit & irexec [proposed solution]

Postby graysky » Tue Nov 10, 2020 3:41 pm

As it stands now, I have 4 options in the power menu running as the kodi user:
Exit
Power off system
Custom shutdown timer
Reboot

If I remove the user match, I get the same. What value does adding an if statement matching upower provide?
graysky
Developer
 
Posts: 1893
Joined: Sun Jun 26, 2011 6:56 am
Location: /run/user/1000


Return to Packages

Who is online

Users browsing this forum: No registered users and 15 guests