diff --git a/README.linux b/README.linux index 5cc6e202..49db5df0 100644 --- a/README.linux +++ b/README.linux @@ -5,11 +5,19 @@ With Linux 2.4.* you could either use the kernel scanner module or libusb to access USB scanners. In Linux 2.6.4 the kernel scanner module was removed. Therefore with this and later kernels libusb must be used. +Permissions: +------------ While SANE automatically uses libusb when the library and its header file were present during the build of sane-backends, setting permissions will require some attention. So if scanimage -L lists your scanner as root but not as normal user read on this text. +Most distributions support setting permissions without much manual +configuration. Usually you must just add the users that are allowed to access +the scanner to group "scanner". To make that change active, the user must login +again. For more details, see your distribution's documentation e.g. for Debian: +README.debian.gz. If this doesn't work you you want to know more, read on. + The device files used by libusb are located in /proc/bus/usb/ (e.g. /proc/bus/usb/001/003) or in /dev/bus/usb/ (e.g. /dev/bus/usb/001/003), if you use udev. The exact file name can be found out by running sane-find-scanner @@ -18,18 +26,22 @@ e.g. "chmod a+rw /proc/bus/usb/001/003" works, this change is not permanent. The permissions will be reset when the scanner is replugged or Linux is rebooted. -One solution to set permissions on-the-fly are the Linux hot-plug tools that -should come with any current distribution. Your distribution should have set up -the scripts to automatically change permissions correctly. Look for -"libsane.usermap" and "libusbscanner" in /etc/hotplug/usb. Usually you must just -add the users that are allowed to access the scanner to group "scanner". To make -that change active, the user must login again. For more details, see your -distribution's documentation e.g. for Debian: README.debian.gz. +One solution to set permissions on-the-fly is Linux udev which comes with +current distributions. SANE comes with a udev rules file in the tools/udev +directory which may be used by distributions or can be copied to +/etc/udev/rules.d manually. The file format is explained on top of the file +itself. Either you need libusb 0.1.12 or newer or USB_DEVFS_PATH=/dev/bus/usb +must be exported as a system-wide environment variable. +Older distributions may use the Linux hot-plug tools (or hotplug-ng). Your +distribution should have set up the scripts to automatically change permissions +correctly. Look for "libsane.usermap" and "libusbscanner" in /etc/hotplug/usb. If you build SANE from source you can use the hotplug script that comes with SANE. See the tools/hotplug/ directory in the source distribution. Please refer to the README in that directory for the details. +Gentoo information: +------------------- Gentoo users: If your USB scanner is not detected at all check that USE=usb is set when emerging.