LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Noseguy Screensaver - Customisable Messages (https://www.linuxquestions.org/questions/linux-newbie-8/noseguy-screensaver-customisable-messages-760087/)

Jozei 10-06-2009 11:26 AM

Noseguy Screensaver - Customisable Messages
 
Hey guys; New to the whole forums thing, so if I have posted this in the wrong place then please let me know!

I've been using Gnome for a while, and I have just gotten Debian Lenny on my laptop. I have been trying to change the messages on the screensaver called Noseguy to something custom, like lyrics. I was just wondering if there was any easy way to write a file that doesn't display every word in it, like how fortunes work with the screensaver, or is that asking a little too much?

I've been trying to hack away at it for a few days, but I don't really want to attempt to pull apart fortunes and seeing how that works, cause I'll probably accidentally save over fortunes. Any ideas?

Thanks guys,

Josaphina

rjlee 10-06-2009 02:23 PM

I've not used noseguy, but it looks like you can enter either a shell command for the text source?

It that case, there are a couple of option. To create a new fortune file, first create a text file then run it through strfile to create a file that you can pass to fortune.

But that's a bit of hassle; you might want to look at a simpler fortune file (http://www.fefe.de/fortune/)

You could also write your own program. For example:

Code:

#!/usr/bin/perl -W

my @lines = split /\n/, <<EOF;
Put your strings here
One line per string
No blank lines
EOF

print $lines[int rand scalar @lines];
print "\n"


Jozei 10-06-2009 07:42 PM

Oh! I see! I'll definately give that a try. Thank you very much! =^-^=


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