Wednesday, 17 January 2007

Orage synchronisation take#2

My Orage synchronisation bodge-up didn't reallly work as Orage doesn't remember which archive file it last had between sessions, so here's take 2:

wget -nH -rK your_calendar_file_url -O ~/calendar/google.ics -a ~/calendar/google.log

mv ~/.config/xfce4/orage/orage.ics ~/.config/xfce4/orage/orage.ics.old

mv ~/calendar/google.ics ~/.config/xfce4/orage/orage.ics

Each line is of course a single line of code. Basically what the script does is:

1) uses wget to retrieve the google calendar file and save it in the directory ~/calendar as google.ics. It appends a log of the transaction to ~/calendar/google.log. The directory ~/calendar must exist and you need to create google.log with the touch command.

[If you do not want to append to the log file use -o in place of -a]

2) rename the existing orage.ics file to something else
3) move your downloaded google calendar to orage.ics

This seems to work but there seemed to be a delay on orage reading the ics file. My testing has been fairly minimal so far so it might still be somewhat sub-optimal.

I'll see how it goes.


Fco. Javier Pérez Alonso said...


Fco. Javier Pérez Alonso said...


derwendtde said...

Hello Doug,

these lines really solved my problem. We've got 2013 (4 years gone now!) and apparently Xfce still has no native-syncable tool for Google calendar.

Basically, I could just go with your code, but I went a little further. Here are my 2 cents:

# Synch Google Calender w/ Orage.
# Keyboard shortcut: SHIFT+ALT+K (Settings – Keyboard – KB-Shortcuts) …no cronjob needed!
# Source:
# (1)
wget -nH -rK -O /media/SOMELOCALPATH/orage/googlecal.ics -a /media/SOMELOCALPATH/orage/googlecal.log
# (2)
mv ~/.local/share/orage/orage.ics /media/SOMELOCALPATH/orage/orage-backup.ics --backup
# (3)
cp /media/SOMELOCALPATH/orage/googlecal.ics ~/.local/share/orage/orage.ics

(1) Save Google Calender w/ wget, and append to transaction log.

Basically your code, but I wget it to /somelocalpath/ which sits on another volume. This way I always keep a backup of my Google calendar data, even if my main system would crash.

(2)Backup old orage.ics file to my local volume/path

I appended the --backup option. If the file exists, an additional file with .ics~ extension will be created. This gives me the opportunity to move .ics files to another location, from time to time.

I tried to run --suffix on it as well, to add a time stamp, but did not succeed. Any ideas?

(3) Create new orage.ics from googlecal.ics. Well, just the vanilla cp or mv


(4) I saved this "" in my /SOMELOCALPATH/. To run it, I just need to press ALT+SHIFT+K (I'm German, so "Kalender" is my mnemonic).

To do so, I just ran Settings — Keyboard — KB-Shortcuts, added a new shortcut for


and assigned my shortcut to it. Done :)

One last thing I need to figure out is the --suffix addition. Yes, I'm a n00b to CLI et al ;) If I could automagically add time stamps to my backup files, it would be perfect. Any hints are highly appreciated.

Cheers, Olaf
(Debian / Xfce4)