Start your Evolution calendar once a day

In case you'd like to have your Evolution calendar started once a day, even though you're not using Evolution as your mail client, follow these steps:

In a directory that is in your $PATH - for example in /home/joe/bin or in /usr/local/bin - create an executable file with the name (for example) 'evolcal' containing these lines:

#!/bin/bash

#Idea from Dick Gevers running Mandriva Linux Cooker circa 2005 DISPLAY=:0.0 export DISPLAY /usr/bin/evolution --offline -c calendar --screen=0

Add a user's cronjob for it:

The job to execute is (example):

 /home/joe/bin/evolcal >/dev/null 2>&1 

Best to do this with kcron or webmin, and should result in a line being added to /var/spool/cron/joe that reads like:

55 18 * * *     /home/joe/bin/evolcal >/dev/null 2>&1

That will execute the job at 18:55 hours daily.

There's a small disadvantage, if any: after one closes the calendar evolution will stay active in the background. Since it isn't your mailer, you may prefer to stop it from using system resources when you are done with the calendar.

To fix that easily, one can define an alias by adding a line in the file /home/joe/.bashrc like this:

alias evostop='evolution --force-shutdown'

and remember to run it afterwards in a terminal (not as a cron job, because then the calendar won't be open when you return to your computer after the designated hour that 'evolcal' started running :)

If the cron job does not run, you may have to check that you are allowed to execute a cronjob, depending on your security level. This can be done with 'draksec' (1) in the tab 'System Options': the line ''Enable "crontab" and "at" for all users'' is to read "Yes".

(1) In Mandriva Linux Control Center --> Security --> Set up security level and audit

KB - Tip > Start your Evolution calendar once a day
Version 1.9 last modified by dvgevers on 27/05/2008 at 22:46

 


en

RSS

Creator: dvgevers on 2008/05/27 22:31
(c) Mandriva 2007
18888888