2

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:

polkit error message

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:

polkit error message logged through 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.

1
  • Sorry for not having enough reputation to directly include the images into the right places
    – Dionysius
    Oct 28, 2014 at 1:20

1 Answer 1

0
  • It doesn't seem to get the user name from the user process, check your environment variables. xrdp may differ from the regular session:

    env | grep -i "user\|logname"
    
  • To check if polkit agent is running, use terminal and run this:

    ~$ ps aux | grep polkit
    root       855  0.0  0.9 281224  7192 ?        Sl   06:34   0:00 /usr/lib/policykit-1/polkitd --no-debug
    user      2060  0.0  1.5 331764 11604 ?        Sl   06:37   0:00 /usr/lib/policykit-1-gnome/polkit-gnome-authentication-agent-1
    user      2419  0.0  0.1  15944   952 pts/12   S+   06:38   0:00 grep --color=auto polkit
    

    You should find two process polkitd running by root and polkit-*-authentication-agent-1 by same user of the session.

  • Yes, you can tart them manually, I have Ubuntu desktop so it may differ. Get where it is:

    ~$ ls /etc/xdg/autostart/polkit-*
    /etc/xdg/autostart/polkit-gnome-authentication-agent-1.desktop
    
    ~$ grep -i exec= /etc/xdg/autostart/polkit-gnome-authentication-agent-1.desktop
    Exec=/usr/lib/policykit-1-gnome/polkit-gnome-authentication-agent-1
    

    Run it:

    /usr/lib/policykit-1-gnome/polkit-gnome-authentication-agent-1
    
1
  • running that command will not work since there's an instance already running, may as well do a reboot
    – lasec0203
    Nov 4, 2021 at 2:04

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .