Linux

Ubuntu Tutorial: How to launch an GUI from cron in Ubuntu

Posted in | »

On Sunday, I spent a good half-hour with Google learning how to launch a GUI application in Ubuntu using cron. I wanted to write a brief post here explaining the process so as to help another weary Googler more quickly on their way.

My situation is this: I use a nifty little flashcard-like study program called Mnemosyne. I use it to study foreign languages and for school. Ideally I should run it daily -- but I often forget, which slows my learning. So I decided to create a cron job which would run the program every day at 7 AM.

Using the normal crontab syntax I made this entry:

0 7 * * * mnemosyne
This, I thought, would run mnemosyne once a day at 7 AM. Unfortunately I was wrong. After much searching around I found the solution on the Ubuntu forums (always a great resource). My problem was that because cron doesn't run in the X session (The program that controls all GUIs in Linux), when you try to run a GUI program, cron doesn't know where to start it. To tell cron where to start the GUI, I changed my crontab entry as follows:
0 7 * * * export DISPLAY=:0 && /usr/bin/mnemosyne

And finally success!

The post on the Ubuntu Forums I found explains all this and more and gives a number of examples.

Also, for those wanting a more general tutorial on crontab syntax, see the crontab article on wikipedia.

Submitted by Kyle Mathews on Wed, 05/02/2007 - 04:07

Ubuntu 6.10 - Edgy Eft - thoughts on upgrading from Dapper

Posted in | »

Updated my dapper installation on my laptop to Edgy a while ago. It went well. I jotted down my impressions and installation steps:

- faster boot - 56 seconds from shutting down computer restart and logging in -- probably 5-10 secs faster then with Dapper.
-added tomboy notes / sticky notes / system monitor - adjusted to have CPU/memory/network / battery monitor / force quit /
-wow, only 109 MB of ram used upon boot up. Huge difference -- Dapper was always around 150 MB upon boot up

-Programs Installed
Adobe Acrobat 7.0
Agave - color scheme creator
Alien - converts RPMs to DEBs
Amarok - best music player for Linux
Beagle - desktop search
Ethereal - now called wireshark -- network sniffer
Inkscape - vector drawing program
Java SDK 5
K3B - best Linux CD burning software
LyX - WYSIWYM (What You See Is What You Mean) editor. GUI for LATEX
Scribus - excellent DTP (desktop publisher for Linux)
VLC - Plays anything you throw at it.
Webilder - downloads backgrounds from flickr and rotates them
Wine - (Wine Is Not an Emulator)
GFTP
Bluefish

Firefox 2.0 is very cool - tab restore, search suggest/memory for google, individual tab delete. Seems to have eliminated memory leak -- used to be that after a few hours of using firefox memory usage would be over 250 MBs now (depending on how many tabs are open) is much less ~ 100 MBs

So I like it. As some have commented Edgy isn't so edgy (Also a comment about the lack of 'edginess' from an Ubuntu developer). It seems the changes from Hoary to Dapper were more dramatic. Changes were mostly subtle, tweaks here and there, improvements to programs etc. Linux and Ubuntu are at a stage of maturity that dramatic improvement are hard to pull off. A math analogy, if you add 1 to 1 that is a 100% improvement. If you add 1 to 2 that is a 50% improvement. If you continue that on upward, adding 1 to 100 is only a 1% improvement. Linux is still making good progress just it is not as obvious now due to the substantial work already completed.

Submitted by Kyle Mathews on Sat, 11/11/2006 - 03:42