Wednesday, March 17, 2010

Get your Android Phone and Thunderbird in Ubuntu to work with MS Exchange

I recently got full time employment in an organization that depends on Microsoft Exchange for all of its email and scheduling needs. So, something that I investigated as soon as I could was how I could get my Rogers HTC Dream (a.k.a. the T-Mobile G1) and my Ubuntu Linux Laptop to connect to my new employer's MS Exchange server to receive and send emails, and to do my scheduling.

I was delightfully impressed with how incredibly easy it was to set up my new MS Exchange-based email account on my HTC dream. I just navigated to the Data Synchronization submenu in my phone's settings menu, clicked on "Microsoft Exchange", entered in my new email address and my password, waited while it communicated with the server, and then voila it finished!

Unfortunately it was not that easy on Ubuntu! It took me a week before I found any answers on the internet, but I finally got my MS Exchange email and calendar account set-up in Thunderbird. I first tried to use Ubuntu's pre-installed Evolution Mail to connect to MS Exchange, but alas it didn't work.

The solution came in the form of a Gateway program called DavMail. The principle of this program is that it mediates a (POP3/IMAP/Caldav) connection between your email client and the MS Exchange server in a way that makes both parties happy. Although I haven't tried this with a program other than Thunderbird, it should in theory work alright.

Once you've downloaded and installed DavMail using the link above, make sure that you have Sun Java version 6 installed. To do so, type in sudo apt-get install sun-java6-bin. After you're finished, start up DavMail by navigating through the following Gnome menu items: Applications > Internet > Davmail. A yellow circular icon will appear in the Gnome system tray indicating that DavMail has started up. Right-click on that icon, then click on settings, and then input your organizations Outlook Web Access (OWA) address. It may be something like https://mail.domain.org/owa. Take note of the local ports that it's opening up for various services (e.g. POP3/IMAP/Caldav) to see what ports your programs will need to use to access those services.

The next step for me was enabling IMAP access to my MS Exchange email. You can choose POP3 if you like, but IMAP will ensure that you have access to all the email folders that you regularly access at work. The DavMail folks already set up a nice tutorial on how to set-up Thunderbird with IMAP, so go through the steps they've already posted (warning, their screenshots are in French. This shouldn't be a problem though, as their instructions are in English!). Once you've completed those steps, go into your Thunderbird Account Settings for your new account and make sure that the port number it uses for accessing your email through IMAP is the same as the DavMail setting (the default is 1143).

Next item of business is to set up your MS Exchange calendar through Thunderbird's Lightning extension. Again, the DavMail folks have covered the steps to do these so do read what they've posted. Now you should have access to your email and calendar from Thunderbird at home!

The caveat to all of this is that, as a Gateway program, DavMail has to be running for you to communicate with your employer's MS Exchange server. So, be sure to start up DavMail if you want to check your MS Exchange email/calendar. It would be nice if this functionality was native in Thunderbird, but oh well. At least these steps allow you to use Thunderbird at all!

Saturday, March 6, 2010

Workaround for broken Ubuntu Suspend functionality in your Toshiba Satellite

Lately I've been noticing that my Toshiba Satellite A200 Laptop, on which I'm running Ubuntu 9.10, simply won't go into Suspend-mode properly. I did some googling and found out that there's an alternative program you can download to put your computer in suspend mode called Powersave. Its use is remarkably easy and I'm happy to report that it is managing to put my laptop in suspend when the regular suspend in Ubuntu can not manage.

Usage

Go into your terminal and type in: powersave -u. That's it!! It is also technically supposed to be able to put your computer in hibernate by typing in powersave -U, but it simply doesn't work on my computer for some reason.

Installation

If you are having similar problems as I am and want to install this program, either go to Synaptic Package Manager and look for and install powersaved, or go to your terminal and type in sudo apt-get install powersaved. You can make it even easier on yourself by creating a shell script containing the powersave command with the suspend argument. Simply navigate in Nautilus to the directory where you want to create your shell script, right click on the background of that directory's window, click on Create Document > Empty File, and then add the following into the empty document:

#! /bin/bash

powersave -u

When you're done, save it with a filename such as suspend.sh, and then create a launcher that activates your script. I right-clicked on my upper Gnome-Panel and clicked on Add To Panel... > Custom Application Launcher, entered in "Suspend" in the name field, sh /home/inkhorn/Scripts/suspend.sh in the command field, and chose a custom icon to represent the launcher on my panel.

Now all I have to do is click on my newly created launcher button on my Gnome-Panel and my computer goes into Suspend mode like it should! You of course don't need to go through the trouble to make a button for this on your Gnome-Panel like I have, but it certainly saves typing in the long run.