Snap commands PolicyKit authentication without desktop environment

I’ve made a quick proof of concept integration with pkttyagent. This enables executing snap commands as a regular user without the need for typing sudo, while at a console in display-less environment or when running without a dedicated PolicyKit authentication agent. The work leverages already existing integration with org.freedesktop.PolicyKit1.

https://asciinema.org/a/0KeOAZGHjtA2Jx2esVPz0PXIx

I’ve pushed the code to a private branch in https://github.com/bboozzoo/snapd/tree/bboozzoo/polkit-agent

If there’s any interest, I’ll prepare a PR.

3 Likes