A better way would be to set EDITOR to your farerate text editor, and run "crontab -e" as your normal user. (If you have crontab enabled for normal users - depends on security.) Add.Chris wrote:
On Saturday 12 March 2005 09:09 pm, Kevin B. O'Brien wrote:Thanks for the tip.
I am wondering if there is a signature randomizer for Linux similar to KookieJar for Windows.
Thank you,
Yes, its called fortune and I believe its installed as part of a normal install. You can call it from a script such as this:
#!/bin/bash echo "Chris" echo "Registered Linux User 283774 http://counter.li.org" STR=$(uptime) TIME=${STR% user} RESULT=${TIME%} echo $RESULT echo "Mandrake Linux 10.1 Official, kernel $(uname -r)"
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
/usr/games/fortune
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
if [ -p /tmp/xmms-info ] ; then echo "Live - Classic Rock - From Virgin Radio UK $( grep Title: /tmp/xmms-info | awk -F': ' '{print $2}' )"
fi
If using Kmail you can under "Settings > configure Kmail > identies > signature" then select "Obtain signature text from Output of Command. For instance mine is /home/chris/./sig. You can learn more about fortune from "man fortune"
HTH
------------------------------------------------------------------------
____________________________________________________
Want to buy your Pack or Services from MandrakeSoft? Go to http://www.mandrakestore.com
Join the Club : http://www.mandrakeclub.com
____________________________________________________
I was able to get it to work in thunderbird by making a script like you suggested and calling it via cron to generate a signature like this every 15 minutes.
First make sig-pubmail executable like so:
chmod 0755 sig-pubmail
Then edit your /etc/crontab file and add a lines like mine below:
0 * * * * root /home/djash/./sig-pubmail > /home/djash/sigpubmail.txt
15 * * * * root /home/djash/./sig-pubmail > /home/djash/sigpubmail.txt
30 * * * * root /home/djash/./sig-pubmail > /home/djash/sigpubmail.txt
45 * * * * root /home/djash/./sig-pubmail > /home/djash/sigpubmail.txt
Then of course just have thunderbird use that file as it's signature. sigpubmail.txt
0,15,30,45 * * * * /home/djash/sig-pubmail > .home/djash/sigpubmail.txt
Save, and exit.
The biggest drawback with the way you have done it is that the script is run as root. Running a script that a user can modify as root is a BIG security risk!
Also, the signiture file will be owned by root, instead of djash.
Mikkel --
Do not meddle in the affairs of dragons, for you are crunchy and taste good with Ketchup!
____________________________________________________ Want to buy your Pack or Services from MandrakeSoft? Go to http://www.mandrakestore.com Join the Club : http://www.mandrakeclub.com ____________________________________________________
