1. Add the following repository
Open a terminal and paste this:
sudo sh -c "echo 'deb http://ppa.launchpad.net/jonabeck/ppa/ubuntu jaunty main' >> /etc/apt/sources.list"
For any other version, simply replace the jaunty by the respective version name (hardy, intrepid or karmic).
Alternatively, Ubuntu Karmic users can run this instead of the command above:
sudo add-apt-repository ppa:jonabeck
2. Add the PPA key using this command:
sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com F0876AC9
3. Install ifuse:
sudo apt-get update && sudo apt-get install ifuse
Once the installation is done, connect your iPhone to your computer via the USB cable.
Update: you may want to take a look at this also: Mount iPhone On A Fresh Ubuntu Karmic Koala Installation (The Complete Guide)