Set Up gPhoto2 for Non-Root Users

A small problem I’ve had with Slackware is getting gPhoto2 and related tools such as gtkam to work when logged in as anything but root. If I logged in as a normal user, gtkam would open but would not be able to open my camera, despite accurately identifying the camera. I tried su, but gtkam wouldn’t run and I didn’t have much better luck with other tools. I thought it was a permissions problem, but that’s only half the story.

gPhoto, it turns out, relies on the USB Hotplug system to configure the device permissions properly for allowed users. Slackware has Hotplug installed, but it’s only configured for scanners. Fortunately gPhoto’s doc section already has a page to help us through the process:

http://gphoto.org/doc/manual/permissions-usb.html

There are two minor adjustments I had to account for on Slackware:

1) /usr/lib/libgphoto2/print-usb-usermap is actually /usr/local/lib/libgphoto2/print-usb-usermap

2) The usbcam.* scripts can be found in /usr/local/share/doc/libgphoto2/linux-hotplug/

I selected the usbcam.group script and simply set the group to users. I’m the only person who uses the laptop at the moment, but I may add the wife before long and using the users group was just faster than creating a new one. Once I finished the instructions, gtkam worked like a champ.

During some of my searches to track the problem, I found there are a few other distributions which may have the same problem. The key above, you’ll notice, is Slackware stashed the “extra” software like gPhoto2 in the /usr/local/share tree rather than just /usr. If you don’t find the listed directories at first, give /usr/local/share a shot.

Article Written by