Subscribing to your RULink Calendar in Apple's iCal Calendar Program
[NOTE: This page describes a script called "subscribe." There is an earlier version called "ical". Instructions for using it are identical. However the old version didn't work with iSync. "subscribe" does. There are incompatibities in the format of the data, so I can't just replace ical with subscribe. If you have been using ical, you will want to delete your calendar in iCal on the Mac and create a new one to use with subscribe. Otherwise you will get duplicate events.]
It does not currently appear practical to do a full two-way synchronization between Apple iCal application and the RULink Calendar. iCal isn't designed to do this kind of synchronization. Rather, Apple expects you to upload and download your entire calendar.
Thus iCal works in two modes:
- If you maintain your calendar on the Mac, you can publish it to a server. When you do that, you upload a complete copy of your calendar every time you change it.
- If you maintain your calendar on a server, you can subscribe to it from iCal. When you do that, you download a complete copy of your calendar from the server every time you change it on the server (or regularly on a timed basis).
We currently support maintaining your calendar on RULink and subscribing to it in iCal.
There are two modes of subscription. The easy one is if all the calendars you want to see are visible to the public. That is, the users have authorized anyone to read the calendar. Note that by default, anyone is allowed to see when you are busy, but not to read the calendar. So doing this will require you to make a change to the allowed access in the calendar application.
It is also possible to login on the server. In that case you will be able to download any calendar to which you have access.
Access without logging in
It's very easy to subscribe to a calendar without logging in. In iCal, pull down "Calendar" and choose "subscribe". For "Calendar URL", specify http://rulink.rutgers.edu/cgi-bin/subscribe?CALID.ics where CALID is the calid of the calendar you want to look at. In most cases this is your NetID, but it could also be the NetID of someone else. The ".ics" on the end is needed. Without it, iCal won't recognize the calendar.
Access with login, panther (10.3)
WARNING: The following instructions end up with your password in a file. It may also be displayed from the ical program itself. Only do this if your Macintosh is secure.
This is more complex than it should be because of bugs in the iCal application. In principle, iCal supports usernames and passwords, but in my experience it tends to lose the password. If you can get iCal to send a username and password, the web page will use them, but we provide an approach that is less likely to trigger iCal bugs: encode them in the URL.
To do things this way you need to specify a URL such as https://rulink.rutgers.edu/cgi-bin/subscribe?user=MYUSER&pass=MYPASS&CALID.ics where you replace MYUSER with your username (NetID), MYPASS with your password, and CALID with your calendar ID (normally your NetID). (Note that & should be represented as & in the file.) Unfortunately the iCal application does not accept https:. The problem is in the user interface, not the application. So you'll need to edit the configuration file produced by the application.
The application won't let you create a URL with https: in it, so initially, add the calendar without login, using the URL http://rulink.rutgers.edu/cgi-bin/subscribe?CALID.ics
If you need to login in order to see the calendar, iCal will initially see no data.
Now edit the file ~/Library/Preferences/com.apple.iCal.sources.plist. You will find an entry that looks like this:
<dict>
<key>Last Successful Slurp Date</key>
<string>06/06/03 00:27:11</string>
<key>baseURL</key>
<string>http://rulink.rutgers.edu/cgi-bin/subscribe?myname.ics</string>
<key>filtering mask</key>
<integer>3</integer>
<key>use iTools</key>
<false/>
You need to make two changes:
- Change the URL from http://rulink.rutgers.edu to https://rulink.rutgers.edu
- Add your username and password
<key>baseURL</key>
<string>https://rulink.rutgers.edu/cgi-bin/subscribe?user=MYUSER&pass=MYPASS&myname.ics</string>
If your password happens to have an ampersand in it, you will want to represent it as "%26" (without the quotes). You may also need to represent an equal sign by "%3D".
Access with login, tiger (10.4)
WARNING: The following instructions end up with your password in a file. It may also be displayed from the ical program itself. Only do this if your Macintosh is secure.
This is more complex than it should be because iCal doesn't support https:. Thus we need to install "stunnel" to secure your connection. These instructions show you how.
If you already have a copy of stunnel installed, you may want to be careful about this installation. It will overwrite any copy of stunnel that may be in /usr/local/bin. Any copy of version 4 stunnel should work fine. I put the config files in places that are unlikely to conflict with anything else on your system.
- Retrieve stunnel.install and
stunnel.tar. Put these files in the
same directory.
sudo sh stunnel.install
This will copy the stunnel program to /usr/local/bin, install /etc/stunnel.rulink.conf, add /Library/LaunchDaemons/edu.rutgers.rulink.stunnel.plist, which will cause launchd to start stunnel at every reboot, and then start stunnel. - In ical, pull down "Calendar" and do "subscribe". This will
bring up a box "Subscribe to:" It wants a URL. The URL should
look like this:
http://localhost:1030/cgi-bin/subscribe?user=NETID&pass=PASSWORD&CALID.ics
where NETID is your NetID, PASSWORD is your password, and CALID is your calendar ID (normally your NetID).
Number of months to retrieve
By default, the script retrieves one month before the current date and 3 months after. If you want to change the number of months after the current date, you may add "months=NNN&" to the URL before the calendar name. (In the file, this will be "months=NNN&".)Using iSync
You can use iSync to synchronize your calendar from iCal into a Palm. If you get "Missing Sync", you can also sync into a PDA running Microsoft's Pocket PC operating system.
In order to do this, you'll first need to sync your iCal calendar to make sure it is up to date, and then sync your PDA from iCal.
Make sure that you are using the url with cgi-bin/subscribe, as documented here. If you have been using the older cgi-bin/ical, you will first need to update to subscribe. I recommend that you delete the calendar you were using with ical and create a new one with subscribe. It can have the same name.
If you have problems and need to completely resynchronize from iCal to your Palm, I recommend the following:
- Make sure iCal is properly synced to RULink
- Exit iCal if you are running it
- Do the following command from the command line
rm ~/Library/Application\ Support/SyncService/LastSync\ Data/Calendars/*
- In iSync, select your Palm device and check the box labelled "Force slow synchronization".
- Now hit the sync button on your Palm.
When setting up iSync, look at the option "Put events created on the Palm into." This lets you specify a calendar into which events will be placed if you create events on the Palm. I recommend creating all events in RULink. But if you do create events on the Palm, they will show up in this calendar after syncing. You can then look at this calendar and enter the events into RULink.
Like the Sun sync tool, iSync is only intended to be used from one computer. That is, you are expected always to sync your Palm to the same computer. However I've successfully used it from more than one. The problem is that when you switch computers, it puts your whole calendar into the unfiled calendar on iCal. However you can just delete that. The data on the Palm is correct, and your main calendar on iCal isn't changed.
Issues
Note that recurring events currently come across looking like lots of individual events. As far as I know, all of the events that show on your Sun calendar do come across. This is not always the case when using Sun's synchronization tool.One other difference from Sun's tool: If you request a reminder, Sun's tool turns that into an alarm on the Palm. This is probably not right, since reminders are documented as generating email, not audible alarms. Thus I believe it is correct not to put reminders on the Palm.
If you are from another site and want to install the PHP script on your own site, here's a copy set up so you will fetch it rather than run it as a script. Note that you'll need to edit the script to have your own port number and hostname, and to have the generated DN be compatible with your directory structure. It should be clear enough how to do that, even if you don't know PHP, as long as you've done some scripting. Obviously you'll need a web server set up to run PHP.
For more information, contact
rulink-support@rutgers.edu
©
2007
Rutgers, The State University of New Jersey. All rights reserved.
