XRDP on Ubuntu Desktop and Pop! OS: Difference between revisions

From WikiMLT
m (Стадий: 4 [Фаза:Авторизиране, Статус:Разработен]; Категория:Linux Desktop)
m (Стадий: 6 [Фаза:Утвърждаване, Статус:Утвърден]; Категория:Linux Desktop)
 
(One intermediate revision by the same user not shown)
Line 119: Line 119:
{{devStage  
{{devStage  
  | Прндл  = Linux Desktop
  | Прндл  = Linux Desktop
  | Стадий = 4
  | Стадий = 6
  | Фаза  = Авторизиране
  | Фаза  = Утвърждаване
  | Статус = Разработен
  | Статус = Утвърден
  | ИдтПт  = Spas
  | ИдтПт  = Spas
  | РзбПт  = Spas
  | РзбПт  = Spas
  | АвтПт  = {{REVISIONUSER}}
  | АвтПт = Spas
| УтвПт = {{REVISIONUSER}}
  | ИдтДт  = 2.07.2022
  | ИдтДт  = 2.07.2022
  | РзбДт  = 24.09.2022
  | РзбДт  = 24.09.2022
  | АвтДт  = {{Today}}
  | АвтДт = 24.09.2022
| УтвДт = {{Today}}
  | ИдтРв  = [[Special:Permalink/27098|27098]]
  | ИдтРв  = [[Special:Permalink/27098|27098]]
  | РзбРв  = [[Special:Permalink/31778|31778]]
  | РзбРв  = [[Special:Permalink/31778|31778]]
  | АвтРв  = {{REVISIONID}}
  | АвтРв = [[Special:Permalink/31780|31780]]
| УтвРв = {{REVISIONID}}
}}
}}
</div>
</div>
</noinclude>
</noinclude>

Latest revision as of 20:55, 24 September 2022

Here is de­scribed how to set­up and con­fig­ure xRDP with­in Ubun­tu Desk­top and Pop!_OS.

In­stall xRDP

sudo apt update
sudo apt install xrdp
sudo systemctl enable xrdp
sudo systemctl status xrdp

Tweak Ubun­tu 22.04 Af­ter Up­grade from 20.04

echo 'export XDG_CURRENT_DESKTOP=ubuntu:GNOME' >> ~/.xsessionrc
Ref­er­ences

Pop OS 22.04 Ad­di­tion­al Set­up

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
Ref­er­ence

In­stall xRDP PulseAu­dio

For some rea­son in Ubun­tu 19.04+ nor the pack­age xrdp-pulseau­dio-in­staller nor the pack­age pulseau­dio-mod­ule-xrdp is avail­able. So we need to build the mod­ule. Right now I can't find any workaround for Pop!_OS. Here is a re­lat­ed ques­tion at Ask Ubun­tu which I've asked: What is the re­la­tion be­tween PipeWire and PulseAu­dio on Ubun­tu 22.04?

Step 1 – In­stall Some Pre­Reqs, En­able source re­po, Build dep

sudo apt install git libpulse-dev autoconf m4 intltool build-essential dpkg-dev

Step 2 – En­able source re­po, 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: Down­load pulseau­dio source in /​​​tmp di­rec­to­ry

cd /tmp
sudo apt source pulseaudio

Step 4: Com­pile

pulsever=$(pulseaudio --version | awk '{print $2}')
echo $pulsever 
cd /tmp/pulseaudio-$pulsever
sudo ./configure --without-caps

Step 5: Cre­ate xrdp sound mod­ules

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 cor­rect lo­ca­tion, as de­fined 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 avail­able for Gua­camole VNC Con­nec­tion with au­dio (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 In­fa­mous sys­tem crash pop­ups in Ubun­tu

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 al­so

Ref­er­ences