Andrei bio photo

Andrei

Linux engineer, devops enthusiast and sys-admin/developer hybrid

Email LinkedIn Github

Overview

Having a screensaver on my Linux console souded like a fun ideea. After some investigation I found an easy way to have a matrix-like screensaver, and it looks pretty awesome. You just need to setup screen utility and the cmatrix screensaver. See below details for installation steps.

matrix teminal screensaver

1. Install screen utility and screensavers

Depending on you distributin check and install the following packages: screen, cmatrix. I am installing them on an ArchLinux instance, but the packages can be found on most Linux distributions.

yaourt -S screen cmatrix

2. Test your cmatrix screensaver in console

  • By using the ‘s’ option you specify to run the utility as a screensaver. It will end when pressing a key
  • ‘b’ option tells cmatrix to use Bold characters
  • There are more options available, you can check them in the man pages. ‘C’ option for example sets the color.
cmatrix -sb

3. Start screen when opening a console

Append the following to the end of your bashrc file

vi /etc/bash.bashrc
...

[[ $TERM != "screen" ]] && exec screen -q

4. Set up screensaver to start after IDLE time

After setting up screen utility /etc/screenrc has been created for you. Add the following options to /etc/screenrc or ~/.screenrc :

blankerprg cmatrix -ab -u2
idle 60 blanker
  • The first line starts cmatrix when blanker is called
  • The second line calls blanker after 60 seconds of idle time. You can use other value for idle time
  • You can use other screensavers aswell. You can find some examples here and here