Someone got Linux running inside a PDF file, because its users are something else
Quoting: Someone got Linux running inside a PDF file, because its users are something else —
Every so often, we see a wave of activity around cramming something that shouldn't be running in a specific document or app into said document or app. If you (like myself) had the naive thought that PDF files were static, boring documents that can't do things like, I don't know, play Tetris or something, then boy, do we have news for you. Someone has taken PDF tinkering to the next level and got Linux running within a document, and you can give it a spin if you don't believe me.
Also:
-
Wow! You Can Now Run Linux Inside a PDF
Other than being a reliable piece of software, Linux has made some really cool things a reality, be it by powering a coffee maker or running Doom on a terminal. Of course, the tinkerers who dedicate their time and resources to innovate are the real MVPs here.
One such tinkerer, vk6_ (aka ading2210/Allen), a high-school student with an affinity for programming, web development, and cybersecurity, has managed to do something very noteworthy.
They successfully managed to run Linux inside a PDF file on a web browser.
Also here:
-
You Can Now Run Linux Inside A PDF File
DOOM ports have been left behind in the past.
Not too long ago, a talented high school student known as Ading2210 managed to create a port of DOOM that runs inside a PDF file, playable right in your browser. Turns out, that's just the beginning of what the popular format can do. Ading2210 took it even further by packing a pretty much functional Linux distribution inside the PDF.
This is Linux running inside a PDF file via a RISC-V emulator, which is based on TinyEMU. Working in a very similar way to the DoomPDF project, LinuxPDF can be launched in any browser on the Chromium engine with support for the PDFium library. A virtual keyboard is used to enter console commands. Both 64- and 32-bit versions are possible for the root file system. You can try LinuxPDF here and lean more about it on GitHub.
Tom's Hardware:
-
Minimal Linux OS runs in a 6MB PDF document in Chrome — LinuxPDF leverages RISC-V emulator
A version of the Linux operating system can now be run inside a PDF opened by a Chromium-based browser. The brains behind the coding gymnastics involved in this 6MB LinuxPDF project belong to high school student Ading2210. If the name is familiar, it might be because the same person created DoomPDF, which we reported on in January.
Ading2210 explains that Linux runs in the PDF within a modified version of the TinyEMU RISC-V emulator. The developer notes that LinuxPDF "works in a very similar way to my previous DoomPDF project." Like DoomPDF, this Linux-in-a-doc project also has a bit of a performance problem, as it is claimed to be "over 100x slower" than it should be.
Hackaday:
-
Nice PDF, But Can It Run Linux? Yikes!
The days that PDFs were the granny-proof Swiss Army knives of document sharing are definitely over, according to [vk6]. He has managed to pull off the ultimate mind-bender: running Linux inside a PDF file. Yep, you read that right. A full Linux distro chugging along in a virtual machine all encapsulated within a document. Just when you thought running DOOM was the epitome of it. You can even try it out in your own browser, right here. Mind-boggling, or downright Pandora’s box?
Let’s unpack how this black magic works. The humble PDF file format supports JavaScript – with a limited standard library, mind you. By leveraging this, [vk6] managed to compile a RISC-V emulator (TinyEMU) into JavaScript using an old version of Emscripten targeting asm.js instead of WebAssembly. The emulator, embedded within the PDF, interfaces with virtual input through a keyboard and text box.
ZDNet:
-
Linux running in a PDF? This hack is as bizarre as it is brilliant | ZDNET
From the office of "What can't Linux run on?" comes a story about a high school student on a mission to prove that an interactive PDF can run all sorts of things.
Earlier this year, Toms Hardware reported that Ading2210 created DoomPDF -- inspired by a port of Tetris that ran on a PDF (Pdftris).
Essentially, the apps (and now the Linux kernel) run in a PDF file loaded into your browser. This works through a limited standard JavaScript library that compiles a RISC-V emulator into JavaScript so it can run within a web browser.
Likely last coverage:
-
Here's Linux running inside a PDF, running inside a browser, running on a Windows PC
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).
Ukrainian:
-
Student turns PDF into functional Linux emulator
A high school student and programmer who goes by the nickname Ading2210 has successfully emulated Linux on a popular file format. While the performance is limited, the project redefines what is possible with JavaScript tools for PDF.
TechSpot:
-
Student turns a PDF into a functional Linux emulator
Early last month, someone used the PDF format's JavaScript support to run Tetris inside what should normally be a static text document. Predictably, within days, a high school student upgraded the hack to run Doom within a PDF file. The same developer has now enhanced the code to run the entire Linux operating system.
Barely a month after unveiling a port of Doom running inside a PDF, high school student and programmer "Ading2210" has successfully emulated Linux within the popular file format. Although performance is limited, the project redefines what's possible with PDF JavaScript tools. Users can try it here using Chromium browsers like Chrome, Edge, and Opera. The source code is available on the developer's GitHub page.
Late coverage:
-
Linux is now running inside a PDF because people are amazing
Just weeks after getting 1993’s Doom running inside a PDF file, ‘ading2210’ has returned by getting an operating system to run inside one. In a new video, the high school programmer has managed to get Linux running, with a demonstration of the terminal and plenty of security warning messages.
It’s obviously not a viable option to run in the day-to-day, but ading2210’s pushing of the PDF is nothing short of fascinating. On his GitHub, he elaborates how he managed to get the software working, which includes leveraging often overlooked features of the PDF file format.
-
First Doom, now Linux: an unnamed high school student runs Linux OS in a PDF doc in Google Chrome so what's next?
A high-school student has achieved another coding feat, getting a lightweight Linux distribution to run inside a PDF document.
Ading2210 developed LinuxPDF for Google Chrome and other Chromium-based browsers by leveraging a version of TinyEMU, a RISC-V emulator, that has been modified to run inside a PDF.
Unlike traditional virtual machines, this emulator operates entirely within Chrome’s PDF viewer by utilizing an older version of Emscripten that compiles to asm.js instead of WebAssembly.
The Register:
-
The Doom-in-a-PDF dev is back – this time with Linux
First came Tetris, then Doom – and now a bare-bones Linux instance that boots inside a PDF.
Yes, the humble PDF – thanks to its ability to run limited JavaScript – has been coaxed into booting a stripped-down 32-bit RISC-V Linux buildroot environment in a suitable PDF viewer. This is made possible by compiling the C-based TinyEMU emulator into JavaScript, and then embedding that into a PDF so that it is executed by the document viewer, and it in turn runs the included small Linux distribution.
The person who managed the achievement also created DoomPDF, which The Register reported last month.
GitHub user ading2210, who identifies themselves as a high school student interested in programming, web development, and cybersecurity, asked us to call him Allen. On the GitHub page for LinuxPDF, he describes the project as working in a similar manner to DoomPDF.
"The full specification for the JS in PDFs was only ever implemented by Adobe Acrobat, and it contains some ridiculous things like the ability to do 3D rendering, make HTTP requests, and detect every monitor connected to the user's system," Allen wrote. "With this, we can do whatever computation we want, just with some very limited I/O [Input/Output]."
The Belated Notebookcheck:
-
High-schooler creates LinuxPDF: Running Linux on a RISC-V emulator inside a PDF file
A high schooler who goes by the online handle of ading2210 has released LinuxPDF, software that runs Linux within a PDF file. This comes after his earlier release of DoomPDF, software that runs the video game Doom within a PDF file. The demonstration version of LinuxPDF can be accessed using a Chromium-based web browser here.
Web browsers use HTML, CSS, and Javascript to create the interactive web pages we see across the Internet today. A subset of those languages are available in modern PDF browsers to execute code.
TinyEMU is a small RISC-V system emulator running Linux, and the uncompiled TinyEMU code with Linux OS can be downloaded in a 15 MB file. This is small enough to be run within a PDF browser without much difficulty, especially when viewing that PDF file within a web browser as linked above.