XRDP on Ubuntu Desktop and Pop! OS: Difference between revisions
m Стадий: 4 [Фаза:Авторизиране, Статус:Разработен]; Категория:Linux Desktop |
|||
Line 119: | Line 119: | ||
{{devStage | {{devStage | ||
| Прндл = Linux Desktop | | Прндл = Linux Desktop | ||
| Стадий = | | Стадий = 4 | ||
| Фаза = | | Фаза = Авторизиране | ||
| Статус = | | Статус = Разработен | ||
| ИдтПт = Spas | | ИдтПт = Spas | ||
| РзбПт = {{REVISIONUSER}} | | РзбПт = Spas | ||
| АвтПт = {{REVISIONUSER}} | |||
| ИдтДт = 2.07.2022 | | ИдтДт = 2.07.2022 | ||
| РзбДт = {{Today}} | | РзбДт = 24.09.2022 | ||
| АвтДт = {{Today}} | |||
| ИдтРв = [[Special:Permalink/27098|27098]] | | ИдтРв = [[Special:Permalink/27098|27098]] | ||
| РзбРв = {{REVISIONID}} | | РзбРв = [[Special:Permalink/31778|31778]] | ||
| АвтРв = {{REVISIONID}} | |||
}} | }} | ||
</div> | </div> | ||
</noinclude> | </noinclude> |
Revision as of 19:55, 24 September 2022
Here is described how to setup and configure xRDP within Ubuntu Desktop and Pop!_OS.
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
For some reason in Ubuntu 19.04+ nor the package xrdp-pulseaudio-installer
nor the package pulseaudio-module-xrdp
is available. So we need to build the module. Right now I can't find any workaround for Pop!_OS. Here is a related question at Ask Ubuntu which I've asked: What is the relation between PipeWire and PulseAudio on Ubuntu 22.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
See also
References
- Website 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