LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 12-07-2008, 06:42 AM   #1
BFesko
LQ Newbie
 
Registered: Dec 2008
Location: Hobart, Indiana, US
Distribution: Debian "Etch" 4.0r5
Posts: 8

Rep: Reputation: 0
Changing Text Color of xmatrix Screensaver


Hello all,

This is my first post in this forum.

As part of my learning process with Linux (Debian 4.0r5 "Etch") I am doing various things to customize my environment. I have had great success in modifying things like the Grub splash screen, Gnome splash screen, etc. I would now like to change the text color of my xmatrix screensaver from green to blue if at all possible. Any insight on how to do this is greatly appreciated.
 
Old 12-08-2008, 01:07 AM   #2
Tuttle
Senior Member
 
Registered: Jul 2003
Location: Wellington, NZ
Distribution: mainly slackware
Posts: 1,289

Rep: Reputation: 52
find the source code, edit the code, recompile!
 
Old 12-09-2008, 04:20 AM   #3
BFesko
LQ Newbie
 
Registered: Dec 2008
Location: Hobart, Indiana, US
Distribution: Debian "Etch" 4.0r5
Posts: 8

Original Poster
Rep: Reputation: 0
Registered: Dec 2008 Posts: 1 Changing Text Color of xmatrix Screensvr

Tuttle,

I appreciate your reply. However, as a n00b, I am not sure how to find the source code and recompile. Could you possibly explain to me how to do this in simpler terms? I would greatly appreciate.
 
Old 12-09-2008, 04:45 AM   #4
Tuttle
Senior Member
 
Registered: Jul 2003
Location: Wellington, NZ
Distribution: mainly slackware
Posts: 1,289

Rep: Reputation: 52
I would first suggest you try to compile something first, reading source code is very tricky for a beginner!
Find some software that you want, get the source code for it, unpack it then try to compile it by following the instructions in the README and INSTALL files provided.

Try compiling mplayer, the outdated versions will be fine as a beginners exercise


http://www.mplayerhq.hu/design7/dload.html


...from here on you are in unknown territory, have fun!

and remember - RTFM (read the fine manual)
 
Old 12-09-2008, 04:48 AM   #5
colucix
Moderator
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,508

Rep: Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957
Since there is no option of the xmatrix command to change the color (except for a -install to use a custom palette, but I sincerely don't know how it works) the suggestion by Tuttle was to download the source code, edit the proper C program, make the necessary modifications and recompile it. This is equal to do a new installation of the entire xscreensaver package (xmatrix is part of it) or eventually to substitute the only xmatrix executable with the newly compiled one. A kind of hack that can mess an installed package.

Anyway, you have to begin by downloading the source. First determine who is the developer, then go to the website and look for the source code. You can start by retrieving information about the installed package and see if there is the author name and eventually the URL of his/her website. You can retrieve such information also from the debian packages site: http://packages.debian.org/etch/xscreensaver. See the "Copyright file" in the menu on the right.

Then you have to extract the source, modify the source code (maybe there is a xmatrix.c file) and compile it. Most likely you have to satisfy some dependency, e.g. you have to install some devel package to make the graphic libraries and header files available to the compilation. It may be a nightmare, especially if you're new to linux!

Personally I would spend my time to learn something more useful or less complicate. You can go to the GNU website, download the source code of some application you've not installed yet and try to compile it. And eventually install in /usr/local. Just a thought. Good luck!

Edit: beaten by Tuttle! Just out of curiosity, have not RTFM a slightly different meaning?!

Last edited by colucix; 12-09-2008 at 04:51 AM.
 
Old 12-09-2008, 05:09 AM   #6
Tuttle
Senior Member
 
Registered: Jul 2003
Location: Wellington, NZ
Distribution: mainly slackware
Posts: 1,289

Rep: Reputation: 52
haha! indeed colucix, maybe the one beginning with F?.... BFesko, I think you have had more information than you can handle for today, we all deserve a beer!
 
Old 12-09-2008, 05:12 AM   #7
BFesko
LQ Newbie
 
Registered: Dec 2008
Location: Hobart, Indiana, US
Distribution: Debian "Etch" 4.0r5
Posts: 8

Original Poster
Rep: Reputation: 0
Okay... thanks.

I was able to get going on this at least.

I edited the foreground color in xmatrix.c to be the color of my choice.

I was able to ./configure with little trouble after installing some necessary dependencies, however I got an error message returned after doing a 'make' command:

xpm-pixmap.c:308: undefined reference to `minixpm_to_ximage'
collect2: ld returned 1 exit status
make[1]: *** [blitspin] Error 1
make[1]: Leaving directory

Any ideas?

Thanks again!
 
Old 12-09-2008, 05:13 AM   #8
Tuttle
Senior Member
 
Registered: Jul 2003
Location: Wellington, NZ
Distribution: mainly slackware
Posts: 1,289

Rep: Reputation: 52
wow! learning curve of a genius!

It's bed time in NZ... goodnight!
 
Old 12-09-2008, 06:02 AM   #9
colucix
Moderator
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,508

Rep: Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957
Wow, very impressive! The minixpm_to_ximage function is defined by the xscreensaver source itself. Really strange it could not find it. Try to configure again using --without-xpm.

Just another hint. I suggest to not install after successful compilation. Just locate the xmatrix executable inside the source directory and execute it from there. Just to test and to avoid messing up the already installed package.

Goodnight, Tuttle! Here in Italy is launch time... indeed we are at the antipodes!

Last edited by colucix; 12-09-2008 at 06:04 AM.
 
Old 12-09-2008, 02:32 PM   #10
BFesko
LQ Newbie
 
Registered: Dec 2008
Location: Hobart, Indiana, US
Distribution: Debian "Etch" 4.0r5
Posts: 8

Original Poster
Rep: Reputation: 0
Tuttle & colucix,

Firstly, I appreciate all of your help.

I have configured using '--without-xpm'. No luck. I still get the error upon 'make'.

I guess I should have pasted more detail of the error sequence in the previous post. I will do so here:

xpm-pixmap.o: In function `xpm_to_pixmap_1':
/home/brian/Desktop/Downloads/xscreensaver-5.07/hacks/xpm-pixmap.c:308: undefined reference to `minixpm_to_ximage'
collect2: ld returned 1 exit status
make[1]: *** [blitspin] Error 1
make[1]: Leaving directory `/home/brian/Desktop/Downloads/xscreensaver-5.07/hacks'
make: *** [default] Error 5

Note: I get this error message regardless of whether I edit the xmatrix.c file before compilation efforts.

I've also done 'make -Bi' and have successfully created the executables for the hacks (excepting xmatrix for some reason).

Any more hints?

Thank you both!
 
Old 12-09-2008, 10:21 PM   #11
Tuttle
Senior Member
 
Registered: Jul 2003
Location: Wellington, NZ
Distribution: mainly slackware
Posts: 1,289

Rep: Reputation: 52
make[1]: *** [blitspin] Error 1

hmm... is it possible only the 'blitspin' screensaver is affected? I have never compiled xscreensaver from source, can you omit compiling the 'blitspin' executable? It's one of the less exciting ones!


Good morning Italia!
 
Old 12-10-2008, 03:15 AM   #12
colucix
Moderator
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,508

Rep: Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957
The function minixpm_to_ximage is defined in utils/minixpm.h. The header is included in minixpm.c and the resulting compiled object minixpm.o should contain the definition as well. The programs in the utils directory should be compiled at the very beginning of the make step. So check for the first lines of output and see if there is some problem in the compilation of minixpm.c or if it is actually compiled.

Since you may have a long output and maybe you can't scroll it to the beginning, use the tee command to save the output to a file. I suggest to follow these steps now:
Code:
$ cd xscreensaver-5.07
$ make distclean
$ ./configure
$ make 2>&1 | tee make.log
then you will have a file make.log to check later. See if there is a line similar to the following and if there are some strange messages immediately after:
Code:
gcc -pedantic -Wall -Wstrict-prototypes -Wnested-externs -Wmissing-prototypes
-Wdeclaration-after-statement -std=c89 -U__STRICT_ANSI__ -c -I. -I..
-DHAVE_CONFIG_H -g -O2  minixpm.c
Good night, New Zealand!
 
Old 12-10-2008, 03:49 AM   #13
BFesko
LQ Newbie
 
Registered: Dec 2008
Location: Hobart, Indiana, US
Distribution: Debian "Etch" 4.0r5
Posts: 8

Original Poster
Rep: Reputation: 0
Prior to reading the last two posts, I got the "brilliant" idea to try and compile xmatrix.c by itself. I had some problems, made some progress, met some major speedbumps and abandoned the idea. Oh well... it was just a thought.

From what I can discern, minixpm.c is getting compiled. I don't see anything unusual (from whatever I know of usual) after the instruction to compile it. I have copied and pasted part of the output (before the next gcc statement) here:

gcc -pedantic -Wall -Wstrict-prototypes -Wnested-externs -Wmissing-prototypes -Wdeclaration-after-statement -std=c89 -U__STRICT_ANSI__ -c -I. -I.. -DHAVE_CONFIG_H -g -O2 minixpm.c
make[1]: Leaving directory `/home/brian/Desktop/Downloads/xscreensaver-5.07/utils'
make[1]: Entering directory `/home/brian/Desktop/Downloads/xscreensaver-5.07/driver'
/bin/sh ./../utils/ad2c XScreenSaver.ad > XScreenSaver_ad.h

I am going to try and see if I can omit 'blitspin' and see what happens there.

Thanks for sticking with me on this one. Y'all let me know when you figure we need bail on this though (something tells me y'all are like me and don't like to give up, however). This has been a wonderful learning experience for me to this point. Thank you.
 
Old 12-10-2008, 04:02 AM   #14
colucix
Moderator
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,508

Rep: Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957
Quote:
Originally Posted by BFesko View Post
something tells me y'all are like me and don't like to give up, however
He he... that's right!
 
Old 12-10-2008, 04:15 AM   #15
BFesko
LQ Newbie
 
Registered: Dec 2008
Location: Hobart, Indiana, US
Distribution: Debian "Etch" 4.0r5
Posts: 8

Original Poster
Rep: Reputation: 0
Okay, now is the time that I really demonstrate my n00biness.

I completely overlooked some warnings I have gotten when running './configure'.

So much for impressing you earlier (sheesh).

#################################################################

Warning: The GTK libraries do not seem to be available; the
`xscreensaver-demo' program requires them.

Warning: The GDK-Pixbuf library was not found.

Warning: The XPM library was not found.

Some of the demos will not use images as much as they could.
You should consider installing GDK-Pixbuf and re-running
configure. (GDK-Pixbuf is recommended over XPM, as it
provides support for more image formats.)

Note: The JPEG library was not found.
This means that it won't be possible for the image-manipulating
display modes to load files from disk; and it also means that
the `webcollage' program will be much slower.

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/>.

#################################################################

Warning: There is already an installed dpkg of xscreensaver
version "4.24-5" on this system.

The dpkg was installed in /usr/bin/,
with demos in /usr/lib/xscreensaver/.

#################################################################

I have tried to install these libraries, but I've been running into trouble with my second binary DVD. I think I need to do an integrity check on it and probably burn a new one.

I'll get back to y'all once I get past this hiccup. Thanks.
 
  


Reply

Tags
color, screensaver, text


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How change text color using linux in text mode only runlevel 3? Xavius Linux - General 7 05-07-2009 02:19 AM
Constantly changing text color on the console jpanski Linux - Newbie 2 01-09-2008 02:35 PM
Changing Terminal Text Color By Recompiling Kernel kwikness Slackware 6 07-21-2007 11:27 AM
Changing the color of the boot sequence text r00tNinj4 Debian 7 06-16-2006 10:47 AM
Changing text color in C++ Brakki Programming 3 04-21-2004 04:24 PM


All times are GMT -5. The time now is 10:10 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration