Howto configure SDDM/KDE/PLASMA remote deskop with xpra #3911
Replies: 2 comments 4 replies
-
Don't use
Have you tried using |
Beta Was this translation helpful? Give feedback.
-
Err. It's plain facts.
"False" - it's your point of view. 😉 |
Beta Was this translation helpful? Give feedback.
-
Howto configure SDDM/KDE/PLASMA remote deskop with xpra.
As it took me a while to make all that stuff working, I share here my personal notes here, hoping it can be useful for others or enhanced with probably better X config practice as I'm not an X11 expert.
Context : I'm trying to build containerized Alpine desktop OS image to be run on common container runtime (docker, podman, LXD,...). The goal is to deploy ephemeral VDI (Virtual Desktop Infrastructure) at scale on demand for network or computer science MOOC lab sessions on k8s infrastructure.
_
_
Desktop is KDE/PLASMA with its display manager i.e. SDDM. This note is about that latter configuration for clientless remote desktop on common HTML5 able browser. One key feature of that config is dynamic resolution adjustment of the remote virtual display to the browser window size. Googling, I didn't find lot of guidelines about SDDM on xpra, that's the goal of this note.
In such execution context (containers or pods) no graphic card (hardware nor paravirtualized), so Xorg is run with Xdummy driver, which offert the dynamic resolution capability. From xpra Xdummy doc, set Xorg parms to those values :
One key point to consider with display manager is the X server is driven by the DM, and with SDDM renewed at each session with its own extra Xorg parms, including a dynamic xauth config file named. So SDDM appends
-background none -seat seat0 vt2 -auth /var/run/sddm/xauth_Xwxyz -noreset -displayfd 18
to the previous command with randomXwxyz
file suffix. Xorg call config is located in the[X11]
stanza of the sddm.conf file. In my case located in the/etc/sddm.conf.d/10-sddm-xpra-xdummy.conf
splitted conf file./etc/sddm.conf.d/10-sddm-xpra-xdummy.conf
file :So SDDM and its KDE/PLASMA session now run on an Xdummy xorg server. As told earlier this X server is respawned at each session with new xauth token file, so xpra in desktop mode has to be upgraded at each session. Xpra launch and its parms were placed inside a
/etc/xpra/scrpits/xpra-remote-desktop.sh
script to be restarted at each session by a call from the/usr/share/sddm/scripts/Xsetup
SDDM hook script./etc/xpra/scrpits/xpra-remote-desktop.sh
file :Then add
xpra-remote-desktop.sh
call at the bottom of/usr/share/sddm/scripts/Xsetup
SDDM hook script.Nota : That
xpra-remote-desktop.sh
script could also be used on legacy baremetal or HVM VM systems to remote display classical X on graphic card server.Nota :
--bind-tcp
is bound on localhostlo
interface in dual stack IPv6/IPv4 mode to ssh tunneled access through IPv6 as well IPv4 in dual stack mode as well as IPv6 or IPv4 only mode.Nota : On that conf test, xpra is tcp bound on localhost
lo
interface in clear HTTP protocol and acceded only through ssh tunnel. I am aware that it would also be necessary to consider more classical conf with usual secure web access protocols such https, wss, quic... also IPv6 only or dual stack mode.For local test
In the container : note ip address of the container - launch sddm - on the docker host open tunneled ssh session to container on local source tunnel port
xxxx
and remote target tunnel port8080
- then point your browser tohttp://[::1]:xxxx
for IPv6 orhttp://127.0.0.1:xxxx
for ancient IPv4For example on default docker bridge
docker0
if LLA IPv6 address oneth0
inside the container isfe80::42:acff:fe11:2/64
Set up ssh tunnel using
command and then point your usual recent (html5 compliant) browser to
http://[::1]:8080
orhttp://127.0.0.1:8080
Nota : on host, docker has to have IPv6 enabled (see : enable IPv6 support), otherwise the loopback
lo
interface inside the container does not have standard::1
IPv6 localhost address set and dual stackxpra-remote-desktop.sh
will fail.Nota : If you want to stay in ancient world you can open your tunnel on IPv4. Assuming that IPv4
eth0
container address is 172.17.0.2 then ssh command could be :Nota : When changing the browser window size, sometimes you may need to reload the xpra html5 page, with the browser command, to trigger the resolution adjustment (strangely, the reload command from xpra status bar not working, maybe because of ssh tunnel redirection ?). - need further investigation...
Beta Was this translation helpful? Give feedback.
All reactions