I use xfce which came with a polkit action org.xfce.thunar.policy in /usr/local/share/polkit-1/actions/.
This action allow to run thunar as root if you can give the root password.
On debian with pkexec version 0.105, you create a desktop file on the desk like this one :
[Desktop Entry]
Name=Thunar pkexec
Comment=Lance Thunar sous root
Exec=pkexec thunar /
Icon=Thunar
Terminal=false
StartupNotify=true
Type=Application
This way, you get a window like this one :
If you give the password you get :
On OpenBSD with pkexec version 0.116, nothing happend.
This 2 versions of polkit don't work the same way.
With version 0.105, on debian, you can create a pkla file to modify the authorizations.
With version 0.116, on OpenBSD, you must create a rules file to run the action.
So I create a rules file to run the action.
cat 30-thunar_pkexec.rules
polkit.addRule (function (action, subject) {
if (action.id == "org.xfce.thunar")
{
return polkit.Result.AUTH_ADMIN;
}
});
And nothing happen. If i set the return line like this :
return polkit.Result.YES;
I get :
So this work without authentification but it's not what I want.
How to get this authenticate window with polkit 0.116 ?
Thanks.