By default if you direct connect your Galaxy Nexus to Ubuntu, you probably can not works right away. But future updates might contains the features but for now, you have to install the tools by typing following into terminal:
"
sudo apt-get install mtp-tools mtpfs"
After you installed the tools, plug Galaxy Nexus to your computer. Make sure MTP (media transfer protocol) is selected. Then type following commands:
"mtp-detect | grep idVendor"
"mtp-detect | grep idVendor"
Noted the numbers and now run following commands:
"gksu gedit /etc/udev/rules.d/51-android.rules"
Now, a plain text editor should appears right now. Put followings text, all with single line.
"SUBSYSTEM==”usb”,
ATTR{idVendor}==”VENDORID”,
ATTR{idProduct}==”PRODUCTID”, MODE=”0666″"
Replace the numbers you have noted (VENDORID & PRODUCID). Now, save and close the text editor. Unplug your phone and run following commands:
sudo service udev restart
sudo mkdir /media/GalaxyNexus
sudo chmod a+rwx /media/GalaxyNexus
sudo adduser YOURUSERNAME fuse
Replace your username. Then run these commands:
gksu gedit /etc/fuse.conf
Remove # of the last line. (#user_allow_other). Save and close.
Now, restart your computer and then run following commands:
echo “alias android-connect=\”mtpfs -o allow_other /media/GalaxyNexus\”" >> ~/.bashrc
echo “alias android-disconnect=\”fusermount -u /media/GalaxyNexus\”" >> ~/.bashrc
source ~/.bashrc
Connect your phone and run "android-connect"
Done! enjoy..
note: if you are copying the code directly from the website, remember to retype the quote. Otherwise, commands wont work.