Contents

NetworkManager Over RDP


Using a Debian VM over RDP

I did not find a suitable answer to this elsewhere, so I’ve decided to document it here - How do you correctly use NetworkManager in a Debian VM when you’re accessing it over RDP? For this example it is a Debian VM using XFCE and let’s assume you’ve installed the OpenVPN plugin using

1
sudo apt install network-manager-openvpn-gnome/stable

From an otherwise clean install, you could access the OpenVPN plugin from the widget on the panel and you’ll see, as expected:

/images/networkmanager-rdp-1.png


However in any of the editing windows the inputs as well as the ‘save’ button will remain grayed out:

/images/networkmanager-rdp-2.png


The same behavior is true throughout NetworkManager - its not possible to modify an entry even if you’re logged in as an ‘administrative’ user with sudo access:

/images/networkmanager-rdp-3.png

PolKit

After fumbling around a bit and a lot of failed googling - I figured out this is due to default PolKit behavior for NetworkManager when accessing it ‘remotely’. In this case RDP is considered ‘remote’.

To override this behavior and not loose the modification after an update, copy the configuration file to /etc where it will override the system defaults:

1
sudo cp /var/lib/polkit-1/localauthority/10-vendor.d/org.freedesktop.NetworkManager.pkla /etc/polkit-1/localauthority/10-vendor.d/

Inside this file, you’ll see three ‘Result’ values including ResultAny, ResultInactive, and ResultActive. The ResultInactive and ResultActive values are only used when a user is logged in locally over a console. The ResultAny is used any time including if the user is logged in ‘remotely’ in this case, over RDP.

/images/networkmanager-rdp-4.png


Change ‘ResultAny’ from ’no’ to ‘auth_admin’.

/images/networkmanager-rdp-5.png


Able to modify NetworkManager over RDP

With that change, it’s now possible to modify and add NetworkManager settings such as a VPN profile:

/images/networkmanager-rdp-6.png


Now, when you click save (and assuming you have sudo group as shown in the .pkla file), it will prompt you to authenticate and then save the changes:

/images/networkmanager-rdp-7.png

Comments

You can use your Fediverse (i.e. Mastodon, among many others) account to reply to this post.