From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: From: Maxim Mitrofanov To: community@altlinux.ru Subject: Re: [Comm] Digital camera problem Date: Mon, 17 Mar 2003 23:11:13 +0500 User-Agent: KMail/1.5 References: <20030315145305.GA13349@pc053.trc-odintsovo.ru> In-Reply-To: <20030315145305.GA13349@pc053.trc-odintsovo.ru> MIME-Version: 1.0 Message-Id: <200303172309.41986.alt@anker.ru> Content-Type: Multipart/Mixed; boundary="Boundary-00=_B/gd+aSNLMC0kFb" Sender: community-admin@altlinux.ru Errors-To: community-admin@altlinux.ru X-BeenThere: community@altlinux.ru X-Mailman-Version: 2.0.9 Precedence: bulk Reply-To: community@altlinux.ru X-Reply-To: alt@anker.ru List-Unsubscribe: , List-Id: List-Post: List-Help: List-Subscribe: , List-Archive: Archived-At: List-Archive: List-Post: --Boundary-00=_B/gd+aSNLMC0kFb Content-Type: text/plain; charset="koi8-r" Content-Transfer-Encoding: 8bit Content-Disposition: inline 15 Март 2003 19:53, Anton Vorovatov написал: Привет Антон! У меня правда А40! Но думаю разници нет. Работает все на ура - при подключении камеры выводится окошечко с предложением запустить digicam. ХР - отдыхает. В аттаче файлик который устанавливает пермишены исходя из содержимого /var/lock/console.lock - это файл из доки по gphoto2 вроде, я его только чуток модифицировал. Лежит он в /etc/hotplug/usb, на него сделал символьную ссылку usbcam (было несколько вариантов), а вызов usbcam осуществляется согласно содержимого usb.usermap - описалово как его создать есть в доке на gphoto2 (вроде ;) Второй скриптик выводит окошечко с предложением забрать фото... Удачи! > Привет > Попробовал настроить камеру Canon Powershot S45 под мастером. > Gphoto2 --auto-detect вываливается в SegFault. strace gphoto2 > --auto-detect показывает, что программа не может получить доступа к > usb. В документации к ней говорится, что для выставления правильных > пермишнов на usb должны > использоваться скрипты из пакета хотплаг. Как я понял, отдельные > скрипты usbcam.console, usbcam.user и usbcam.group в поставке > Альта заменены одним - usb.agent? Тогда поясните, плз, как выставлять > права? Спасибо. > Антон > _______________________________________________ > Community mailing list > Community@altlinux.ru > http://www.altlinux.ru/mailman/listinfo/community -- rgrds Maxim alt@anker.ru --Boundary-00=_B/gd+aSNLMC0kFb Content-Type: application/x-shellscript; name="usbcam.console" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="usbcam.console" #!/bin/bash # $Id: usbcam.console,v 1.3 2002/05/25 19:38:02 hun Exp $ # # /etc/hotplug/usb/usbcam # # Sets up newly plugged in USB camera so that the user who owns # the console according to pam_console can access it from user space # # 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 gphoto2 by running "gphoto2 --print-usb-usermap". # b) a setup using pam_console creates the respective lock files # containing the name of the respective user. You can check for that # by executing "echo `cat /var/{run,lock}/console.lock`" and # verifying the appropriate user is mentioned somewhere there. # c) a Linux kernel supporting hotplug and usbdevfs # d) the hotplug package (http://linux-hotplug.sourceforge.net/) # # In the usermap file, the first field "usb module" should be named # "usbcam" like this script. # if [ "${ACTION}" = "add" ] && [ -f "${DEVICE}" ] then # New code, using lock files instead of copying /dev/console permissions # This also works with non-gdm logins (e.g. on a virtual terminal) # Idea and code from Nalin Dahyabhai if [ -f /var/run/console.lock ] then CONSOLEOWNER=`cat /var/run/console.lock` elif [ -f /var/lock/console.lock ] then CONSOLEOWNER=`cat /var/lock/console.lock` else CONSOLEOWNER= fi if [ -n "$CONSOLEOWNER" ] then chmod 0000 "${DEVICE}" chown "$CONSOLEOWNER" "${DEVICE}" chmod 0600 "${DEVICE}" su -l "$CONSOLEOWNER" -s /bin/sh -c "/etc/hotplug/usb/powershot_a40 &" fi fi --Boundary-00=_B/gd+aSNLMC0kFb Content-Type: application/x-shellscript; name="powershot_a40" Content-Transfer-Encoding: 8bit Content-Disposition: attachment; filename="powershot_a40" #!/bin/sh # export DISPLAY=:0 xmessage -center -buttons "Получить фото":100,Отмена:101 -file - <