glitchpeg(6x)

πŸ¦‹ glitchpeg β€” the manual, bestie edition

okay so real talk, this is glitchpeg(6x) from the XScreenSaver manual, and it's literally one of the most chaotic little programs ever. let me walk you through it πŸ’…


✨ NAME ✨

glitchpeg β€” the glitched image screen saver. yes. that's the whole job. it takes pictures and Ruins Them on purpose. iconic behavior honestly πŸŽ€


🌸 SYNOPSIS 🌸

           [--root] [--window-id number] [--delay number] [--duration number]
           [--count number]

πŸ’– DESCRIPTION πŸ’–

So here's the whole vibe: it loads an image, corrupts it, and then displays the corrupted version, several times a second. Then after a while it gets bored (relatable) and finds a new image to corrupt. slay.

The way it glitches the image is genuinely so unhinged β€” it alters random bytes in the compressed image file before de-compressing it. so it's not editing pixels, bestie, it's editing the actual bytes of the file and then letting the decoder do its thing. this creates interesting visual effects on JPEG files πŸ“ but ngl it doesn't work well on PNG files, since PNG contains checksums that detect simple corruption. PNG said "not today" 😭


πŸ”₯ OPTIONS πŸ”₯

  • --visual visual β€” specify which visual to use. legal values are the name of a visual class, or the id number (decimal or hex) of a specific visual.
  • --window β€” draw on a newly-created window. this is the default, so like, you don't even have to ask.
  • --root β€” draw on the root window. main character energy for your whole desktop.
  • --window-id number β€” draw on the specified window. you pick it, it draws there.
  • --delay number β€” per-frame delay, in microseconds. default: 30000 (that's 0.03 seconds, in case your brain also refuses to do microsecond math 🫢).
  • --duration number β€” how many seconds before loading a new image. default: 120.
  • --count number β€” number of glitches to introduce per iteration. default: 400. four hundred little acts of vandalism per pass, we love to see it πŸ’…

🌈 ENVIRONMENT 🌈

  • DISPLAY β€” to get the default host and display number.
  • XENVIRONMENT β€” to get the name of a resource file that overrides the global resources stored in the RESOURCE_MANAGER property.
  • XSCREENSAVER_WINDOW β€” the window ID to use with --root.

πŸ’€ SECURITY πŸ’€

okay bestie, this is the serious part, listen up. because this program is feeding intentionally-invalid data into your operating system's image-decoding libraries, it is possible that it may crash as a result of that corrupted data.

that should not be possible β€” but it might be. πŸ™ˆ

Please note that if this happens, that indicates a serious security bug in your system's image libraries! it likely means that your libraries are susceptible to buffer overflow attacks or similar, which can lead to remote code execution. you should report that bug to the maintainers of those image libraries. like, immediately. not "later", not "someone else will do it". them. 🚨

in the context of xscreensaver, when configured to load only local image files, this should not be a direct security concern: this screen saver crashing will not affect the xscreensaver daemon and will not unlock your screen. so your screen stays locked, bestie, we promise πŸ’œ


⭐ SEE ALSO ⭐

X(1), xscreensaver(1) β€” go read those too, iykyk.


Copyright Β© 2018 by Jamie Zawinski. permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. no representations are made about the suitability of this software for any purpose. it is provided "as is" without express or implied warranty.


🧚 AUTHOR 🧚

Jamie Zawinski.


and that's the whole page, bestie ✨ this was X Version 11, release 6.09 (07-Jun-2024) β€” go forth and corrupt some JPEGs responsibly, mwah πŸ’–πŸŽ€

πŸ“¦ where this page comes from