HP PhotoSmart 635 with Linux with Linux


-(RedHat Linux 9 and Slackware 9.1)

Reference: http://www.faqs.org/docs/Linux-HOWTO/USB-Digital-Camera-HOWTO.html

-Configuring your HP Digital Camera

Only need to configure your HP Digital Camera as a USB Drive. (Read the Camera instructions for assistant)

-Mounting Point

You will need to create a directory for a mount point, and you will need a name for this directory. I use camera and place it in /mnt.
The name of the directory (camera in my case) can be any word of your choice. The command for creating this directory is:

[bash]$ mkdir /mnt/camera

I prefer for all my pictures to be in one directory with subdirectories by subject matter, so I also created a directory named pictures,
and placed it in my home directory. The name of the directory (pictures in my case) can be any word of your choice.
The command for creating this directory is:

[bash]$ mkdir ~/pictures

As root
Edit the file /etc/fstab and add this line:

/dev/sda1 /mnt/camera vfat rw,noauto,user 0 0

-Create the script file

As User
Type in the following script file:
----------------------

echo "Please enter a directory name for the pictures:"
read DIRPATH
if [ "$DIRPATH" = "" ]
then
DIRPATH="mypic"
echo Moving photos to $DIRPATH...
fi

mkdir ~/pictures/$DIRPATH
mount /mnt/camera
su -c " mv /mnt/camera/dcim/100hp635/hpim*.jpg /home/heberv/pictures/$DIRPATH;
chown -R $USER:users /home/heberv/pictures/$DIRPATH/*.jpg"
umount /mnt/camera
chmod -x /home/heberv/pictures/$DIRPATH/*.jpg

--------------------
-Make it Executable

Now make the script file executable. The command for that is:
chmod +x your_script_file_name


Edited with Bluefish
on a PC with Linux Fedora.
BACK