Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
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?
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.
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"
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.