Sync iPhone/iPod Touch 3G in Ubuntu

A lot of people have been trying very hard to get iPhone and iPod Touch syncing to work correctly in Linux. Some have been doing a FUSE filesystem (which accesses the iPod) and some the database and syncing. Remember this is pre-alpha quality, but I found it synced my tunes nicely from Linux. But due to the database version being old (but quite good enough for the iPod), iTunes does not play nice with it - and will just resync the tracks and may delete them. Also the iPod must have been previosly initialised with a version of iTunes. If you cannot acquire it, or it will not run, contact teuf on #gtkpod in irc.freenode.net. You have been warned!

Mounting support

First, grab iFuse:
Add the following lines to /etc/apt/sources.list as root:

deb http://ppa.launchpad.net/jonabeck/ppa/ubuntu intrepid main
deb-src http://ppa.launchpad.net/jonabeck/ppa/ubuntu intrepid main

Then do:

sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com F0876AC9
sudo apt-get update
sudo apt-get install ifuse ifuse-dev

This should install support for reading and writing files.
Create a mount point:

sudo mkdir /media/ipodt/

Add yourself to the fuse group:

sudo useradd -G fuse [your_user_name]

To allow normal users to mount the FUSE filesystems, edit /etc/fuse.conf and uncomment the line (remove the hash from the start of it):


Log out and back in again, or spawn a new login shell. Mount the FUSE filesystem:

ifuse /media/ipodt

You should see that your iPod should be mounted as yourself. You should be able to find the tracks and play them from the computer. They are oddly named and located in iTunes_Control/Music .

Syncing support

To properly sync music (well I say properly), you need to install a special branch of libgpod. You'll need to get it from git. WARNING! THIS WILL OVERWRITE YOUR EXISTING LIBGPOD! Be careful. First install development libraries:

sudo apt-get install git-core build-essential cmake autoconf automake libtool intltool gtk-doc-tools libsqlite3-dev zlib1g-dev

Get teuf's sandbox repository branch:

git clone git://gitorious.org/~teuf/libgpod/teuf-sandbox.git
cd teuf-sandbox
git checkout origin/iphone30
CFLAGS="-g -O0" sh autogen.sh --prefix=/usr
sudo make install

libgpod should now be installed, if all goes to plan.
Create control directories and files:

mkdir /media/ipodt/iTunes_Control/Device

Get the uuid of your device:

lsusb -v | grep -i iSerial

It should be the one that's 40 characters long. From the same teuf-sandbox directory, run:

tools/ipod-read-sysinfo-extended /media/ipodt

Check that a file exists. Do:

cat /media/ipodt/iTunes_Control/Device/SysInfoExtended

This should spew XML at you.
Now, install your syncing program of choice. I chose gtkpod because it works for me.

sudo apt-get instal gtkpod

The program should pick up the device and ask which model it is. There should be your device listed at the bottom (you may have to scroll). Choose it and let it do its thing, and initialise your iPod. Check a file has been created:

ls /media/ipodt/iTunes_Control/Device

If you get nothing, there's a problem. Go ask teuf. If you get that filename returned. all is well. You are able to sync, save files and update the database. Bear in mind that it saves an older version of the database, so if you go to iTunes and back, it will update tracks and the database, but they should still be readable in Linux.

I hope this has been helpful to you!

Here are some helpful references if you get stuck:
iPod Syncing


Best Security Practices For Your Personal Computer

Many of you may be worried or concerned about the security of your computer. With threats of viruses, spyware, bank details being stolen, accounts cracked and vulnerabilities everywhere, it is natural to be paranoid.

Here are some top security practices:

1. Change your passwords.

All of them. Yes, really. It does make a lot of difference to the chances of a cracker being able to track you, monitor you or pretend to be you and not. Normally people advise you change all your passwords every 2 weeks. However don't write them down, and make them long and memorable using capital letters, numbers and symbols.

Also, try not to make your password a dictionary word, or even close to it. Make it look like random garbage. You can use mnemonics to help you remember them. Consider the following sentence:

"Do as I say, not as I do!"

This can help you remember and formulate the password:
You could add numbers, or convert some letters to numbers, etc:

Being 10 characters long, this is a medium strength password.
Try to make a sentence about 14+ letters long for strong security, but remember nothing is unbreakable!

2. Install security software.
A lot of users might think here: "I have a firewall. why do I need this?". The answer is simple: Just because you can stop things coming into your computer and going out, it doesn't make it invulnerable to threats such as downloaded malicious files or bad web pages. I recommend Windows users install Avast Antivirus for free. Linux users should install rootkit checkers, such as rkhunter and chkrootkit.

3. Update your system regularly.
This is one of the worst things you can leave out. If you do not update every single piece of your system, using update managers and such, vulnerabilities may be discovered in older versions of your software. Once you have a vulnerability, anything you could do (e.g. visiting a web site, opening a PDF) might give intruders access to your system. So remember to patch, and turn automatic updates ON!

4. Install a firewall.
You may have one already, but some dismiss them. Make sure they're turned on! If you have Windows turn Windows Firewall on, and make sure there are little to no exceptons (aside from the things that you REALLY need). On Linux you can alter iptables via a GUI like Firestarter if you wish.

5. Change your browser.
If you use Internet Explorer, you might do better to switch. It is well known for being particularly vulnerable to attack. There have been more security holes in Internet Explorer than any other browser, and they have been more slowly patched as well. Firefox and Google Chrome are good alternatives. Check Secunia and SecurityFocus for more details. There is also a table of known vulnerabilities in the latest versions of many browsers on Wikipedia.

6. Start over
While many things may get in the way, you have tried your best to rid your computer of viruses, but there is a good chance that the viruses you have obtained have not been removed, as they may be too new for the database, or are too malicious. (Remember the stories about Conficker, the massive Windows malware, that you couldn't remove with antivirus?). If all else fails, the best way to remove any threats is to wipe your disk completely. Do a complete reinstall. There are many tutorials available, just google for them, or follow the guides for Windows XP and Windows Vista.If you have a recovery disk that came with your computer, then use this instead. In any case, remember to back up!

7. Back up your sensitive data.
Anything you do not wish an intruder to get at would be best removed or moved to portable storage. Encrypted is best!

8. NEVER save bank/paypal details to your computer!
If an intruder gets in, they can recover your passwords (regardless of whether they're locked out) and recover your bank details. Ouch.

9. If you have to do banking, do it on a Linux Live CD
As this Washington Post article says, you can avoid the risk of Windows malware, spyware, trojans, viruses, etc completely if you use a Linux Live CD to bank online with. I would recommend you download Ubuntu and burn it to a CD-R using DeepBurner (using Burn ISO to disk option) or CD recording software of your choice, then boot from it. Here's how:

Reboot your computer.
If you see the Ubuntu boot screen, then select your language and press Enter at the next prompt.
If you don't, see if there is a message to press a button to select boot device. Press it and select the CD or DVD device.
If there is no message, find the message that says to press a button to enter SETUP. From there navigate to Boot devices and put priority on your CD/DVD device (method may vary). Finally save changes and exit.

10. Install Linux alongside Windows.

If you like the CD, you can install it permanently so that you can install more software, by selecting the Install option on the desktop of Ubuntu, making sure to resize the Windows partition to whatever size you need. (Don't panic if resizing takes ages!)

I hope that this has helped you become more secure. Please comment if you have any suggestions or things I may have left out.