Public bug reported: On Ubuntu 18.04 when installing flatpaks (not using sudo) or updating already installed flatpaks I am getting prompted for my admin password twice for each and every package. I.e. when trying to update 10 flatpaks on my system, I get prompted 20 times for my password. Nevertheless, this is annoying, and as a hack I've just been executing flatpak commands with sudo, which is terrible practice, and Flatpak warns me as much.
On Archlinux my user is in the "wheel" group, and there is a Polkit rule set in place that any user in the wheel group automatically should be allowed to execute flatpak actions at the system level. For me on Archlnux, this polkit rule is found in /usr/share/pokit-1/rules.d/org.freedesktop.Flatpak.rules: polkit.addRule(function(action, subject) { if ((action.id == "org.freedesktop.Flatpak.app-install" || action.id == "org.freedesktop.Flatpak.runtime-install"|| action.id == "org.freedesktop.Flatpak.app-uninstall" || action.id == "org.freedesktop.Flatpak.runtime-uninstall" || action.id == "org.freedesktop.Flatpak.modify-repo") && subject.active == true && subject.local == true && subject.isInGroup("wheel")) { return polkit.Result.YES; } return polkit.Result.NOT_HANDLED; }); In Ubuntu 18.04, this file reads: polkit.addRule(function(action, subject) { if ((action.id == "org.freedesktop.Flatpak.app-install" || action.id == "org.freedesktop.Flatpak.runtime-install"|| action.id == "org.freedesktop.Flatpak.app-uninstall" || action.id == "org.freedesktop.Flatpak.runtime-uninstall" || action.id == "org.freedesktop.Flatpak.modify-repo") && subject.active == true && subject.local == true && subject.isInGroup("sudo")) { return polkit.Result.YES; } }); So as you can see, the wheel group was switched to the sudo group, which makes sense for Ubuntu, but other than that they are very similar. Now, interestingly enough, I didn't think that the polkit version included in Ubuntu 18.04 used .rules files, and that was a >0.106 nomenclature. On Ubuntu 18.04 polkit is set at version 0.105, which I think uses .pkla or .conf files, and I don't see any rule set here for Flatpak. Perhaps, this is the source of the problem of why flatpak is prompting me over and over for passwords on 18.04. ProblemType: Bug DistroRelease: Ubuntu 18.04 Package: flatpak 1.0.8-0ubuntu0.18.04.1 ProcVersionSignature: Ubuntu 5.0.0-31.33~18.04.1-generic 5.0.21 Uname: Linux 5.0.0-31-generic x86_64 NonfreeKernelModules: nvidia_modeset nvidia ApportVersion: 2.20.9-0ubuntu7.7 Architecture: amd64 CurrentDesktop: GNOME Date: Tue Oct 8 10:27:33 2019 InstallationDate: Installed on 2018-08-01 (432 days ago) InstallationMedia: Ubuntu 18.04.1 LTS "Bionic Beaver" - Release amd64 (20180725) ProcEnviron: TERM=xterm-256color PATH=(custom, no user) XDG_RUNTIME_DIR=<set> LANG=en_US.UTF-8 SHELL=/bin/bash SourcePackage: flatpak UpgradeStatus: No upgrade log present (probably fresh install) ** Affects: flatpak (Ubuntu) Importance: Undecided Status: New ** Tags: amd64 apport-bug bionic wayland-session -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1847339 Title: Polkit asking for password repeatedly when installing To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/flatpak/+bug/1847339/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs