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

From WikiMLT
m (Стадий: 6 [Фаза:Утвърждаване, Статус:Утвърден]; Категория:Linux Desktop)
 
(8 intermediate revisions by the same user not shown)
Line 1: Line 1:


<noinclude><!--[[Category:Linux_Desktop|?]]-->{{ContentArticleHeader/Linux_Desktop}}</noinclude>
<noinclude><!--[[Category:Linux_Desktop|?]]-->{{ContentArticleHeader/Linux_Desktop}}</noinclude>
Конфигуриране на достъп до Ubuntu Desktop чрез xRDP.
Here is described how to setup and configure xRDP within Ubuntu Desktop and Pop!_OS.


== Install xRDP ==
== Install xRDP ==
Line 20: Line 20:
* Ask Ubuntu: [https://askubuntu.com/a/1411516/566421 No option for appearance in settings after upgrade to 22.04]
* Ask Ubuntu: [https://askubuntu.com/a/1411516/566421 No option for appearance in settings after upgrade to 22.04]


=== Pop OS 22.04 Additional Setup ===
== Pop OS 22.04 Additional Setup ==
<syntaxhighlight lang="shell" line="1">
<syntaxhighlight lang="shell" line="1">
sudo nano /etc/xrdp/startwm.sh
sudo nano /etc/xrdp/startwm.sh
Line 49: Line 49:


== Install xRDP PulseAudio ==
== Install xRDP PulseAudio ==
По някаква причина пакета <code>xrdp-pulseaudio-installer</code> не е наличен в Ubuntu 19.04+. За това се налагат следните стъпки.
For some reason in Ubuntu 19.04+ nor the package <code>xrdp-pulseaudio-installer</code> nor the package <code>pulseaudio-module-xrdp</code> 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: [https://askubuntu.com/q/1432040/566421 What is the relation between PipeWire and PulseAudio on Ubuntu 22.04?]


'''Step 1 - Install Some PreReqs, Enable source repo, Build dep'''<syntaxhighlight lang="shell" line="1">
'''Step 1 - Install Some PreReqs, Enable source repo, Build dep'''<syntaxhighlight lang="shell" line="1">
Line 101: Line 101:
</syntaxhighlight>
</syntaxhighlight>


== Още настройки ==
== See also ==
Неправни са още няколко настройки, чрез скриптовете поместени в следните секции на статията [[Ubuntu Desktop 20.04 PulseAudio for Apache Guacamole VNC]]:


* [[Ubuntu Desktop 20.04 PulseAudio for Apache Guacamole VNC#.D0.A3.D0.BF.D1.80.D0.B0.D0.B2.D0.BB.D0.B5.D0.BD.D0.B8.D0.B5 .D0.BD.D0.B0 Gdm3|Управление на Gdm3]]
* [[Apache Guacamole VNC Client and PulseAudio for Desktop Users]]
* [[Ubuntu Desktop 20.04 PulseAudio for Apache Guacamole VNC#Startup script|Startup script]]
* [[Kali Linux Install xRDP]]


== Референции ==
== References ==
* Wwebsite for Students: [https://websiteforstudents.com/how-to-connect-via-remote-desktop-rdp-to-ubuntu-20-04-18-04/ How to Connect via Remote Desktop (RDP) to Ubuntu 20.04 | 18.04]
* Website for Students: [https://websiteforstudents.com/how-to-connect-via-remote-desktop-rdp-to-ubuntu-20-04-18-04/ How to Connect via Remote Desktop (RDP) to Ubuntu 20.04 | 18.04]
* Answertopia: [https://www.answertopia.com/ubuntu/displaying-ubuntu-applications-remotely-x11-forwarding/ Displaying Ubuntu 20.04 Applications Remotely (X11 Forwarding)]
* AnswerTopia: [https://www.answertopia.com/ubuntu/displaying-ubuntu-applications-remotely-x11-forwarding/ Displaying Ubuntu 20.04 Applications Remotely (X11 Forwarding)]
* Linuxize: [https://linuxize.com/post/how-to-install-xrdp-on-ubuntu-20-04/ How to Install Xrdp Server (Remote Desktop) on Ubuntu 20.04]
* Linuxize: [https://linuxize.com/post/how-to-install-xrdp-on-ubuntu-20-04/ How to Install Xrdp Server (Remote Desktop) on Ubuntu 20.04]
* GitHub Gist by Rkttu: [https://gist.github.com/rkttu/35ecab5604c9ddc356b0af4644d5a226 Ubuntu 20.04 + WSL 2 + XRDP PulseAudio]
* GitHub Gist by Rkttu: [https://gist.github.com/rkttu/35ecab5604c9ddc356b0af4644d5a226 '''Ubuntu 20.04 + WSL 2 + XRDP PulseAudio''']
* C-energy: [https://c-nergy.be/blog/?p=13655 xRDP – Missing packages for Sound Redirection in Ubuntu 19.04]
* C-energy: [https://c-nergy.be/blog/?p=13655 xRDP – Missing packages for Sound Redirection in Ubuntu 19.04]
* C-energy: [https://c-nergy.be/blog/?p=12073 xRDP – The Infamous “Authentication Required to Create Managed Color Device” Explained]
* C-energy: [https://c-nergy.be/blog/?p=12073 xRDP – The Infamous “Authentication Required to Create Managed Color Device” Explained]
Line 120: Line 119:
{{devStage  
{{devStage  
  | Прндл  = Linux Desktop
  | Прндл  = Linux Desktop
  | Стадий = 3
  | Стадий = 6
  | Фаза  = Разработване
  | Фаза  = Утвърждаване
  | Статус = Разработван
  | Статус = Утвърден
  | ИдтПт  = Spas
  | ИдтПт  = Spas
  | РзбПт  = {{REVISIONUSER}}
  | РзбПт = Spas
| АвтПт  = Spas
| УтвПт = {{REVISIONUSER}}
  | ИдтДт  = 2.07.2022
  | ИдтДт  = 2.07.2022
  | РзбДт  = {{Today}}
  | РзбДт = 24.09.2022
| АвтДт  = 24.09.2022
| УтвДт = {{Today}}
  | ИдтРв  = [[Special:Permalink/27098|27098]]
  | ИдтРв  = [[Special:Permalink/27098|27098]]
  | РзбРв  = {{REVISIONID}}
  | РзбРв = [[Special:Permalink/31778|31778]]
| АвтРв  = [[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