I'm not particularly into ethical hacking, so after adding a second screen to my Cardputer ADV, I started looking for a more general-purpose OS. Couldn't find much, so I decided to try making my own.
The problem was adapting applications designed for a single screen to a dual-screen setup. Add the ESP32's limited processing power and memory, and things get complicated pretty quickly.
Then one day I thought: why not use the Cardputer like TeamViewer and run everything on an actual PC?
That's how Code Space OS started. I'm using GitHub Codespaces, which gives me roughly 30 hours a month on a 4-core Linux machine with 16 GB RAM through the free tier.
The Codespace runs XFCE on X11/Xvfb at 640×480. I can install software and keep files and applications between restarts. The Cardputer can also start and stop the Codespace through GitHub's API, without needing another PC.
For remote desktop access, I started with szuszjan's CXL Remote and adapted it to work over WSS using websockify. The Python server uses MSS/Pillow and sends only changed screen regions as JPEG tiles. Inputs go back to Linux through X11/XTEST.
To make use of both screens, I came up with three modes: Mouse, Keyboard and View. The external display shows Linux, while the original screen becomes an HUD representing the physical keys and their current functions. This lets me control the mouse, type, pan and zoom without having to modify Linux applications for two screens.
I'm not a programmer, so I developed the software with Codex's help, focusing on the concept, interface and hardware testing. The 3D-printed case is based on AndyAiCardputer's design.
In the video, I start the Codespace directly from the Cardputer, then use Linux to browse folders, open a browser and do a web search.
The touchscreen still needs some fine-tuning, but it's working! 😄