Disable Repo Refresh on Login

A little background:

Multi-user system.
Gnome desktop.
NoMachine access.

This is a mild annoyance, but when users log in or unlock their NoMachine session, they are met with a pop-up window asking for Authentication to update the system repositories. This also occurs with another system when a user logs in directly to the console (single-user desktop deployment). I suspect there is a setting somewhere to disable this. No user needs to do this, and as admin I will perform needed system updates via SSH session.

I’ve seen similar in other Linux deployments. For example, RHEL will give a notification, but it’s at the top of the screen and disappears after a few seconds. But with this deployment, it requires users to cancel to move on. Again, it’s more nuisance than problem. But if I can disable this it will make my users a lot happier.

If they log in to the multi-user Gnome system direct, without NoMachine, do they still get the notification?

Actually, I figured it out today with a little more research. It was in the PolicyKit configuration to disable it. There’s a specific sub-folder for NoMachine where I dropped the config script.

Since there are no direct console sessions, this is not an issue anywhere else.

Hi!

I have the same problem now.

Can you tell me what I need to change and where? Because I’m looking into /usr/share/polkit-1 and in /usr/NX/bin but I don’t know what I need to change.

Can you help me on this?

Thanks!

Hi,

I already fixed the problem with a simple edit in the nomachine config file in polkit-1 folder.

Thanks!

why don’t you post what you changed so that other people that are googling for this answer know how to fix it?

learn how to use the internet.

1 Like

Hi @kevc9

The steps:

  1. Go to /usr/share/polkit-1/rules.d/ path
  2. Edit the 55-org.nomachine.rules
  3. Comment the else conditional

Example:
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
* We Comment the else conditional to disable the popup
* return polkit.Result.AUTH_ADMIN_KEEP;
*/
}
});

Have a nice day :wink:

It may be that your edit will only last to the next update of polkit-1 rules. You should put your edited file in /etc/polkit-1/rules.d/. That way it won’t get overwritten on system updates.