[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[Solved] Re: xrdp and KDE Plasma desktop



Am Freitag, 14. Juli 2023, 08:08:41 CEST schrieb Petric Frank:
> Am Donnerstag, 13. Juli 2023, 12:27:22 CEST schrieb Max Nikulin:
> > On 12/07/2023 20:51, Petric Frank wrote:
> > > If i look at the nmcli general permissions for the id i get:
> > >    org.freedesktop.NetworkManager.network-control              auth
> > >
> > > If i log in locally i get:
> > >    org.freedesktop.NetworkManager.network-control              yes
> > >
> > > It seems that something goes wrong - but what and how to fix it ?
> > > I use the same userid both times.
> >
> > Perhaps it is polkit that grants to local users more privileges than to
> > remote ones, e.g. to reboot or to power off. Moreover, it (or some other
> > daemon) may pass access e.g. to sound card on switch of currently active
> > session when several local users are logged in.
> >
> > Likely it is possible to change default policy to give more rights to a
> > specific user even when a remote session is started.
>
> Thanks for the hint.

After some debugging i found a working solution. Allocated file in /etc/
polkit-1/rules.d/99-networkmanager.rules containing:

--------------- cut ------------------
polkit.addRule(function(action, subject) {
 if (action.id == "org.freedesktop.NetworkManager.network-control") {
   if (subject.isInGroup("netdev")) {
    return polkit.Result.YES;
  }
 }
});
--------------- cut ------------------

Hope that helps others.

kind regards
  Petric



Reply to: