gphoto / gphoto2

The gphoto2 commandline tool for accessing and controlling digital cameras.
GNU General Public License v2.0
720 stars 116 forks source link

Is there a proper way to unmount a camera (mounted via gvfs) so gPhoto2 can use it? #584

Open r-a-i opened 1 year ago

r-a-i commented 1 year ago

I'm building an automated lab test bench that will need to record a movie every few hours.

When I power cycle our Canon M50/R50 it auto mounts on Ubuntu (20.04) as a gvfs volume. I can manually unmount it and gPhoto2 works well, but if anyone ever power cycles or restarts the system someone will need to go in and re-do this. I know experiments will fail...

I have disabled auto mount by: cd /usr/libexec sudo mv gvfsd-gphoto2 gvfsd-gphoto2_bkp but this seems very dirty and will probably cause nightmares when replicating our system.

Ideally, I would like to call something like before launching my acquisition script: gphoto2 --unmount=Canon M50 or: gio mount -s <something>

Any help in finding the right way to unmount? I've tried mount, gio, gvfs-* and no dice.

msmeissn commented 1 year ago

gio mount -s gphoto2

should detach the gvfs gphoto2 slave, but you will probably still need to replugin the camera if it was plugged in.