.. | ||
README.md |
Setting up Policy Kit
These instructions were performed on arch linux. The process should be roughly the same on other distributions, but refer to your local wiki anyway.
Policy Kit in Linux can be compared to UAC in Windows.
If you want to perform an admin (root) action in a graphic environment, Policy Kit ensures you get a dialog prompting you for your password.
Installation
First, you have to install policy kit itself. Policy kit is also known as polkit:
sudo pacman -S polkit
If you are in a text-only environment, you don't need to do anything else. But I assume you are in a graphical environment, in which case you need an authentication agent.
Note that if you used an installation script or installed a big DE group package, you might already have an authentication agent installed. Check your package list before continuing. Here are DEs that typically have an agent pre-installed: Cinnamon, Deepin, GNOME, KDE, LXDE, LXQt, MATE, Xfce.
You have a couple of different ones to choose from, you can find a list in the arch linux article.
In this guide, we will use lxpolkit. Let's install it.
sudo pacman -S lxsession-gtk3
Autostart
You need to set your agent to autostart on session start. This is done differently in every DE, WM or other environment.
For example, in KDE plasma you can add autostart commands via the system settings utility. If you use something like AwesomeWM, you can just spawn a process. Or you can simply add it to your .xsession or .xprofile.
The only thing you need to add to autostart is the command for your agent. In the case of lxpolkit you would just add the command lxpolkit
to autostart.