USB scanner and udev

Thursday, November 8th, 2007 by Marcin Juszkiewicz

USB scanners are quite popular today, many ‘all-in-one’ devices contains them. But if you use distribution where permissions are done ‘per group’ like it is in Debian you can get hit by lack of access to your scanner.

Solution is: write own udev rule. It may sounds scary but in reality it is quite simple.

  • Run udevmonitor (it needs root access so sudo udevmonitor).
  • Unplug and plug scanner. You will get lot of output from udev monitor — only one line is needed:
    UDEV  [1194523774.343853] add      /devices/pci0000:00/0000:00:13.0/usb1/1-1/usb_endpoint/usbdev1.7_ep00 (usb_endpoint)
    
  • Now it is time to gather more information about our device. Run udevinfo -a -p LINE_FROM_PREVIOUS_POINT and look at output. For my Epson Stylus DX4000 it shows:
    [....]
    looking at parent device '/devices/pci0000:00/0000:00:13.0/usb1/1-1':
    [....]
    SUBSYSTEMS=="usb"
    [....]
    ATTRS{manufacturer}=="EPSON"
    ATTRS{product}=="USB MFP"
    [....]
    
  • Edit (as root) one of files in /etc/udev/rules.d/ directory (best way is creating own one — scanner.rules for example) and add there something like that (of course set “manufacturer” and “product” to value shown in previous step)
    SUBSYSTEMS=="usb", ATTRS{manufacturer}=="EPSON", ATTRS{product}=="USB MFP", GROUP="scanner"
    
  • Add youself into “scanner” group: sudo addgroup YOURACCOUNTNAME scanner.
  • Unplug and plug scanner — now it should be in proper group.
  • Logout and login so system will notice that you are now also in “scanner” group.
  • Launch your favourite scanning utility — I use Kooka from KDE.

As you see whole procedure can be done in few minutes without problems.



Epson Stylus DX4000

Sunday, November 26th, 2006 by Marcin Juszkiewicz

Today I installed my brand new printer^Wmultifunction device: Epson Stylus DX4000. Epson Stylus DX4000 This is my second printer — few years ago I had Epson Stylus 200 by few weeks.

Device is nicely supported under Linux — printing via CUPS works without problems and there are lot of config parameters if someone want to tweak. Scanner works with SANE — I only had to add one line to /etc/sane.d/epson.conf to get it recognized:

usb 0x04b8 0x082f

To get it working under Debian following stuff needs to be installed:

  • cupsys-driver-gutenprint (driver for printer)
  • quiteinsane or kooka (scanning application)
  • escputil (utility to printer managment)

Thanks goes to LinuxPrinting team for their website — especially for article about suggested printers.