LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Linux Answers > Applications / GUI / Multimedia
User Name
Password

Notices

By phstpok at 2006-10-05 11:31
Howto install and use SIGROT in Ubuntu6.06


This howto will guide you through the steps involved in installing and using sigrot, a mail signature rotation utility, in Ubuntu6.06. This should also work in most recent derivatives of debian linux.

Sigrot can be obtained from http://packages.debian.org/oldstable/mail/sigrot

You can choose to open the file (in this case, sigrot_1.2-1_i386.deb, for a bog standard Intel or AMD 32 bit box) in the default application, Gdebi Package Installer, or save to disk. I chose the Gdebi option.

Just click install, click yes when the popup to allow administrator privileges appears, then enter your password when prompted and hit the enter key.

If you choose to save to disk, open a terminal window, cd to the directory where you saved the file, and type the following...

sudo dpkg -i sigrot_1.2-1_i386.deb

Enter your password when prompted.

Once installed, type sigrot at the terminal prompt. This will run sigrot for the first time, which will result in a new directory, .sigrot , being created in your home directory. You will also be informed that sigrot could not locate the file sig_archive.


Now we get down to creating a signature file.


Open your file browser (Nautilus in Ubuntu/gnome) and navigate to the ~/.sigrot directory. You may need to enable the "View Hidden Files" option to do this. Create a new file called sig_archive (right-click > create document > empty file). Copy the signatures you want into this file, making sure that each signature, quote etc. is separated by a blank line, and save.

In your terminal window, type sigrot at the prompt and press enter. Navigate to your home directory and look for a file called .signature. Open it and check that it contains the first signature or quote from your ~/.sigrot/sig_archive file. Repeat the procedure for the second signature/quote.

Once you are happy that sigrot is working correctly, open your email client and set up the signature utility in the client to use the ~/.signature file to append a .sig to your emails. I use Mozilla Thunderbird, so the process is...

Open Thunderbird. Click on Edit > Account Settings. Check the box for Attach this signature and enter in the space provided /home/<user_name>/.signature

If you want to change the signature at your leisure, simply type sigrot at a terminal prompt before starting a new email. If you want a new signature every time you start a new email, the only method at the moment is to set up a cron job to run sigrot at a set interval.


Setting up a cron job to change your .sig at regular intervals.


At a terminal prompt, type crontab -e and hit enter

If you don't already have a crontab file, it will create one for you. If you already have a crontab, it will open it ready for editing.

Move the cursor down one line and type 30 * * * * /usr/bin/sigrot

Press ctrl x and then y at the prompt.

Now type crontab -l at the prompt and you will get something like

rob@Thor:~$ crontab -l
# m h dom mon dow command
30 * * * * /usr/bin/sigrot

This shows that sigrot will run every 30 minutes (creating a new ~/.signature file) every day of the year. If you want to set a different time/day etc., change the values in crontab. They go...

MM HH Day Month Day of week command to be run, so from example 4, the file /usr/bin/sigrot is being run at 30 minute intervals *(all hours of the day), *(all days of the month), *(all months of the year), *(all days of the week). Change values as you see fit, so a crontab showing 05 09 * * * /usr/bin/sigrot will have sigrot running at 9:05 am every day. and 20 10 * * 0 /usr/bin/sigrot will run sigrot at 10:20 am every sunday. Don't worry if you make a mess of the crontab file. Nano can be a bit confusing at first. Simply hit ctrl x then type n when asked if you want to save changes, and have another go.

There are a few alterations you can make to sigrot. Running sigrot -rand will choose a random sig from your sig_archive file (the default is sequential selection). Your crontab would look like this...
30 * * * * /usr/bin/sigrot -rand

If you want to have a permanent line or lines added to the sig either before or after the sig, create files called prefix and suffix in your ~/.sigrot directory with whatever you want permanently displayed before and/or after your sig.


  



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

Main Menu
Advertisement

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