virt-manager on niri failed: no polkit agent in a bare compositor session.
polkit-gnome agent installed + XDG-autostarted for compositor sessions
niri module enables libvirtd and adds the user to the libvirt group (no password prompt for qemu:///system; applies after re-login)
Immediate manual fix for the current VM: sudo usermod -aG libvirt yuri && re-login
virt-manager on niri failed: no polkit agent in a bare compositor session.
- polkit-gnome agent installed + XDG-autostarted for compositor sessions
- niri module enables libvirtd and adds the user to the libvirt group (no password prompt for qemu:///system; applies after re-login)
Immediate manual fix for the current VM: sudo usermod -aG libvirt yuri && re-login
virt-manager on niri/Noctalia failed with 'authentication unavailable:
no polkit agent available to authenticate action org.libvirt.unix.manage'
- bare compositors ship no polkit agent, unlike GNOME/KDE.
Two fixes:
- install_session_prereqs installs polkit-gnome and wires its agent
.desktop into /etc/xdg/autostart (paths overridable for testing).
- niri module optionally installs the qemu/libvirt stack, enables
libvirtd, and adds the user to the libvirt group: members manage
qemu:///system with no polkit prompt at all (the real fix; applies
after re-login).
VM run failed: 'No match for argument: polkit-gnome'. polkit-gnome is
orphaned in Fedora (EPEL9 only). polkit-kde 6.6.4 is in F44 and ships its
agent's /etc/xdg/autostart .desktop itself, so the manual symlink wiring
is gone too — installing the package is the whole fix.
A clean-snapshot run showed qemu/virt-manager installed without choosing
it: PR #4 had embedded the install in the niri module. Removed from there
(zero virt packages in a plain niri run, harness-verified) and moved into
install_category_pkgs Virtualisation: picking qemu/virt-manager there now
also enables libvirtd and adds the user to the libvirt group.
The VM error persisted with polkit-kde installed: the package's autostart
.desktop carries OnlyShowIn=KDE;, so XDG autostart (which niri honors via
xdg-desktop-autostart.target) skips the agent in a niri session. Package
present, agent never running — exactly the observed behavior.
install_session_prereqs now rewrites the .desktop without the OnlyShowIn
line in place (idempotent: only rewrites when the line is present).
Second VM failure: Fedora's polkit-kde .desktop carries
X-systemd-skip=true (and OnlyShowIn on some versions), so niri's
xdg-desktop-autostart.target skips the agent regardless — package
installed, agent dead, same error.
Stop fighting .desktop semantics: install a polkit-agent.service USER
unit (WantedBy=graphical-session.target, which niri/Hyprland/Mango all
bring up) with the Fedora kf6 binary path, pre-linked into
graphical-session.target.wants. Idempotent on both file and symlink.
The error CHANGED on the VM: 'no polkit agent' -> 'access denied by
policy' — the agent unit works; polkit now denies because the user is
not in the libvirt group (fresh run without picking QEMU from the menu,
or no re-login after the pick).
install_session_prereqs now adds the user to the libvirt group whenever
libvirt is installed (idempotent via id -nG check), decoupled from the
advanced-menu choice. Applies after re-login.
usermod used $USER directly; under sudo $USER can be root. All other
user-scoped calls already use ${SUDO_USER:-$USER} — aligned. No hardcoded
usernames anywhere in the repo (verified by grep; only the dotfiles repo
URL, which is overridable via DOTFILES_REPO).
yuri
merged commit 847e76614a into main2026-10-27 15:28:59 +01:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
virt-manager on niri failed: no polkit agent in a bare compositor session.
Immediate manual fix for the current VM: sudo usermod -aG libvirt yuri && re-login
usermod used $USER directly; under sudo $USER can be root. All other user-scoped calls already use ${SUDO_USER:-$USER} — aligned. No hardcoded usernames anywhere in the repo (verified by grep; only the dotfiles repo URL, which is overridable via DOTFILES_REPO).