XRDP on Ubuntu Desktop and Pop! OS
Конфигуриране на достъп до Ubuntu Desktop чрез xRDP.
Install xRDP
sudo apt update
sudo apt install xrdp
sudo systemctl enable xrdp
sudo systemctl status xrdp
Tweak Ubuntu 22.04 After Upgrade from 20.04
echo 'export XDG_CURRENT_DESKTOP=ubuntu:GNOME' >> ~/.xsessionrc
References
Pop OS 22.04 Additional Setup
sudo nano /etc/xrdp/startwm.sh
#!/bin/sh
# xrdp X session start script (c) 2015, 2017, 2021 mirabilos
# published under The MirOS Licence
# Rely on /etc/pam.d/xrdp-sesman using pam_env to load both
# /etc/environment and /etc/default/locale to initialise the
# locale and the user environment properly.
export GNOME_SHELL_SESSION_MODE=pop
export GDMSESSION=pop
export XDG_CURRENT_DESKTOP=pop:GNOME
if test -r /etc/profile; then
. /etc/profile
fi
test -x /etc/X11/Xsession && exec /etc/X11/Xsession
exec /bin/sh /etc/X11/Xsession
Reference
Install xRDP PulseAudio
По някаква причина пакета xrdp-pulseaudio-installer
не е наличен в Ubuntu 19.04+. За това се налагат следните стъпки.
Step 1 – Install Some PreReqs, Enable source repo, Build dep
sudo apt install git libpulse-dev autoconf m4 intltool build-essential dpkg-dev
Step 2 – Enable source repo, Build dep
sudo cp /etc/apt/sources.list{,.bak}
sudo sed -Ei 's/^# deb-src /deb-src /' /etc/apt/sources.list
sudo apt-get update
Step 3: Build dep
sudo apt build-dep pulseaudio
Step 4: Download pulseaudio source in /tmp
directory
cd /tmp
sudo apt source pulseaudio
Step 4: Compile
pulsever=$(pulseaudio --version | awk '{print $2}')
echo $pulsever
cd /tmp/pulseaudio-$pulsever
sudo ./configure --without-caps
Step 5: Create xrdp sound modules
sudo git clone https://github.com/neutrinolabs/pulseaudio-module-xrdp.git
cd pulseaudio-module-xrdp
sudo ./bootstrap
sudo ./configure PULSE_DIR="/tmp/pulseaudio-$pulsever"
sudo make
Step 6: Copy files to correct location, as defined in /etc/xrdp/pulse/default.pa
sudo cp /etc/xrdp/pulse/default.pa{,.bak}
cd /tmp/pulseaudio-$pulsever/pulseaudio-module-xrdp/src/.libs
sudo install -t "/var/lib/xrdp-pulseaudio-installer" -D -m 644 *.so
pulseaudio -k
Step 7: Make the sync available for Guacamole VNC Connection with audio (as in /etc/pulse/default.pa
):
cat << EOF | sudo tee -a /etc/xrdp/pulse/default.pa
# Custom settings - Apache Guacamole VNC transfer audio
load-module module-native-protocol-tcp auth-anonymous=1
load-module module-zeroconf-publish
EOF
xRDP Fix the Infamous system crash popups in Ubuntu
sudo cp /etc/polkit-1/localauthority/50-local.d/45-allow-colord.pkla{,.bak}
sudo rm /var/crash/*
cat << EOF | sudo tee /etc/polkit-1/localauthority/50-local.d/45-allow-colord.pkla
[Allow Colord all Users]
Identity=unix-user:*
Action=org.freedesktop.color-manager.create-device;org.freedesktop.color-manager.create-profile;org.freedesktop.color-manager.delete-device;org.freedesktop.color-manager.delete-profile;org.freedesktop.color-manager.modify-device;org.freedesktop.color-manager.modify-profile
ResultAny=no
ResultInactive=no
ResultActive=yes
EOF
Още настройки
Неправни са още няколко настройки, чрез скриптовете поместени в следните секции на статията Apache Guacamole VNC Client and PulseAudio for Desktop Users:
Референции
- Wwebsite for Students: How to Connect via Remote Desktop (RDP) to Ubuntu 20.04 | 18.04
- Answertopia: Displaying Ubuntu 20.04 Applications Remotely (X11 Forwarding)
- Linuxize: How to Install Xrdp Server (Remote Desktop) on Ubuntu 20.04
- GitHub Gist by Rkttu: Ubuntu 20.04 + WSL 2 + XRDP PulseAudio
- C‑energy: xRDP – Missing packages for Sound Redirection in Ubuntu 19.04
- C‑energy: xRDP – The Infamous “Authentication Required to Create Managed Color Device” Explained
- C‑energy: xRDP – How to Fix the Infamous system crash popups in Ubuntu 18.04 (and previous versions)
- Apalrd's Adventures at YouTube: A Modern Linux Graphical TERMINAL SERVER | Complete Guide for Remote Access | Any Device, Many Users