On Tue, 18 Sep 2012 20:54:44 +0100, Neil Bothwick wrote:

> >    Anyway, it's all usable but a bit clumsy. Is there a sensible way I
> > can have the device recognized and mounted via rules in fstab? (Or any
> > other fixed file?)  
> 
> You could have your udev rule RUN mtpfs to mount the device. It takes a
> few seconds to mount it, so I'd run it with &.

I've had a play with this and got it working for my Nexus7. The udev rule
has to go in a high-numbered file, because libmtp adds its own rules

% cat /etc/udev/rules.d/99-android-mtp.rules
ATTR{idVendor}=="18d1", ATTR{idProduct}=="4e42", 
RUN="/home/nelz/bin/mountnexus.sh &"


% cat /home/nelz/bin/mountnexus.sh       
#!/bin/sh
logger "Nexus connected"
mkdir -p /media/nexus7
jmtpfs -o allow_other /media/nexus7
logger "Nexus mounted"

You need to enable allow_other in /etc/fuse.conf.


-- 
Neil Bothwick

Oops. My brain just hit a bad sector.

Attachment: signature.asc
Description: PGP signature

Reply via email to