How to Add a Random Quote as Your Signature in Evolution

Posted by Jonquil on Oct 20, 2011 5:31 PM EDT
xjonquilx | Mepis, Ubuntu, Fedora, Linux, Oh My!; By Jonquil McDaniel
Mail this story
Print this story

In this article I’m going to tell you how you can add a random quote as your signature in Evolution

In this article I’m going to tell you how you can add a random quote as your signature in Evolution, like this:







Install The Fortune-Mod Package



First you will need to install the fortune-mod package. If you’re in Fedora you can do this by typing the following in to terminal as root or super user:



yum install fortune-mod



Once you have that installed, you can use the default fortunes file or you can create your own file with quotes in it.



Creating Your Own Quotes File



Create a file with Gedit. Create your quotes, adding a % variable between each new quote. Like this:



Quote 1

%

Quote 2

%

Quote 3



Save the file without a file extension. For the sake of this tutorial we will name the file quotes.



Adding Your Quotes File to Fortune-Mod



Now we need to create a .dat file for the quotes file. Open terminal in the location where you saved the quotes file and issue the following command:



strfile quotes



This will generate a quotes.dat file in the directory where you saved the quotes file. Now copy these files to the fortune-mod directory as root or super user by issuing the following commands:



cp quotes.dat /usr/share/games/fortunes

cp quotes /usr/share/games/fortunes



Test it in terminal by issuing the following command:



fortune quotes



You should have a random quote pop up.



Adding a Signature Script in Evolution



Open Gedit and enter in the following lines:



#!/bin/sh

# Name echo “Your Name Here ~ “

# remove the old .signature file (from the last time script was run) rm /home/yournamehere/.testfile.txt

# make a new .signature from our “template” cp /home/yournamehere/.sig-template /home/yournamehere/.testfile.txt

# insert a new quote into .signature fortune quotes



Name the file evolution-sig-generator.sh and save it in your home directory. Now we need to make the file executable, so open up Terminal and issue the following command:



chmod u+x evolution-sig-generator.sh



Open up Evolution and navigate to Edit > Preferences > Composer Preferences > Signatures. Click on Add Script. Under Name name your script. Click on the box next to Script and select the script we just created, then click Save.







Now when you want to use your random quotes signature just select it from the Signature drop down menu in a new message.



Thanks to Mark at Bodhi for helping me figure this out!

Full Story

  Nav
» Read more about: Story Type: Tutorial; Groups: Fedora, Linux

« Return to the newswire homepage

This topic does not have any threads posted yet!

You cannot post until you login.