Tag/tag.png

Needs Expansion
This article is incomplete, and needs to be expanded. More info...

NOTE: this page mostly refers to older versions of sane. Also see the sane page for the version of sane that ships with Ubuntu 10.10 and above

Setting up a scanner in Ubuntu is normally straightforward. Here are some tips if you do get stuck.

How can I find out if my scanner works with Ubuntu?

  1. Simply plug it in and try! If it is a newer model USB scanner, it is likely that it will work immediately without any further driver or software installations.
  2. Hardware Support Component Scanners - check which scanners are supported in your specific Ubuntu release.

  3. SANE project listing of supported scanners - The SANE (Scanner Access Now Easy) project provides most of the backends to the scanning software on Ubuntu.

Using your scanner

  1. Turn on your scanner and place a document or photo face down on the scanner.
  2. Go to Applications --> Graphics --> XSane Image Scanner or SimpleScan. Adjust some settings if required.

  3. Press Scan. Alternatively you can also press the "Scan" button on the scanner to open the scanning dialog.

  4. Once the scanning process is finished a thumbnail image is displayed. Save your file.

  5. If you want to create a multi-page file exchange the documents on the scanner and repeat the scanning process until all pages are scanned. Don't forget to Save when you are finished!

"No device available" - what to do?

There could be several reasons why you might get this message:

  1. This might be a permissions problem. Try to run the scanning software as root.
  2. Your scanner is not supported in Ubuntu. The most common type of unsupported scanners are old parallel port or Lexmark All-in-One printer/scanner/faxes.
  3. The required driver for your scanner has not been autoloaded
  4. You need to install the appropriate firmware (probably a *.fw or *.usb) for your particular scanner. Try to find the firmware file on the documentation provided with your scanner or search online. Once you got the right firmware file copy it into /usr/share/sane/. Tip: In my case I got the firmware file from the CD that came with the scanner. If the CD only supports Windows, try installing the CD with WINE- don't use the program instead search for the firmware file and coy this file "ccd548.fw" into /usr/share/sane/gt68xx/.

  5. For a Mustek 1200 UB Plus scanner you will need this file sbfw.usb. Rename it to "PS1fw.usb" and then put it in the directory "/usr/share/sane/gt68xx" (remember to give read permission to all users).

  6. Your scanner is parallel port and you are not a member of the scanner group. The device /dev/parport0 (or whichever parallel port your scanner is connected to) by default is only readable and writable by user lp and group scanner. You can become member of group scanner: go to Administrations --> Users and Groups --> Account Properties --> User Privileges.

Install a scanner manually

The SANE project does not always provide complete drivers for all scanners. These drivers can still be used, but not all features may work. Here is a list of scanners with incomplete drivers:

  • HP 4200, HP 3300C, HP 4300C, Agfa Snapscan Touch, HP 4400C, HP 4470C
  1. Make sure the Universe repository is enabled. The easiest way to do this is probably through Synaptic.

  2. Search Synaptic for "libsane-extras" or alternatively type the following command in the terminal:

sudo apt-get install libsane-extras
  1. Now you need to edit .conf file in /etc/sane.d/dll.conf. To enable the right driver for your scanner look for the following lines:

# The following backends are not part of the SANE distribution
# but are provided by the libsane-extras Debian package
  • Below are several commented lines. Uncomment (delete the #) the correct one for your scanner, e.g.:

    HP 4200 - uncomment the hp4200 line.

    HP 3300C, HP 3400C, HP 4300C, Afga Snapscan Touch - uncomment the niash line.

    HP 4400C, HP 4470C - uncomment the hp_rts88xx line.

  1. Save changes to .conf file.
  2. Fire up Sane and scan away.

Note: the way Linux' hotplugging stuff works, you may need to plug in the scanner after the computer has booted..

Specific Scanner Models

Some specific models have been documented here:

Permission Issues

Add saned to the group which owns your scanner device:

sudo adduser saned scanner

Note: I used sane-find-scanner to determine the device and ls -al /dev/bus/usb/XXX/XXX to identify the group. Since I have MFC printer/scanner/fax the device happened to be owned by group 'lp' so I added saned to that group (instead of scanner) to allow it access to the scanner.

ACL permissions for saned

Because of a change is the way access permissions are now applied to devices, saned may still not be able to access the scanner when it is launched by inetd or xinetd. This can happen even though other regular users on the server have access. The following bug-report contains a solution to this problem :

Sharing a Scanner Over a Network

Note: The following documentation was written mostly for Ubuntu 10.10 and earlier. For Ubuntu 11.10 and higher, please see the sane.d tutorial.

There are two common configurations for using a scanner over a network:

  1. The scanner is connected a computer - the server - and shared over the network.

  2. The scanner is connected directly to the network.

Server-side setup

In this configuration, one computer has a scanner connected by USB or parallel port and shares it with others on the network. The computer with the scanner connected is called the server and all other computers on the network wishing to share the scanner are called clients.

Note: Make sure your scanner is installed and working properly on the server computer (i.e. the computer to which the scanner is physically attached).Test first on that local machine before attempting to share the scanner over the network.

All computers need to have Sane installed:

sudo apt-get install sane

As saned does not automatically detect a scanner that is shared by a remote computer you will need to set it up with both, the server and the client.

  1. Tell it to run sane as a server (daemon, service)
  2. Set the subnet where to share the scanner.
  3. On distributions older that 10.10, set inet (or xinet) to listen on the appropriate port (This is optional, saned can be setup to be running continuously)
  4. Make sane run at start up

Sane as a server

Set sane to run as a server, ie expect connections Edit /etc/default/saned to read:

# Set to yes to start saned                                                     
RUN=yes

You must be root to edit this file (hint, use sudo)

Share with

Set the subnet that will be able to see the scanner Edit /etc/sane.d/saned.conf to share the printer on your subnet:

192.168.1.0/24

Make sure it is in your range of IPs. It hit me badly when I mis-configured it for 192.168.0.0 when I meant 192.168.1.0 !

The /24 means to share with everybody in xxx.xxx.xxx.0 to 255.

User setup

In some cases, correct permissions needs to be set. E.g. for HP DesignJet 2050 All-in-one device, the saned user has to be inserted into lp group. To do that by typing

sudo adduser saned lp

To verify the saned user has the correct permissions to access the scaner device, run the following commands:

sudo -s
su -s /bin/bash saned
scanimage -L

As a result, you should see a device identified, e.g.

device `hpaio:/usb/Deskjet_3050_J610_series?serial=CN0CQ3B1DH05HX' is a Hewlett-Packard Deskjet_3050_J610_series all-in-one

Set (x)inetd

Only needed for 10.04 and previous distributions. You don't need this step if running 10.10, jump to step four.

Edit /etc/inetd.conf by adding the following line:

sane-port stream tcp nowait saned.saned /usr/sbin/saned saned

Note: that an inetd server need not be installed.

Or, if you are using xinetd, create a file called /etc/xinetd.d/saned and enter the following in the file:

service saned 
{
socket_type = stream
server = /usr/sbin/saned
protocol = tcp
user = saned
group = scanner
wait = no
disable = no
}

Note: The saned value (last word on the inet configuration or in the user line in the xinetd configuration) is the name of the user running the server. You can get it form the RUN_AS_USER= line on the /etc/default/saned file

restart inetd or xinetd by

sudo /etc/init.d/(x)inetd restart

Run at start-up

Restart saned by (10.10)

sudo service saned restart

or (10.04 and previous)

sudo /etc/init.d/saned restart

One user writes that a reboot is necessary. Not my experience (with 10.10) but YMMV.

To configure the Sane daemon to start automatically at boot up run:

sudo update-rc.d saned defaults

Client-side Setup

From the client, all you need to do is add server name or IP address of the scanner server to /etc/sane.d/net.conf:

192.168.1.100

Now run xsane and it should pick up the new network scanner.

LAN-based scanners

The scanner is connected directly to the network without any intermediary computer.

HP All-in-One devices

  1. Ensure the device is connected to the network and can be pinged.
  2. Ensure hplip is installed:

    $ sudo apt-get install hplip
  3. Run the hp-setup wizard which installs printer, scanner, and any other features.

    $ sudo hp-setup
    1. For Connection Type choose "Network/Ethernet..."
    2. If the device is not detected, click "Show advanced options", tick "Manual discovery" and supply the scanner's IP address.
  4. Check the scanner is now recognized:

    $ scanimage -L

For more details, see HpAllInOne.

Brother All-in-One

See this page for the brscan utility and instructions.

Help Ubuntu to support more scanners

There are several ways you can help Ubuntu to support more and more scanners over time.

  • Support the SANE Project! This project provides most of the scanning backend information for Ubuntu.

  • When purchasing a new scanner, always ask if it works in Linux
  • Contact the manufacturer about supporting your scanner under Linux. Make sure you tell them about the SANE project!

ScanningHowTo (last edited 2018-04-11 04:55:33 by cpe-70-119-72-231)