[Novalug] mounting a Samsung S4 smart phone (was: Re dynamic symbolic links)
Jon LaBadie
novalugml@jgcomp.com
Mon Apr 27 23:42:27 EDT 2015
Correction,
where I say "iwatch" below, I should have said "inotifywatch".
On Mon, Apr 27, 2015 at 10:51:10PM -0400, Jon LaBadie via Novalug wrote:
> On Mon, Apr 27, 2015 at 10:04:59PM -0400, pereira via Novalug wrote:
> > (I can't believe how much time you guys are putting in to this. Thanks!
> > it's interesting)
> >
> > .... and the following remark,
> > " When "just works" doesn't work it can be very hard sometimes to find out
> > why and
> > how to change it. If I run a script after plugging in a USB drive so it
> > gets mounted,
> > you may say "who wants to have to do that?" ' touches off this question:
> >
> > When I connect my Samsung S4 smart phone to one of the USB connectors on
> > my computer (Ubuntu 14.04), an icon for the phone magically appears on the
> > desktop. Sometimes, the icon disappears, perhaps after a timeout.
> > When I hover over it, I see 'removable volume, not mounted yet'.
> > For no reason that I can see the icon then changes, from Samsung Android to
> > Verizon, and then back again. After some clicking on things I suddenly get
> > a little up-arrow that I can hover over. It tells me:
> > 'mtp://[usb:002,067]/'.
> > Then, before I can do what I want to do, it goes off again; and when I turn
> > on
> > this narcoleptic phone back on I get 'mtp://[usb:002,084]/'. Then, the
> > phone
> > dozes off again and when I wake it up I get 'mtp://[usb:002,085]/'.
> >
> > If I had my druthers it would go to /media/pereira/Samsung, or something
> > similar.
> >
> > If you had control over things, and you knew what you were doing, you should
> > be able to make it go there, correct?
> >
> > Is there a logical explanation for what's happening?
> >
>
> I've got an LG android tablet. When I plug it in I quickly get an "LG" logo
> on my desktop. About 10 or 20 seconds later, udev does its mtp thing,
> the LG logo goes away, and is replaced by ??I forget??. But I can click
> on it and browse my tablet.
>
> If, on the tablet I tell it to switch off mtp, the logo goes away and the
> LG one returns. Tell the tablet to switch on mtp, ... you guessed it.
>
> For me, the actual place it is mounted is /home/jon/.gvfs/gvfs/mtpXXXXXXXX.
> There is a duplicate mtpXXXXXXXX in /run/media/jon/???. When I'm in an
> xterm shell, I can cd there and browse with shell commands.
>
> BTW, for me, the XXXXXXX is different each time I connect. Even if to
> the same USB port.
>
> Those .gvfs and /run paths are rather inconvenient to use in the shell.
> So I wanted symlinks in my home dir to point to them. But because the
> mtpXXXXXXX part is different each time I connect, that would not work.
>
> I set up a monitor called iwatch. Anytime something is created or
> deleted in ~/.gvfs/gvfs, iwatch runs a script for me. The script
> checks if the thing created or deleted is "mtp*". If yes, the
> script either creates or deletes the symlinks I want in ~/lg.
>
> Using this I can access the tablet with a gui file manager or
> with shell commands.
>
> Jon
> --
> Jon H. LaBadie novalugml@jgcomp.com
> 11226 South Shore Rd (703) 787-0688 (H)
> Reston, VA 20190 (703) 935-6720 (C)
> **********************************************************************
> The Novalug mailing list is hosted by firemountain.net.
>
> To unsubscribe or change delivery options:
> http://www.firemountain.net/mailman/listinfo/novalug
>>> End of included message <<<
--
Jon H. LaBadie novalugml@jgcomp.com
11226 South Shore Rd (703) 787-0688 (H)
Reston, VA 20190 (703) 935-6720 (C)
More information about the Novalug
mailing list