digital camera

Rick Stevens rstevens at vitalstream.com
Fri Jul 21 22:02:34 UTC 2006


On Fri, 2006-07-21 at 15:52 -0500, Fred Grant wrote:
> On Thu, 2006-07-20 at 12:13, Rick Stevens wrote:
> > On Thu, 2006-07-20 at 08:37 -0500, Fred Grant wrote:
> > > On Wed, 2006-07-19 at 19:27, Rick Stevens wrote:
> > > > On Wed, 2006-07-19 at 18:05 -0500, Fred Grant wrote:
> > > > > Recently acquired an el cheapo digital camera made by dgx.  When I go to
> > > > > mass storage mode via usb the hardware browser indicates the presence of
> > > > > /dev/sda1.
> > > > > 
> > > > > Do any of you have any pointers for viewing images?  I assume I'll have
> > > > > to mount /dev/sda1 but I don't know what type of file system it is or
> > > > > how or where to mount it.  Otherwise this should be a piece of cake!
> > > > 
> > > > 99% of all cameras use FAT-32 or VFAT filesystems.  Have you tried
> > > > gphoto (Gnome) or kamera (KDE) to see if they "grok" your camera?
> > > > 
> > > > If not, you probably want to create a mountpoint for your camera's
> > > > storage (e.g. "/media/camera") once.  Then, an appropriate mount command
> > > > would be
> > > > 	
> > > > 	mount -t vfat /dev/sda1 /media/camera
> > > > 
> > > > Then you'll see the directory structure under /media/camera.  One of
> > > > the more common would be:
> > > > 
> > > > 	/media/camera/dcim/olympus/file.jpg
> > > > 
> > > > That's from an old Olympus 3050Z camera I have.  Usually, there will
> > > > be a "dcim" directory, and under that some permutation of your camera's
> > > > maker.  The "*.jpg" files are the actual images.
> > > > 
> > > Thanks Rick.  I got it to work with /mnt/pics.  How about a script to
> > > automate the mount command?  I've never written a script before so I
> > > don't know how or where to save it so I can find it again and use it as
> > > needed.
> > 
> > Uh, hmmm.  Well, as root, create the file "/usr/bin/mntcam".  In it, put
> > these lines:
> > 
> >     #!/bin/bash
> >     if [ $0 = "mntcam" ]; then
> > 	mount -t vfat /dev/sda1 /mnt/pics
> > 	echo "Camera mounted at /mnt/pics"
> >     else
> > 	umount /mnt/pics
> > 	echo "It is now safe to unplug the camera"
> >     fi
> > 
> > Save it.  Then (still as root), enter these two commands:
> > 
> >     # chmod 755 /usr/bin/mntcam
> >     # ln -s /usr/bin/mntcam /usr/bin/umntcam
> > 
> > You now have two commands "mntcam" to mount it, and "umntcam" to unmount
> > it.
> > 
> Thanks Rick, I'll give it a shot.  I thought about putting the device in
> /etc/fstab assuming this would make mounting relatively easy from the
> command line.  Would this be an alternative?

Certainly.  A line such as:

    /dev/sda1 /mnt/pics vfat pamconsole,exec,noauto,managed 0 0

would do it.  Just make sure you have "noauto" specified or the system
will whine at boot time if the camera isn't plugged in.
----------------------------------------------------------------------
- Rick Stevens, Senior Systems Engineer     rstevens at vitalstream.com -
- VitalStream, Inc.                       http://www.vitalstream.com -
-                                                                    -
-              "Swap memory error: You lose your mind"               -
----------------------------------------------------------------------




More information about the Redhat-install-list mailing list