I have just received my Nexus 4 and I want to plug it in to root it/copy files onto it but somehow I can't see it while I use
$sudo fastboot devices
I am using this version of fastboot on my ubuntu laptop
android-tools-fastboot 4.1.1+git20120801-1
EDIT
While the issue of rooting the device was solved (simply fastboot only sees devices while they are in bootloader) I still cannot see the device while I plug it in the system.
You can update your gvfs file to enable your computer to see Nexus 4 files. Use the ppa
After you update, reboot your computer. When you connect the Nexus 4 to the PC, make sure its unlocked. This should help you. :)
If you are trying to use adb and cannot see your device, change the ownership of your ~/.android folder to the current user .
For more details see here.
The Nexus 4 does not have a mass storage mode. I recommend using AirDroid instead, as it will allow you to upload/download/manage files on your Nexus device remotely.
The problem was that I have had "fast USB charge" option checked in kernel that I have installed http://forum.xda-developers.com/showthread.php?t=2002782
After unchecking that I can see folders on my Nexus 4.
Check the following link out. It worked for me.
http://forum.xda-developers.com/showthread.php?t=2004182
Per Nexus 4 not detected as USB device with OTA update 4.3
Settings → Storage → ⋮ → USB-connection to computer → MTP media device ☑