[Gllug] Canon PowerShot S50

Richard Turner richard at disabledliving.org.uk
Mon Sep 8 22:55:39 UTC 2003


Hi,

I just treated myself to this digital camera for my birthday (having
checked that it works OK with Linux first), but now try as I might I
can't seem to make it talk to my box.

I'm running what is practically a virgin installation of Red Hat 9, only
now I've upgraded libgphoto2 and gphoto2 with RPMs from Sourceforge.

I followed instructions to try to get gphoto2 working with it, so now
when I switch the camera on it's detected and since there's no driver
set to handle it, hotplug is used to run a script that should launch
gtkam.  In fact it's the script that ships with gphoto2 called
usbcam.x11 (listed below).  gtkam doesn't start though, and refuses to
detect my camera if I start it manually.

I'm stumped :(  I'm sure that I've done everything on
url(http://gphoto.sourceforge.net/doc/manual/permissions-usb.html#usb-on-linux) but it doesn't want to play :(

The horrible thing is, since I also have a Sony NetMD that I can't use
with Linux I'm contemplating installing WinXP as well in order to use
these devices!

#!/bin/bash
# $Id: usbcam.x11-app,v 1.2 2002/10/18 02:28:00 hun Exp $
#
# /etc/hotplug/usb/usbcam
#
# Sets up newly plugged in USB camera so that just one certain user
 
USER=richard
 
# can access it from user space. (Replace root by the user you want
# to have access to the cameras.)
 
# It then runs the X11 application (gtkam is used as an example)
 
X11_APP=/usr/bin/gtkam
 
# on the X11 display (:0 should work on most single user workstations)
 
DISPLAY=:0
 
# in the directory (~$USER is just the user's home directory)
 
DIRECTORY=~$USER
 
#
# Note that for this script to work, you'll need all of the following:
# a) a line in the file /etc/hotplug/usermap that corresponds to the
#    camera you are using. You can get the correct lines for all cameras
#    supported by libgphoto2 by running "print-usb-usermap".
# b) run your camera software as the user given above
# c) a Linux kernel supporting hotplug and usbdevfs
# d) the hotplug package (http://linux-hotplug.sourceforge.net/)
# e) su
# f) env
# g) X11
#
# In the usermap file, the first field "usb module" should be named
# "usbcam" like this script.
#
# Script written by Trevor Woerner but slightly adapted for inclusion
# into libgphoto2.
 
SU=/bin/su
ENV=/usr/bin/env
 
if [ "${ACTION}" = "add" ] && [ -f "${DEVICE}" ]
then
    chmod a-rwx ${DEVICE}
    chown ${USER} ${DEVICE}
    chmod u+rw ${DEVICE}
 
    if [ ${USER} != "root" ]
    then
        # we don't want to run this as root. definitely not.
        cd ${HOME}
        ${SU} ${USER} -c "${ENV} DISPLAY=${DISPLAY} HOME=${HOME}
${X11_APP}"
    fi
fi


-- 
"Racing turtles, the grapefruit is winning..."


-- 
Gllug mailing list  -  Gllug at linux.co.uk
http://list.ftech.net/mailman/listinfo/gllug




More information about the GLLUG mailing list