How does one turn on an authentication agent like Polkit when using the i3 window manager? I would like to get a password prompt whenever I try to launch an application that requires certain root privileges.
3 Answers
It seems that I was able to solve it myself. I installed the following Polkit related packages on my Ubuntu system using apt-get:
- policykit-desktop-privileges
- policykit-1-gnome.
Then I added the following to my i3 config file:
exec --no-startup-id /usr/lib/policykit-1-gnome/polkit-gnome-authentication-agent-1 &
- 459
-
Thank you so much for this solution. I had pulling my hair out trying to get this feature working in my i3 for the past 3 weeks. Thanks alot, have a wonderful day ahead! – ShuaibKunji Nov 04 '20 at 17:37
I had the same issue on Xfce. I have installed Ubuntu 22.04 with the GNOME desktop environment and then installed Xfce4 on top of that. When I tried to run a disk benchmark in the GNOME Disks app, it just shown an error message that I don't have permissions for that action instead of showing a password authentication dialog.
Solution: I just had to install the policykit-1-gnome package to make it working.
There's also the xfce-polkit package that may solve the issue, but I haven't tried it as it doesn't have pre-built binaries so I would have to build it myself and the policykit-1-gnome package is working just fine.
But I wonder how such issue happened in the first place. Wasn't the same package also needed in the GNOME DE? Why haven't been it installed?
On Ubuntus (22.04 and 23.04) I had to install lxpolkit and then added on $HOME/.config/i3/config
exec --no-startup-id lxpolkit
- 1,681