1

I am running VNCserver on a Raspberry Pi.

When logging in remotely, I get following error:

GDBus.Error:or.freedesktop.PolicyKit1.Error.Failed: An authentication agent already exists for the given subject

When I connect a screen directly, I don't have this error, so it only appears on my remote environment.

I have tried the usual stuff, like xlsession-edit and alike, but this does not solve the issue.

Monomeeth
  • 1,321

1 Answers1

0

This has to do with running multiple policy kits. I solved it by disabling the LX session policy kit. Feel free to poke through the code more than I did.

You can turn off lxpolkit by opening /etc/xdg/lxsession/LXDE-pi/desktop.conf and

  • setting polkit/command=
  • setting guess_default=false

Just in case, replace your config home desktop file with the global version. The config home desktop file usually gets created automatically, but if it defines the polkit command as lxpolkit, then lxsession might pick it up from there.

cp /etc/xdg/lxsession/LXDE-pi/desktop.conf ~/.config/lxsession/LXDE-pi/desktop.conf

Power cycle and the message is gone. Can't promise it won't break anything else. You can check the log if you're concerned it's not loading other necessary, default settings. The log file is \~/.cache/lxsession/LXDE-pi/run.log.