I'm using Ubuntu 17.10 and it automatically mounts my mobile phone (Android, Xperia Z5 Compact) when I connect it via USB. This only happens under Unity that I normally don't use.
What's the magic that is actually happening so that I can "mount" the phone with my favorite window manager spectrwm?
gio
is doing the "hard work".To mount an MTP device, you can do the following steps:
gio mount -li | grep unix-device
and look for/dev/bus/usb/...
. If you have several hits, remove thegrep ...
part and try again to find out which device is the phone.gio mount -d /dev/bus/usb/...
with the full path afterunix-device
from step 2./run/user/1000/gvfs/mtp:host=...
where1000
is your user ID and may vary and the path ends with the string that can be found ingio mount -li
's output afteractivation_root
.