Rescue a crashed GUI

See a quote of the day whenever you login

28. Actually, if you don't want to install and configure Signify then there's no need. Out of the box, Ubuntu includes a similar program called fortune with ready-made mottos, literary quotations and jokes. To use it instead of Signify, substitute fortune in place of signify in the tip above.

primarily for email signatures but doesn't have to be used that way.

2. Once it's installed, open Gedit and create a new file called .signify in your /home folder. Then head off to your favorite site that's full of pithy or funny quotations. I recommend but bear in mind that, as with all quotation sites, some of the quotations are mildly sexually suggestive. Ideally you should find a series of quotations that you can cut and paste and that are separated by blank lines between them. Avoid any quotations that include percentage or dollar signs, because they're interpreted differently by Signify and can cause problems.

3. Cut and paste the quotations into the new Gedit document. At the top create a new line that reads % {. At the bottom of the file, so it's the last line, add %}. Between each of the quotations, on a line of its own, add % |. Each quotation can run across multiple lines and will be distinct from the next provided it's separated by % |.

Here's what a file containing just four quotations might look like:

A fanatic is one who can't change his mind and won't change the ^ subject.

-- Winston Churchill

All the people like us are We, and everyone else is They.

-- Rudyard Kipling

Now is the time for all good men to come to the aid of the party.

And therefore as a stranger give it welcome. There are more things in heaven and earth, Horatio, Than are dreamt of in your philosophy.

4. Save the file and then open .bashrc in your /home folder for editing (in a terminal window type gedit ~/.bashrc). At the end of the file add a new line that reads, simply, signify. Then save the file.

Whenever you log in at a virtual terminal, or open a terminal, one of your quotations will appear at the top of the screen above the command-prompt, or at the top of the terminal window.

Have a quotation appear whenever you login to your desktop

There's one final trick. To make your quotation of the day appear in a dialog box whenever you log into the Ubuntu desktop, follow these steps, which will create a new script and make it run each time the desktop starts (these steps assume you've followed the steps above to install Signify and have created a hidden .signify file containing quotes):

1. Start Gedit and create a new file called .quod in your /home folder. Then type the following into it:

# Pop-up a dialog box showing output from signify zenity --info --title "Quote of the day" --text "$(signify)"

2. Save the file and close Gedit. Open a terminal window and type the following to make the new script executable:

3. Click System ^ Preferences ^ Sessions. Click the Add button in the dialog that appears. In the Name field, type Quote of the day. In the Command field, type /home/username/.qotd, replacing username with your username. Leave the Comments field blank. Close all the dialog boxes and log out and in again to see the results of your effort. See Figure 3.31, on the following page for an example taken from my test PC.

Was this article helpful?

0 0

Post a comment