Attivare l'accesso RDP in Ubuntu

From RVM Wiki
Jump to navigation Jump to search

22.04

  • Usare script in Riferimenti, oppur:e
  • Install:
sudo apt install xrdp
  • Configura:
sudo usermod -a -G ssl-cert xrdp 

Now you need to edit the /etc/xrdp/startwm.sh file. Open the XRDP file on Ubuntu 22.04 with your favorite text editor, here we use vi:

sudo vi /etc/xrdp/startwm.sh 

Add the following commands before the commands that test & execute Xsession:

Unset DBUS_SESSION_ADDRESS
Unset XDG_RUNTIME_DIR
...
if test -r /etc/profile; then
. /etc/profile
fi
Unset DBUS_SESSION_ADDRESS
Unset XDG_RUNTIME_DIRUnset
test -x /etc/X11/Xsession && exec /etc/X11/Xsession
exec /bin/sh /etc/X11/Xsession


sudo systemctl restart xrdp 
  • Fix Allow network and VPN activations
sudoedit /etc/polkit-1/localauthority/50-local.d/47-allow-wifi-scan.pkla
    [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
  • Fix annoying Color rofile creation;
sudoedit /etc/polkit-1/localauthority.conf.d/02-allow-colord.conf


    polkit.addRule(function(action, subject) {
     if ((action.id == "org.freedesktop.color-manager.create-device" ||
     action.id == "org.freedesktop.color-manager.create-profile" ||
     action.id == "org.freedesktop.color-manager.delete-device" ||
     action.id == "org.freedesktop.color-manager.delete-profile" ||
     action.id == "org.freedesktop.color-manager.modify-device" ||
     action.id == "org.freedesktop.color-manager.modify-profile") &&
     subject.isInGroup("{users}")) {
     return polkit.Result.YES;
     }
     });


Riferimenti