On Linux these days it is very easy to serve any window through a browser.
You’ll need to install websockify and novnc for this technique. This post continues from the steps described here:
https://www.server-world.info/en/note?os=Ubuntu_18.04&p=desktop&f=7
Now we will launch the two relevant programs together. A quick program I remembered that can do this is a node package called concurrently
.
I use i3 as my window manager, and would like to create a program called wincat
that I can launch with dmenu to automate the technique.
So here’s /usr/local/bin/wincat
1 | #!/bin/bash |
And here’s /usr/local/bin/_wincat
1 | #!/bin/bash |
Now I can run wincat
, click the window I want to serve, and access the server at https://hostname:6080 – when I’m done I just send interrupt signal to the terminal to kill the process tree.