digital camera
Rick Stevens
rstevens at vitalstream.com
Mon Jul 24 22:01:02 UTC 2006
On Sun, 2006-07-23 at 22:14 -0600, karlp at ourldsfamily.com wrote:
> On Thu, 20 Jul 2006, 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.
>
>
> Nice script Rick. One other suggestion I would make is create a bin
> directory in your home directory, then put scripts you write there. Then
> the link command would be:
>
> ln -s /home/yourname/bin/mntcam /usr/bin
> &
> ln -s /home/yourname/bin/mntcam /usr/bin/umntcam
>
> This gives you the option of just backing up your home bin dir for moving
> and modifying your scripts.
>
> One nice tool for writing scripts is vim, or you can venture into
> KDevelop, which also does syntax hilighting.
Vim does syntax highlighting. The trick is that you generally have both
vi and vim (/bin/vi and /usr/bin/vim). If you put this in your /.bashrc
script:
if [ -d /usr/bin ]; then
alias vi="vim"
fi
then you will invoke vim instead of vi complete with syntax highlights.
> My 2 bits.
>
> Karl (from a hotel room in Idaho the night before a funeral on my wife's
> side of the family).
Sorry to hear that, Karl.
----------------------------------------------------------------------
- Rick Stevens, Senior Systems Engineer rstevens at vitalstream.com -
- VitalStream, Inc. http://www.vitalstream.com -
- -
- Millihelen, adj: The amount of beauty required to launch one ship. -
----------------------------------------------------------------------
More information about the Redhat-install-list
mailing list