Chose network connection through xrdp

I’ve setup XRDP on a Lubuntu box, but it does not give me an option to choose which wireless network to connect to, nor can I connect to a VPN server like you can through the normal GUI. It uses whatever settings were already selected through the normal GUI.

Is there a way to select this through xrdp? Or can I configure the gui on xrdp to look more like the default gui?

Asked By: shelum

||

Apparently, you can’t choose network settings when still logged in locally on the box. I logged out and then I was able to select networks on the RDP session.

Answered By: shelum

Depending on which OS you are using, there’s a good chance the problem is with polkit. On Ubuntu, if you create the file [RuleName].pkla in /etc/polkit-1/localauthority/50-local.d/, with rule text to allow network changes, this will begin to work. I caution that I think this also causes some vulnerability, so I would only recommend this to use on an otherwise isolated or well protected machine.

Step by step example:

user@pc:~$ su -
#Don't have to do this, but you will need sudo for writing in the folder/making the rule.  Use whatever method you want.

root@pc:~$ cd /etc/polkit-1/localauthority/50-local.d/
root@pc:/etc/polkit-1/localauthority/50-local.d/$ touch WifixRDPrule.pkla
#Make the rule file in the right folder

root@pc:/etc/polkit-1/localauthority/50-local.d/$vim WifixRDPrule.pkla

Now that you’re in VIM or whatever texteditor you want to use (will need superuser access), add the following rule:

[Allow Wifi Scan]
Identity=unix-user:*
Action=org.freedesktop.NetworkManager.wifi.scan;org.freedesktop.NetworkManager.enable-disable-wifi;org.freedesktop.NetworkManager.settings.modify.own;org.freedesktop.NetworkManager.settings.modify.system;org.freedesktop.NetworkManager.network-control
ResultAny=yes
ResultInactive=yes
ResultActive=yes

Reference. This allowed us to connect and change networks.

Answered By: Atl LED
Categories: Answers Tags: , , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.