Connect your Android mobile to the computer. If the connection is detected by mobile then change the USB connection setting on phone to "Mass storage". Even after this if you are not able to access the files on your Ubuntu, follow below steps.
- Connect your mobile using USB cable.
- Execute "lsusb" command on terminal as : $ sudo lsusb
- In the output displayed by lsusb command check if your mobile device is listed or not. Ideally it should be displayed with your mobile device vendor ( LG, Samsung, HTC etc...) or with Google Inc. name.
- If you are able to locate the device in the list then unplug the device from computer.
- Now install the newest Version of "libmtp" by following steps mentioned in the post http://www.humans-enabled.com/2011/12/how-to-fix-samsung-galaxy-nexus-mtp.html
- Once you have installed "libmtp", you can connect your device and use gMTP to view the files on device.