System requests for authentication to refresh system repositories
In some cases, when a user connects from remote using NoMachine to systems running specific Linux distributions such as OpenSuse, a dialog is issued similar to:
Authentication Required
Authentication is required to refresh the system repositories
This dialog is not triggered by NoMachine but issued because by default the system security settings forbid the user to refresh the software repositories, install updates or mount removable devices when you're logged from remote.
We are aware of the dialog being issued by Suse-based systems and a similar behaviour has been reported on RHEL when connecting from remote. See: https://bugzilla.redhat.com/show_bug.cgi?id=1857654
For NoMachine versions 7.8.2 and earlier installed on OpenSUSE, to avoid the dialog from popping up in the NoMachine session, it's necessary to add the appropriate PolKit rule. Starting from version 7.9.2, NoMachine includes this rule and it's no longer necessary to add it manually.
To create the PolKit rule manually:
1) Create file:
/usr/share/polkit-1/rules.d/55-org.nomachine.rules
with the following content:
polkit.addRule(function(action, subject) {
if (action.id == "org.freedesktop.packagekit.system-sources-refresh"){
if (subject.active && subject.isInGroup("users"))
return polkit.Result.YES;
else
return polkit.Result.AUTH_ADMIN_KEEP;
}
});
2) Reboot the machine
Note for Rocky Linux users
Since v. 7.9.2, NoMachine adopts the new file format for the rule configuration supported by polkit-0.115, but on Rocky Linux 8.5 it's still necessary to use the old format.
To avoid the dialog asking for authorization to pop-up:
1) remove (with root privileges):
/usr/share/polkit-1/rules.d/55-org.nomachine.rules
2) copy (with root privileges):
/usr/NX/share/policy/10-org.nomachine.allow.system-sources-refresh.pkla
to:
/etc/polkit-1/localauthority/55-org.nomachine.d/
3) restart the NoMachine server:
sudo /etc/NX/nxserver --restart
