K.Mandla's blog of Linux experiences

At long last, a console screensaver

Finally, about two years after originally hunting for a way to run a screensaver at the console, I have an answer.

And the answer is screen. I’ll apologize beforehand if somebody happened to mention this and I somehow overlooked it, but I was cruising through the man page for screen today. I found two settings which combine to trigger a kind of screensaver effect.

The first is blankerprg, which sets the command for the screensaver “application,” and idle, which sets the timeout and triggers the blankerprg.

Assuming you have cmatrix installed, add these two lines to your .screenrc (or enter them directly into screen while it’s running, with the CTRL+A ‘:’ sequence):

blankerprg cmatrix -ab -u2idle 60 blanker

(Note the second line doesn’t say blankerprg; blanker is the invocation and blankerprg is the “variable” it starts.)

Now, in 60 seconds, your screen session should switch to the cmatrix program, and continue over the entire terminal area until you press a key. Cool, huh?

While you’re at it, you can substitute anything you like in there for cmatrix. Try tty-clock -r for some fun, or cacafire (assuming you have those installed, of course😉 ). If you can find a console game with an “attract mode,” that might be interesting too.

Wow, it feels good to find an answer to that, even if it did take two years. …