Polkit agent + libvirt group (fixes virt-manager connection failure) #4

Merged
yuri merged 7 commits from fix/polkit-agent-libvirt into main 2026-10-27 15:28:59 +01:00
Showing only changes of commit c552b30112 - Show all commits
+3 -2
View File
@@ -541,9 +541,10 @@ install_category_pkgs() {
[[ "$item" == *libvirt* || "$item" == *virt-manager* || "$item" == *virt-install* ]] && wants_libvirt=true [[ "$item" == *libvirt* || "$item" == *virt-manager* || "$item" == *virt-install* ]] && wants_libvirt=true
done done
if $wants_libvirt; then if $wants_libvirt; then
info "Enabling libvirtd and adding $USER to the libvirt group..." local real_user="${SUDO_USER:-$USER}"
info "Enabling libvirtd and adding $real_user to the libvirt group..."
sudo systemctl enable --now libvirtd 2>/dev/null || true sudo systemctl enable --now libvirtd 2>/dev/null || true
sudo usermod -aG libvirt "$USER" || true sudo usermod -aG libvirt "$real_user" || true
warn "libvirt group membership applies after re-login." warn "libvirt group membership applies after re-login."
fi fi
;; ;;