- 1 Introduction
- 2 Step 1: Check if sane supports your scanner
- 3 Step 2: Installation
- 4 Step 3: Configuration
- 5 Step 4: Firmware
- 6 Step 5: Install some frontend(s)
- 7 Troubleshooting
Sane provides a library and a command-line tool to use scanners under GNU/Linux.
Step 1: Check if sane supports your scanner
Step 2: Installation
# pacman -S sane
Step 3: Configuration
# gpasswd -a username scanner
Now you can try to see if sane recognizes your scanner
$ scanimage -L
If that fails, check that your scanner is plugged into the computer. You also might have to unplug/plug your scanner for Template:Filename to recognize your scanner.
for HP hardware
# pacman -S hplip
- Don't forget to enable Template:Codeline in Template:Filename.
- Running Template:Codeline as root may help you add your device.
- Template:Codeline is the 'HPLIP Plugin Download and Install Utility'.
- Template:Codeline is the 'HPLIP Scan Utility'.
Step 4: Firmware
Get the firmware
Extract the file from your scanner install CD
Firmwares usually have the Template:Codeline extension.
But it may also be in:
- a Template:Codeline file; in this case maybe it is just a zip archive, install and run Template:Codeline to find out.
- a Template:Codeline file; install and run Template:Codeline to extract it.
Install the firmware
Firstly you need to put the firmware someplace safe, it is recommended to put it in a subdirectory of Template:Filename.
Then you need to tell sane where the firmware is:
- Find the name of the backend for your scanner from the sane supported devices list.
- Open the file Template:Filename.
- Make sure the firmware entry is uncommented and let the file-path point to where you put the firmware file for your scanner. Be sure that members of the group Template:Codeline can access the Template:Filename file.
If the backend of your scanner is not part of the sane package (such as hpaio.conf which is part of hplip), you need to uncomment the relevant entry in /etc/sane.d/dll.d/hplip.
Step 5: Install some frontend(s)
XSane provides a GTK-based frontend to Sane. It is available in the Template:Codeline repository.
# pacman -S xsane
Other frontends exist, to find them you can:
- use Template:Codeline to search for keywords such as "sane" or "scanner"
- see the list of frontends on the sane-project website
If you get an "Invalid argument" error with xsane or another sane front-end you probably need a firmware. See above for details.
# gpasswd -a username lp
This is reported to work on HP all-in-one models (e.g., PSC 1315 and PSC 2355).
Also you could try to change permission of usb device
First, switch to root and check connected usb devices with command 'lsusb'
#[root@archlinux ~]# lsusb #Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub #Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub #Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub #Bus 003 Device 003: ID 04d9:1603 Holtek Semiconductor, Inc. #Bus 003 Device 002: ID 04fc:0538 Sunplus Technology Co., Ltd #Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub #Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub #Bus 001 Device 006: ID 03f0:2504 Hewlett-Packard #Bus 001 Device 002: ID 046d:0802 Logitech, Inc. Webcam C200 #Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub #[root@archlinux ~]#
In our example we see scanner - 'Bus 001 Device 006: ID 03f0:2504 Hewlett-Packard'
So you can now change dev permissions with command
#chmod 777 /dev/bus/usb/001/006'
Another tip, is that you can add your device (scanner) in backend file:
In example we add string 'usb 0x03f0 0x2504' to file '/etc/sane.d/hp4200.conf'
Now file looks like this:
#[root@archlinux ~]# cat /etc/sane.d/hp4200.conf # # Configuration file for the hp4200 backend # # # HP4200 #usb 0x03f0 0x0105 usb 0x03f0 0x2504 [root@archlinux ~]#
If you get following problem:
arguments to dbus_connection_send() were incorrect, assertion "connection != NULL" failed in file dbus-connection.c
Make sure dbus is actually running:
pgrep -l dbus
If it isn't, start it with:
sudo /etc/rc.d/dbus start
# gpasswd -a dbus lp # gpasswd -a dbus scanner
If you encounter slow startup issue (e.g. xsane or scanimage -L take a lot to find scanner) it may be that more than one driver supporting it is available.
Have a look at /etc/sane.d/dll.conf and try commenting out one (e.g. you may have epson, epson2 and epkowa enabled at the same time, try leaving only epson or epkowa uncommented)