I have different issues with polkit not working at all for inactive sessions. Because I think they share the same issue i will post one example first.
I have a fresh ubuntu-server 14.04 with lubuntu-desktop and xrdp package installed. When I login with xrdp I should have the normal restrictions as polkit was defined. First I thought I just don't have enough permission for certain actions. So I changed some configurations to my needs. Here's one example: Doubleclicking a .deb-package I want to install, software-center opens and i click install there:
org.freedesktop.PolicyKit.Error.Failed: ('system-bus-name', {'name': ':1.121'}): org.debian.apt.install-file
(Something like: You're not allowed to do this action. You don't own the right permissions.)
Before that I've configured polkit to allow this for my inactive session (but for my understanding auth_admin would be enough though). An pkaction --verbose
extract:
org.debian.apt.install-file:
description: Install package file
message: To install this package, you need to authenticate.
vendor: Apt Daemon
vendor_url: http://launchpad.net/aptdaemon/
icon: package-x-generic
implicit any: auth_admin
implicit inactive: auth_admin_keep
implicit active: auth_admin_keep
Anyway I am thinking polkit (agent?) does not run at all, because I get following error right after login with xrdp:
GDBus.Error:org.freedesktop.PolicyKit1.Error.Failed: Cannot determine user of subject
I assume he doesnt find me as user? How can I check if policykit agent is running in my xrdp-session? Can I start it manually? Is this maybe a bug?
Edit: Yes, this user is in the admin group, this user was created during installation of ubuntu. It also has sudo rights.