from Hacker News

Linux Running in a PDF

by theden on 2/6/25, 6:52 AM with 104 comments

  • by surrTurr on 2/6/25, 12:41 PM

    Doesn't work, the document is unresponsive. I used a HP DeskJet 2820e Printer btw.
  • by neilv on 2/6/25, 11:43 AM

        1. Linux Running in a PDF (doompdf.dev)
        114 points by theden 4 hours ago | flag | hide | 37 comments
    
        2. Ingesting PDFs and why Gemini 2.0 changes everything (sergey.fyi)
        978 points by serjester 17 hours ago | flag | hide | 323 comments
    
    As people start bolting various kinds of PDF parsers and evaluators to LLMs, there's got to be some interesting hack potential.
  • by forgotpwd16 on 2/6/25, 8:50 AM

    Posted few days ago: https://news.ycombinator.com/item?id=42891937. Repo also provides some explanation/info on how the machinery works.
  • by frabert on 2/6/25, 11:44 AM

    Finally! I've been making the joke "put Linux.js in a PDF so I can run Linux, inside a PDF, inside a browser, inside Linux, inside a PDF, inside a browser, inside Linux" for far too long...
  • by nialv7 on 2/6/25, 11:24 AM

    Using JS for this feels like cheating... I wonder if similar things would be possible with PostScript?
  • by karel-3d on 2/6/25, 10:51 AM

    Finally, I can `rm -rf /` in a PDF.
  • by luismedel on 2/6/25, 2:29 PM

    Copy 10 of these in an USB drive. Enjoy your mobile Kubernetes cluster.

    https://news.ycombinator.com/item?id=42681039

  • by sillyboi on 2/6/25, 12:47 PM

    At least three detections on VirusTotal, but I'm not sure if it's significant.

    ClamAV: Js.Trojan.Obfus-48

    Cylance: Unsafe

    Google: Detected

  • by beretguy on 2/6/25, 11:22 AM

    Set pdfjs.enableScripting in Firefox about:config to false.
  • by nanna on 2/6/25, 9:34 AM

    But is there a Linux PDF editor that runs Linux in a PDF? Evince isn't loading it for me...
  • by rolandog on 2/6/25, 11:34 AM

    Does anyone know if running PDFs through the following filter (as in [0]) prevent malicious actors?

        gs \
            -dNOPAUSE \
            -sDEVICE=pdfwrite \
            -sOUTPUTFILE=clean.pdf \
            -dBATCH \
            dirty.pdf
    
    
    [0]: https://tex.stackexchange.com/a/481609/29430
  • by surrTurr on 2/6/25, 10:47 AM

    Who the hell keeps making those? First I saw Tetris, now a whole OS. Awesome!
  • by snvzz on 2/6/25, 9:25 AM

    Missing from headline: It is a RISC-V VM.
  • by floating-io on 2/6/25, 11:01 AM

    Right below this in my feed:

    > Ingesting PDFs and why Gemini 2.0 changes everything

    Be afraid.

    Be very afraid.

  • by nunobrito on 2/6/25, 9:26 AM

    Does it run doom? ;-)
  • by ddalex on 2/6/25, 9:54 AM

    Just because you can, doesn't mean you should....
  • by superkuh on 2/6/25, 2:09 PM

    These "dynamic pdfs" are the anti-thesis of what pdf files are meant to be: static objects containing text that always looks the same. My state dept. of natural resources loves them which means all the regulations are now inaccessible. All I can see in the "pdfs" (not pdfs, pdf shells that are webpages) are the following lines,

    "Please wait... If this message is not eventually replaced by the proper contents of the document, your PDF viewer may not be able to display this type of document."

    ... because they pull down their actual contents using JS from some website. They are the anti-thesis to what a pdf file is meant to be. Truly the worst of both worlds and a huge step backwards in accessibility and longevity. All that a screen reader can read is the above text.

  • by afandian on 2/6/25, 10:47 AM

    Doesn't work in Evince or Firefox FWIW.
  • by sylware on 2/6/25, 11:08 AM

    I have not updated my noscript pdf reader in years... The dreade update is coming up though: mupdf.
  • by teddyh on 2/9/25, 8:45 PM

    > Note: This PDF only works in Chromium-based browsers.
  • by amelius on 2/6/25, 12:33 PM

    I hear that CSS is Turing complete.
  • by DimuP on 2/6/25, 11:10 AM

    Damn this is actually interesting
  • by DonHopkins on 2/6/25, 1:22 PM

    Has anyone tried printing it? I'm afraid!
  • by raxxorraxor on 2/6/25, 3:20 PM

    Taste is subjective, but this broke that barrier. It is just absolutely hideous. Good engineering work, but still a total abomination in itself.
  • by drivingmenuts on 2/6/25, 2:37 PM

    Doesn't work in Safari (?).
  • by hassleblad23 on 2/6/25, 1:53 PM

    What’s next? GPT in PDF?
  • by bpev on 2/6/25, 1:07 PM

    ingest this, gemini
  • by pletnes on 2/6/25, 8:54 AM

    I would really appreciate if someone could put a decent PDF reader, like Sumatra, into a PDF so I could have a portable and good PDF reader on locked down computers.