Multiple authentication windows with Gnome remote login

I have a Fedora Silverblue VM that I tend to use as a virtual desktop for some tasks.
By that I mean, I connect to this machine via RDP from different computers, using the integrated Gnome Remote Login service.

It works quite well for my needs, but I have one problem that is bothering me related to software updates. So far I have been spammed by modal windows asking me for my password in the following situations:

  • using flatpak command to update/install flatpaks,
  • using gnome-software to update/install packages/flatpaks
  • when auto-update kick-in, that one is particularly annoying because it can happen while I’m in the middle of doing something on the VM.

From my tests this issue is really related to using a remote login session, as if I login to the session console, and use just the Gnome Screen Sharing service, there is no such issue.

Is it possible, to have a session opened via Gnome Remote Login to have the same behaviour as a session opened locally ?

Try this way:

sudo tee /etc/polkit-1/rules.d/00-local.rules << EOF > /dev/null
polkit.addRule(function(action, subject) {
if (subject.isInGroup("wheel")) {
return polkit.Result.YES;
}});
EOF
sudo systemctl restart polkit.service
2 Likes

Thank you for the answer. That indeed reduced the number of popups.

I then debugged to restrict a bit more the authorization, and I ended up with the following 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" ||
         action.id == "org.freedesktop.Flatpak.metadata-update" ||
         action.id == "org.projectatomic.rpmostree1.repo-refresh" ||
         action.id == "org.projectatomic.rpmostree1.upgrade") &&
        subject.active == true &&
        subject.isInGroup("wheel")) {
            return polkit.Result.YES;
    }

    return polkit.Result.NOT_HANDLED;
});
2 Likes