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:


Then, on my laptop, I can run this script:

if [ $# -eq 0 ]
	export XDG_RUNTIME_DIR=/tmp
	exec cage sway-remote launch
	sleep 3
	exec xfreerdp \
		-v homura \
		--bpp 32 \
		--size 1280x800 \

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/ [mailing list etiquette]

Articles from blogs I read Generated by openring

What's cooking on Sourcehut? September 2022

Guten Morgen, SourceHut! Today, I count 681 new users, for a grand total of 32281 registered users. As always, a warm welcome to them and the reminder to everyone else to help them feel welcome while they get settled. Today, I am filling in for Drew on short…

via Blogs on Sourcehut September 15, 2022

Status update, September 2022

Hi all! This month I’ve been working on stuff I’d usually not work on willingly. And by that I mean Rust and screen tearing of course. I’ve been randomly typing keys on my keyboard and before I knew it, a wlroots-rs repository was created. Everybody is saying…

via emersion September 15, 2022

Futurist prediction methods and accuracy

I've been reading a lot of predictions from people who are looking to understand what problems humanity will face 10-50 years out (and sometimes longer) in order to work in areas that will be instrumental for the future and wondering how accurate thes…

via September 12, 2022