Hacking the GLMatrix screensaver

I am sure that many of you are fans of “The Matrix” series. And many of you might be using the Matrix Screensavers in your system.
But did you ever think like this: “Why cant that glowing green glyphs that rains in black screen be Indic ?”
Well, Not a bad Idea. Right?
Ok, Shall we try to hack the glmatrix screen saver? Here you go!

1. Download the xscreensaver sourcecode from http://www.jwz.org/xscreensaver/download.html

2. Configure and make it(just to ensure that you have required libraries in your machine)

3. Goto hacks/images folder of that source code. You will see matrix3.xpm file there. Backup it , it is valuable:)

4. I am going to use Hindi glyphs(You can use the glyphs from your mother tongue).Now we need to create one xpm image file with same dimension and size of the original one. Write one html page with table and arrange the alphabets there. Note the table should be a 512*598 pixels 13 rows, 16 columns.

5. Refer the following Hindi table. Take a screenshot of the html and get the table alone. You may use the source code of the below table for your language.

! @ # $ % ^ & * ( ) _ + , / .
कु नु रु चु पु
र‍ कू
क्ष @ ( ) _ + , / .
* ! @ # $ ​​​​~ ÷ ¾ , ¼ ½
क्ष पो नु
रू भू जुु गुु सु मु नि षि वी
क्ष ळ‍
& ज्ञ श्र

6. Open GIMP and create a new image with image with 512*598 pixel size. paste the table screenshot on the blank image. You can save it as matrix3.xpm file.

7. From my experiments I found that the image should be the mirror copy of the the table image.So flip the image horizontally to get the mirror image and save

8. You can see that the size of the image around 601 KB. But the actual image should be around 301 KB file. Go to Layers-> Colours->posterize. And give the number of colours as 91 (some value around 90). Save it.

9. Now you have the matrix glyph image ready.

10. goto hacks/glx folder. Apply the below patch to glmatrix.c

< XSCREENSAVER_MODULE_2 ("GLMatrix", glmatrix, matrix) --- > XSCREENSAVER_MODULE_2 (“Hindi Matrix”, glmatrix, matrix)

11. Recompile it! Done? No, wait. We need to add this as a screensaver to Gnome-screensaver
12. Create one Hindi Matrix.desktop file in usr/share/applications/screensavers folder. Here is my file

[Desktop Entry]
Name=Hindi Matrix
Comment=Draws 3D dropping characters similar to what is seen in the title sequence of “The Matrix”, written by Jamie Zawinski. This is a Hindi glyph version written by Santhosh Thottingal.
Exec=himatrix -root -speed 5.0 -density 50

13. Copy the glmatrix binary to usr/lib/xscreensaver/himatrix.

14. Now go to System-> preferences -> Screensave. Your screensaver should be listed there. See my screenshot

You can download Hindi and Malayalam matrix deb package from here

Happy Hacking!!!

5 thoughts on “Hacking the GLMatrix screensaver”

  1. Thanks for the entry. After fixing some tricky dependencies, I modded the glmatrix to be a cyan color to match my blue backlight keyboard. Strangely enough it wasn’t as easy as modding the picture file. I changed line 771 of glmatrix.c to g = 0xCC; b = 0xFF;

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.