Thunar not open as root

Hi again,

I'm having an issue with thunar not opening as root. The command 'pkexec thunar %f' is as it should be, but when I try to open a directory as root,  no root password window appears. 

I’m guessing this is something to do gnome-polkit…

%f is for files, use %d for directories, not sure if this could be the cause?

Can you run in a terminal

pkexec thunar ~/

might need to be quoted like so

pkexec "thunar $HOME"
1 Like

Hi,

I get the following when I run ‘pkexec thunar ~/’ in a terminal:

==== AUTHENTICATING FOR org.xfce.thunar ====
Authentication is required to run Thunar as root.
Authenticating as: robabo
Password:
polkit-agent-helper-1: error response to PolicyKit daemon: GDBus.Error:org.freedesktop.PolicyKit1.Error.Failed: No session for cookie
==== AUTHENTICATION FAILED ====
Error executing command as another user: Not authorized

I put this line in my autostart file: /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1

Now thunar can open as root again.

1 Like

I’m guessing you went for lightdm post install?

I’ll make sure this gets added to autostart when picking lightdm in al-hello

1 Like

Yes, I chose to use lightdm from the al-hello script.

Thanks

Thanks for the fix mate. That was driving me nuts.

I shall remember this. Thanks.