I’m in. I intone the words with a sense of victory as I navigate the file directory using only shell commands—a feat that might have impressed the occasional adolescent maybe two decades ago. But then, the camera pans out to reveal a PDF document… inside a Chrome browser… running on Windows.
Yes, this is Linux running in a PDF, running in a browser, on my Windows PC.
This completely unexpected turn, brought to you by Ading2210, the same high school student who gave you Doom running in a PDF. On YouTube, they go by vk6 (via Hackaday).
In the video description showcasing the LinuxPDF project, they explain: “I got Linux running inside a PDF file via a RISC-V emulator compiled to Javascript.”
What a world we’re in today: a world of such compute power that means high-level and rather ubiquitous technologies such as Javascript can run entire emulators, apparently inside PDFs. The fact that PDF documents allow Javascript to execute is a double-edged sword, of course, as while it can allow you to run DOOM and now, apparently, Linux, it can also put you at risk of dodgy malware scripts.
LinuxPDF can run in any Chromium-based browser, which includes Chrome (duh), Brave, Edge, and Opera. You can check it out for yourself here.
Of course, you’re not getting the Ubuntu experience inside your Chromium-powered PDF, rather you’re getting an incredibly barebones command line experience via TinyEMU RISC-V emulation.
And you’re not getting a particularly fast version of that, either, thanks to the layers of emulation. You get a command line, plus a virtual keyboard to press—although you can also type your inputs using your own keyboard using the space at the bottom-right. It’s a little janky (backspace only seems to register on the virtual keyboard, for instance) but what do you expect?
Ading2210 explains: “It works by using a separate text field for each row of pixels in the screen, whose contents are set to various ASCII characters.” Pretty ingenious, if you ask me.
So, first DOOM, and now Linux. What’s next? Crysis? How about a PDF reader running from an emulated OS running inside a PDF? We’re waiting, Ading.
Best SSD for gaming: The best speedy storage today.
Best NVMe SSD: Compact M.2 drives.
Best external hard drive: Huge capacities for less.
Best external SSD: Plug-in storage upgrades.