MTP on Ubuntu Linux works out-of-the-box

I never been an enthusiast of MTP but sometimes when You have Android 4.x and no root you have to deal with it.
mtp ptp on Linux
Ubuntu 14.04 and above has the libmtp and mtpfs build-in but the end result is that isn’t obvious how it works.

The Nautilus file manager open the device, then you go to /DCIM/100ANDRO and you see your photos and videos if you try to open something you get libmtp error: unknown error, wtf?

Probably the problem isn’t libmtp but the layers above (Fuse, GVFS), however MTP isn’t designed to open directly the files on the device like “USB Mass Storage”, so the workaround is quite simple: drag and drop the file away from your device and it will work :D

Here a list of fixed which weren’t necessary on Ubuntu 14.04 LTS, but may be useful in other situations:

corso javascript