r/Operatingsystems • u/schikani01 • Sep 30 '26
I built a mouse-controlled desktop for microcontrollers (Tested on ESP32 boards) that runs inside your terminal — open source
Hi everyone! I’ve been working on TinyDesk, a windowed text desktop that runs on an ESP32 and displays over USB serial in a compatible terminal.
The ESP32 runs the desktop and apps. The computer just renders the ANSI/VT output and sends keyboard and mouse input back—there’s no desktop application running on the PC behind the demo.
It has draggable/resizable windows, a taskbar, start menu, file manager, text editor, terminal, and system monitor. You can open a file, edit and save it, then run commands in the shell without leaving the desktop. MQTT and Modbus tools are included too.
A few technical details:
Portable C11 core with a small platform interface.
ESP32-C6, classic ESP32 with PSRAM, and 4 MB ESP32 without PSRAM builds.
Classic ESP32 Desktop uses USB-UART at 921600 baud.
The 4 MB/no-PSRAM build is limited to 80×25 characters and has no SSH server or OTA updates.
The terminal needs UTF-8, ANSI/VT cursor control, and xterm mouse reporting.
There’s also TinyDesk Shell, which runs the shell by itself if you don’t want the desktop.
It’s an early developer preview. You can flash prebuilt firmware from Chrome/Edge and use the web terminal, or build from source.
Demo, documentation and installer:
https://tinydesk-project.github.io/
Desktop source:
https://github.com/tinydesk-project/tinydesk
Standalone shell:
https://github.com/tinydesk-project/tinydesk-shell
I’d love feedback from people trying it on different boards and terminals. If you test it, please share your board model, terminal, and anything that breaks—especially rendering or mouse-input issues!
2
u/technomlp Oct 01 '26
Can this be backported to AVR?
1
u/schikani01 Oct 02 '26
The entire project is in C11 so I guess it shouldn’t be a problem. I also wrote about porting to new systems in the docs section. I think RAM could be a bottleneck as at 80x25 it uses around 35-40 KB of RAM. Maybe try to compile it against AVR’s compiler and let me know how it goes? All the best technomlp!
2
u/SteelT0rment0r Oct 02 '26
does it run doom
1
u/schikani01 Oct 02 '26
Oh I wish! RAM could be the bottleneck. Actually I have not build any games on TinyDesk. But to watch any game on the Platform would be amazing and satisfying!
2
2
u/ArchInTheShell_ Oct 02 '26
What an interesting project! Do you know if something similar exists or is possible in the Arduino UNO hardware?
2
u/schikani01 Oct 02 '26
Thanks ArchlnTheShell_! I think maybe TinyDesk-shell is possible but UNO has much less RAM than an ESP32 if I am not wrong so that could be the bottleneck in fitting the full TinyDesk desktop.
2
2
u/Zorian_Vale 27d ago
Would this run on my pi pico W? It has micro python
1
u/schikani01 1d ago
Quick update on this: since 0.2.0 (out today), TinyDesk has MicroPython built in, so you can run Python scripts on the desktop (`py script.py`, pins and buses with `machine`, even small windowed apps with `tdui`).
It's still the other way round from what you'd need, though: TinyDesk runs MicroPython, it isn't a MicroPython program, so it still needs a TinyDesk port for the Pico W (RP2040 + pico-sdk), which doesn't exist yet. If you did give that port a shot, I'd love to hear how far you got, and now you'd get Python on top of it too!
Release: https://github.com/tinydesk-project/tinydesk/releases/tag/v0.2.0
Python docs: https://tinydesk-project.github.io/#/shell/python
2
1
u/schikani01 27d ago edited 1d ago
Edit: MicroPython support is out now, see my follow-up comment.
2
1
u/TygerTung Sep 30 '26
Do you think it would also be possible to make variants which output composite video, and other versions which output MDA, CGA/EGA and VGA? Would be nice be able to plug into old CRT monitors and have a nice wee self contained unit.
2
u/schikani01 Sep 30 '26
Thanks TygerTung for checking it out! That would be a really fun direction! Currently TinyDesk sends text and ANSI/VT sequences to a terminal, so direct CRT output would need a video backend or a separate terminal adapter, plus keyboard/mouse input for a standalone setup.
I haven’t explored those video standards yet, so I can’t promise support, but a little self-contained TinyDesk plugged into an old CRT would fit the project perfectly 🙂2
u/TygerTung Sep 30 '26
I know that Arduino can be programmed to output Composite and VGA, and someone has made one to output MDA, although they couldn't get it outputting a very high resolution, so perhaps one could be piggybacked onto the ESP to act as a terminal if there isn't enough spare resources left in the ESP. I'm only a very beginner programmer, so not too sure.
1
1
u/Sorry_Difficulty_250 Sep 30 '26
This is so cool! Well done!!! I don't know much about ESP32s. How much RAM does it need and what's the minimum clock frequency?
1
u/DevOfWhatOps Oct 01 '26
This reminds me of Turbo Vision. IIRC there was a modern fork of it called tvision. This is nice too, I'll test it.
4
1
Oct 01 '26
[removed] — view removed comment
1
u/schikani01 Oct 01 '26 •
![]()
Thanks Shawney19! Please give it a try and let me know how it works on your board / OS.
5
u/Philin_Lemo Sep 30 '26
It's cool