I have always liked the Matrix screen saver that is packaged with most linux distributions. However I have a blue backlight keyboard and when the green martix screensaver came on it really clashed with the keyboard. If only there was a way to change the color… wait this is Linux and Linux is all about being able to change anything!
The Old Green
The New Blue
I must thank thottingal.in for giving me the most crucial information I needed to create my screensaver. I basically followed his tutorial to figure out how to get the source code for the GLMatrix screensaver change it and compile it.
I had trouble getting the dependencies for the source installed. I got errors such as,
- Note: The OpenGL 3D library was not found.Those demos which use 3D will not be built or installed.
You might want to consider installing OpenGL and
re-running configure. If your vendor doesn’t ship
their own implementation of OpenGL, you can get a free
version at <http://www.mesa3d.org/>. For general OpenGL
info, see <http://www.opengl.org/>. - /usr/bin/ld: cannot find -lXext
- `XmuPrintDefaultErrorMessage'”
I was able to fix all of these errors by tracking the following dependencies down and installing them using the synaptic package manager.
libxmu-dev, libgl1-mesa, bc, libglade2-dev, libjpeg8-dev
As for modifying the source code to make the cyan color, I edited the file hacks/glx/glmatrix.c and changed line 771 to g = 0xCC; b = 0xFF; essentially setting the color to #00CCFF.
It makes a great addition to my Starace Tron Theme.
Chris,
As a friend I really enjoy reading your blog. I am not particularly interested in how to change the screen color if I ever get a Unix machine. What I enjoy most is getting a glimpse into your very inquisitive mind. You have the gene of invention running through your blood. It will be fun to watch what you create in your life.
All my best,
Nolan
Thanks Nolan! If I do I will be following in your footsteps.
Hey Chris, nice job changing the color on this.
Having never touched configuring and making of source code in linux. I was able to change the respective code at line 771 and I was able to successfully configure and make the screen saver again. However I am lost on what to do next, did it export a file somewhere I can add to the screen savers folder?
Thanks,
Ian
how do i change the color to red instead of blue
Thanks for the information.
With your explaination I was able to turn my glmatrix screensaver into a blue version of itself.
I have one addition, you can find the required built dependencies by running “apt-get install build-dep xscreensaver” (you might need to adjust your /etc/sources.list a bit though).
Cheers,
Manuel