Using Cage for a seamless remote Wayland session
source link: https://drewdevault.com/2019/04/23/Using-cage-for-a-seamless-RDP-Wayland-desktop.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Using Cage for a seamless remote Wayland session April 23, 2019 on Drew DeVault's blog
Congratulations to Jente Hidskes on the first release of Cage! Cage is a Wayland compositor designed for kiosks - though, as you’ll shortly find out, is useful in many unexpected ways. It launches a single application, in fullscreen, and exits the compositor when that application exits. This lets you basically add a DRM+KMS+libinput session to any Wayland-compatible application (or X application via XWayland) and run it in a tiny wlroots compositor.
I actually was planning on writing something like this at some point (for a project which still hasn’t really come off the ground yet), so I was excited when Jente announced it in December. With the addition of the RDP backend in wlroots, I thought it would be cool to combine these to make a seamless remote desktop experience. In short, I installed FreeRDP and Cage on my laptop, and sway on my desktop. On my desktop, I generated TLS certificates per the wlroots docs and ran sway like so:
WLR_RDP_TLS_CERT_PATH=$HOME/tls.crt \
WLR_RDP_TLS_KEY_PATH=$HOME/tls.key \
WLR_BACKENDS=rdp \
sway
Then, on my laptop, I can run this script:
#!/bin/sh
if [ $# -eq 0 ]
then
export XDG_RUNTIME_DIR=/tmp
exec cage sway-remote launch
else
sleep 3
exec xfreerdp \
-v homura \
--bpp 32 \
--size 1280x800 \
--rfx
fi
The first branch is taken on the first run, and it starts up cage and asks it to
run this script again. The second branch then starts up xfreerdp and connects to
my desktop (its hostname is homura
). xfreerdp is then fullscreened and all of
my laptop’s input events are directed to it. The result is an experience which
is basically identical to running sway directly on my laptop, except it’s
actually running on my desktop and using the remote desktop protocol to send
everything back and forth.
This isn’t especially practical, but it is a cool hack. It’s definitely not network transparency like some people want, but I wasn’t aiming for that. It’s just a neat thing you can do now that we have an RDP backend for wlroots. And congrats again to Jente - be sure to give Cage a look and see if you can think of any other novel use-cases, too!
Have a comment on one of my posts? Start a discussion in my public inbox by sending an email to ~sircmpwn/[email protected] [mailing list etiquette]
Articles from blogs I read Generated by openring
Go on ARM and Beyond
The industry is abuzz about non-x86 processors recently, so we thought it would be worth a brief post about Go’s support for them. It has always been important to us for Go to be portable, not overfitting to any particular operating sys…
via The Go Programming Language Blog December 17, 2020Status update, December 2020
Hi all! This status update is the 24th one, so it’s been 2 years I’ve started writing those now (ignoring a little hiatus). Time flies! This month I’ve invested a lot of time into wlroots. My main focus has been renderer v6, which has now been internally rol…
via emersion December 16, 2020What's cooking on Sourcehut? December 2020
A brisk wind of winter chill sets a stir down my spine, as I sit down with a fresh cup of coffee to yarn a story of careful engineering and passionate spirit that took place over the course of 30 days. The last 30 days. Cause this is the monthly “what’s cook…
via Blogs on Sourcehut December 15, 2020Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK