Re: Suse 10.2- lost X server
- From: houghi <houghi@xxxxxxxxxxxxxxxxxx>
- Date: Sat, 21 Jul 2007 12:18:07 +0200
Vahis wrote:
http://www.science.uva.nl/~robbert/zappa/quote/
I wonder if a random output from there could be pasted to a sig?
First you must clean up the 'database' and understand that what you get
will be plain text, so get rid of all the HTML stuff, like <BR>
Next you need to determine what way to go. You can use the program
'fortune' which means you must make a dat file, but it also means you
can use an already well known program. Once you have made the .dat file,
you can run it like `fortune zappa` or `fortune -s zappa` to have a sig
that is no longer then 4 lines.
Next you can use the perl script to add the signature. You can do this
also in several ways. The easy way out is to have crontab edit the
signature file you are actualy using. That is what I do. Each day at
00:00 a new signature is copied.
The script I use is:
DIR=/home/houghi/.signature
FILE=$DIR/sig.slrn
DATE=`date +%d`
rm $FILE
ln -s $FILE.$DATE $FILE
Yeah, I know, it could have been written in a oneliner like
ln -fs ~/signature/sig.slrn.`date +%d` ~/signature/sig.slrn
Yet that is not random. To do that, you an use also the perl script that
comes with it on the page you gave me.
The trick however is not so much as to show the random quote. That you
can do with both fortune, once you made the file into a fortune
database, with the perl script, with something you made yourself or with
whetever.
The trick is in showing a random one each time you need it. This will
depend on the newsreaders ability. Some newsreaders happily accept a
program as a signature file. Then you just point to that program and you
are done. Very easy to use `fortune -s zappa` that way.
However there are programs that only accept a file as input. Then it
becomes a bit tricker. What you need is (and here people are going to
correct me and tell me how it is done for real. I never got the hang of
it.) a named pipe.
http://www2.linuxjournal.com/article/2156
http://debid.vlsm.org/share/LDP/abs/html/contributed-scripts.html#FIFO
and most likely a lot of other places. Basicaly it is a file that
re-fills with new data once you have read it
houghi
--
Let's not be too tough on our own ignorance. It's the thing that makes
America great. If America weren't incomparably ignorant, how could we
have tolerated the last eight years? -- Frank Zappa, in 1988
.
- Follow-Ups:
- Re: Suse 10.2- lost X server
- From: Vahis
- Re: Suse 10.2- lost X server
- References:
- Suse 10.2- lost X server
- From: none
- Re: Suse 10.2- lost X server
- From: houghi
- Re: Suse 10.2- lost X server
- From: CanYouSayDualBoot
- Re: Suse 10.2- lost X server
- From: houghi
- Re: Suse 10.2- lost X server
- From: Vahis
- Suse 10.2- lost X server
- Prev by Date: Re: X server lost in Suse 10.2
- Next by Date: Re: X server lost in Suse 10.2
- Previous by thread: Re: Suse 10.2- lost X server
- Next by thread: Re: Suse 10.2- lost X server
- Index(es):
Relevant Pages
|