[Novalug] dynamic symbolic links
Peter Larsen
peter@peterlarsen.org
Sun Apr 26 20:48:44 EDT 2015
On 03/06/2015 04:41 PM, Aaron M. Ucko via Novalug wrote:
> Jon LaBadie via Novalug <novalug@firemountain.net> writes:
>
>> So it would be nice if I could have something like a
>> symbolic link to "/run/user/1001/gvfs/*/SD card".
> udev can automatically create and remove symlinks under /dev according
> to custom rules. Ideally, you'd arrange to establish a stably named
> symlink that you could use as the basis for your MTP mount, yielding a
> stable /run/user path. I don't remember the syntax offhand, though.
>
On Fedora 21 that's exactly what's happening. The directory "*" in this
case is the USB Id that others have mentioned (MTP is a bit more complex
than a single USB connection - for instance my Note3 has 2 USB disk
devices showing up - one for the build in SD Card and one for the
external one - both identified under the USB ID of the phone). They are
both present in the /run/user.... structure:
/run/user/1000/gvfs/mtp:host=%5Busb%3A001%2C006%5D/Phone
The mtp syntax uncoded is: mtp://[usb:001,006]
Not sure if MTP supports a naming for the USB hub that it basically is
presenting. On my desk top I don't have nasty % codes - I just see
"Samsung Android" listed under devices, and the window that shows up has
the two SD Cards listed. Only when I go for details and ask for the
"address" of that Window do I see the mtp:// syntax.
--
Regards
Peter Larsen
More information about the Novalug
mailing list