

Here is the author’s blog post: https://www.byran.ee/posts/creation/
Very interesting stuff. I’m waiting for the deep dive on the various issues with great interest.


Here is the author’s blog post: https://www.byran.ee/posts/creation/
Very interesting stuff. I’m waiting for the deep dive on the various issues with great interest.


I get you. I have many similar stories. Where things should have been simple, a 4 steps process. And yet.
Last time was the printer no longer working from my mom’s iPhone. It’s supposed to detect the printer automatically when on the same network, it no longer did. And the stored/“remembered” entry did not work either.
After many troubleshoting steps, I gave up, sent the document to another computer and printed from there. So, clearly, the printer worked (for once) and accepted commands from the LAN.


Enable permissions for KMS capture.
Warning
Capture of most Wayland-based desktop environments will fail unless this step is performed.
Note
cap_sys_admin may as well be root, except you don’t need to be root to run it. It is necessary to allow Sunshine to use KMS capture.
Enable
sudo setcap cap_sys_admin+p $(readlink -f $(which sunshine))Disable (for Xorg/X11 only)
sudo setcap -r $(readlink -f $(which sunshine))
Their install instruction are pretty clear to me. The actual instruction is to run
sudo setcap cap_sys_admin+p $(readlink -f $(which sunshine))
This is vaguely equivalent to setting the setuid bit on programs such as sudo which allows you to run as root. Except that the program does not need to be owned by root. There are also some other subtleties, but as they say, it might as well be the same as running the program directly as root. For the exact details, see here: https://www.man7.org/linux/man-pages/man7/capabilities.7.html and look for CAP_SYS_ADMIN.
In other words, the commands gives all powers to the binary. Which is why it can capture everything.
Using KMS capture seems way overkill for the task I would say. But maybe the wayland protocol was not there yet when this came around or they need every bit of performance they can gain. Seeing the project description, I would guess on the later as a cloud provider would dedicate a machine per user and would then wipe and re-install between two sessions.
When running cat this way, you are in “cooked mode”. A ctrl-d does nothing on a non-empty line.
The shell usually runs in non-cokked, or raw, mode as well as nonblocking mode. Where it sees (nearly) every key you press as you press them. Which is why it " sees" the ctrl-d even when you are not on an empty line.
You can learn more here: