Chapter 4. Setting up your system for use with libgphoto2 and gphoto2

Table of Contents

4.1. System Overview
4.2. Setting up permissions for serial (RS232) ports
4.2.1. A few examples
4.3. Setting up permissions for USB ports
4.3.1. USB ports on Linux
4.3.2. USB ports on Linux using HAL
4.3.3. USB ports on Linux using udev
4.3.4. USB ports on Linux using linux-hotplug
4.3.5. USB ports on Linux (obsoleted by udev, dirty world-writable hack)
4.3.6. USB ports on Linux (OLD)
4.3.7. Setting up linux-hotplug (OLD)
4.3.8. USB ports on FreeBSD
4.3.9. USB ports on other systems (non-FreeBSD BSDs, MacOS X, OS/2)
4.4. Specifying the port and camera you use
4.4.1. Port names
4.4.2. Camera name

Abstract

This chapter aims to help you set up your system such that you can use libgphoto2 with any frontend. However, we will have some examples using the gphoto2(1) command line frontend, as this is the frontend which is always provided.

4.1. System Overview

gPhoto2 consists of two libraries libgphoto2 ( see libgphoto2(3)), and libgphoto2_port (see libgphoto2_port(3)), which is used by the former, and a command line frontend (gphoto2, see gphoto2(1)). Other (GUI) frontends (like e.g. gtkam) are available as separate packages.

In order to get access to the camera, your frontend process requires write permissions to the respective device special file, e.g. to /dev/ttyS3 or /proc/bus/usb/1/012.

For security reasons, we strongly recommend not to run any libgphoto2(3) frontend as root. So you have to set up the permissions of your camera device accordingly. This is described in the following two sections, Section 4.2, “Setting up permissions for serial (RS232) ports” and Section 4.3, “Setting up permissions for USB ports”.

Then you can run your frontend. For the command line libgphoto2(3) frontend gphoto2(1), this is described in the gphoto2(1) man page.