Sunday, September 2, 2012

PTP camera with Xmonad

My camera supports the Picture Transfer Protocol (PTP) rather than the USB Mass Storage device Class (UMSC) protocol.  My bare bones debian install could not mount it.  This was easily resolved by installing gphotofs and fuse.
ROOTPROMPT$> apt-get install gphotofs 
Which will also install the fuse dependencies.  Then add the appropriate users to the fuse group.
ROOTPROMPT$> adduser USERNAME fuse
Reboot.  Plug the camera into the computer.  I haven't yet bothered to mount the camera to the /media directory.  I simply made a /home/USER/camera directory and mount to there when I need to move pictures.
$> mkdir /home/USER/camera
$> gphotofs /home/USER/camera
The camera is then mounted to the /home/USER/camera directory as a normal filesystem, and you can traverse it with common commands such as ls, cd, etc..
   The following command unmounts the camera.  This will not work if you have any terminals open to the camera directory.
$> fusermount -u camera

No comments:

Post a Comment