Harmless Linux Pranks

2012-03-09 21:05 UTC
  • Xyne

Frozen Screen

The following script requires “feh” and “imagemagick”. It will take a screenshot at semi-random intervals between 5 and 10 minutes and then display the screenshot in full-screen mode for 5-10 seconds. It will seem as though the screen has frozen before returning to normal until the end of the next sleep interval.

Save it on someone’s computer, make it executable, then start it in the background from .xinitrc or some other file that runs commands when the X session starts.

Script

#!/bin/bash
_imgfile=$(mktemp /tmp/screenshot_XXXXXX.png) || exit 1
_sleepdelaymin=300
_sleepdelaymax=600
_freezedelaymin=5
_freezedelaymax=10
while [ 1 ]; do
  sleep $(($_sleepdelaymin + $RANDOM % (1+$_sleepdelaymax-$_sleepdelaymin )))
  import -window root -quiet "$_imgfile"
  feh --cycle-once -F -D $(($_freezedelaymin + $RANDOM % (1+$_freezedelaymax-$_freezedelaymin ))) "$_imgfile"
done
Contact
echo xyne.archlinux.org | sed 's/\./@/'
Validation
XHTML 1.0 Strict CSS level 3 Atom 1.0