Soteria is a Polkit authentication agent written in GTK designed to be used with any desktop environment.
Installation • Why? • Configuration • Usage
Soteria requires GTK >= 4.10. For Arch based distros, you will need
gtk4
, Debian based distros will need libgtk-4-dev
, and Fedora
based distros will need gtk4-devel
.
Additionally, you will need polkit
and libpolkit-agent
installed.
(libpolkit-agent
should be shipped with polkit
).
Note
If the executable polkit-agent-helper-1
is in a non-standard location (i.e. not /usr/lib/polkit/polkit-agent-helper-1
), then you should also set up a configuration file
at either /usr/local/etc/soteria/config.toml
or /etc/soteria/config.toml
with
helper_path = "/path/to/your/helper"
as the contents.
Soteria will also need Rust. It was developed on Rust 1.78.0
however,
lower versions of Rust should still work.
Run the following commmand to build and install Soteria:
cargo install --locked --git https://github.com/imvaskel/soteria
This should place Soteria into ~/.cargo/bin and you can run it from there.
Simply have your desktop run the soteria
binary to have it register as your authentication agent. Once run, anytime an application requests polkit authentication, it should popup and prompt you to authenticate.
For Hyprland, this would look like:
exec-once = /path/to/soteria
You may also like:
windowrulev2=pin,class:gay.vaskel.Soteria
This makes sure that Soteria stays pinned to your current workspace.
Other desktop environments should be similiar.
When looking for a polkit authentication agent, I noticed that most were either extremely old, using a framework that I didn't like, or completely unstylable.
Additionally, most were hard to edit as they just called out to polkit's libpolkit-agent
to do all the work. Because of this, I decieded to put the work in to figure out how authentication agents worked.
If you would like to debug why something went wrong, just run RUST_LOG=debug soteria
and this will start it with debug logging, which should help you identify what's going wrong.