You are not logged in.
`Thunar` works.
`pkexec thunar` works, to run thunar with root permissions.
However, `pkexec Thunar` returns `Thunar: Cannot open display:`
What's the difference?
My first guess is: Thunar is just an alias for thunar, but maybe Thunar introduces some switches which confuse pkexec?
Last edited by johnywhy (2018-09-06 19:33:20)
arch xfce x86_64
Offline
Same experience in Xubuntu 16.04.5.
I've noticed /usr/bin/Thunar is a symlink to /usr/bin/thunar.
Offline
And reading the man page for pkexec makes me think that /usr/share/polkit-1/actions/org.xfce.thunar.policy is the file governing that action.
I just tried adding a line, so:
<annotate key="org.freedesktop.policykit.exec.path">/usr/bin/thunar</annotate>
becomes this:
<annotate key="org.freedesktop.policykit.exec.path">/usr/bin/thunar</annotate>
<annotate key="org.freedesktop.policykit.exec.path">/usr/bin/Thunar</annotate>
... and it worked!
Is it safe to leave it like this or shall I undo the change?
Offline
Same experience in Xubuntu 16.04.5.
I've noticed /usr/bin/Thunar is a symlink to /usr/bin/thunar.
thx, alcornoqui! why would that break pkexec? i googled 'pkexec symlinks', didn't find anything.
THX
arch xfce x86_64
Offline
Ah, now I understand! Capitalized "Thunar", that is /usr/bin/Thunar (the symlink), wasn't authorized in the corresponding polkit action, while lowercase thunar (the binary) was.
So we add the line with "Thunar"in it, and it works. Symlinks are no problem, if properly referenced in the polkit file... or something like that
Last edited by alcornoqui (2018-08-27 22:34:51)
Offline
ok, i see. thx!
arch xfce x86_64
Offline
[ Generated in 0.011 seconds, 7 queries executed - Memory usage: 532.3 KiB (Peak: 532.92 KiB) ]