How to connect Nokia Lumia 520 to Ubuntu 12.04

These are my steps to connect the Nokia Lumia 920 (WP8):

1. Add the MTP file system in Ubuntu:

sudo add-apt-repository ppa:langdalepl/gvfs-mtp 
sudo apt-get update

2. Make a new udev rule:

2.1 Create the rule file:

sudo nano /etc/udev/rules.d/69-libmtp.rules

2.2 Add the following line to the file:

ATTRS{idVendor}=="01b1", ATTRS{idProduct}=="01b1", SYMLINK+="libmtp", MODE="660", ENV{ID_MTP_DEVICE}="1"

2.3 Save the file (Ctrl+O)

3. Reload udev rules:

# udevadm control --reload-rules

4. Connect (or reconnect) the device.


Make a new udev rule

sudo emacs -nw /etc/udev/rules.d/69-libmtp.rules

And add the following line

ATTR{idVendor}=="01b1", ATTR{idProduct}=="01b1", SYMLINK+="libmtp",
MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" 

You need to refresh the udev rules and unplug/replug the device and it will work. :-)