Installing a network printer with CUPS

Leave a comment

Successfully tested on Ubuntu Server 10.04 LTS 64-bit

Having a network-capable printer greatly ease its installation and everyday use. It can be remotely managed or shared on the local network without having to setup (and keep turned on) a computer as a printer server for instance. It can also be located wherever you wish (especially if you use wireless or PLC networking technologies to connect the printer to the network) and, best of all, it’s very easy to install on Ubuntu Server Edition.

First thing to do is to install CUPS which handles printing on Ubuntu:

apt-get install cups

Next, we need to modify its configuration file /etc/cups/cupsd.conf.
Instruct the CUPS server to listen on the LAN interface only (reference to the loopback address can be commented out):

#Listen localhost:631

Set the authentication and permissions parameters in all the ‹Location› sections to limit access to sudoers only:

AuthType Default
Require user @admin
Order allow,deny
Allow @LOCAL

The following option can also be modified if you don’t want CUPS to share (publish) the printer:

DefaultShared no

Save the changes and restart CUPS:

service cups restart

Now, you can continue the installation using the web interface available at https://cups_server_hostname:631/admin. Just click on the “Add printer” button and follow the instructions. CUPS should automatically find your printer on the network. When asked to enter the printer’s make and model, best would be to provide a PPD file (driver) instead. You can often find this file by extracting the official Windows driver (at least that’s what I’ve done for my Dell 1700n printer).

Once all steps are completed, print a test page:

lpstat -p -d

If everything went fine, you should soon hear the printer coming to life.

That’s all Folks!

For further reading, see CUPS website.

Sharing a scanner over the network with Linux

Leave a comment

Successfully tested on Ubuntu Server 10.04 LTS 64-bit

A scanner installed on the server and only accessible locally through the command-line is not very user-friendly. Sharing it over the network to use it from Linux with GUI, Windows or Mac OS X clients would be a great step forward. That’s what we’ll do today.

First, make sure sane-utils is installed by issuing:

apt-show-versions -a sane-utils

If not, install it with the apt-get install command.

Then, configure saned, the daemon used to allow remote clients to access the scanner over the network. Modify /etc/default/saned to enable it:


Edit /etc/sane.d/saned.conf and add the following line to restrict access to local subnet hosts only (adapt to your own network configuration):

Restart the daemon

service saned restart

and make sure it will start automatically at boot up:

update-rc.d saned defaults

Now you should be able to remotely access the scanner on the local network using, for example, SaneTwain on a Windows client. Download and install it following the instructions on the website and you’ll quickly hear the carriage moving and see your first preview image on the screen.

That’s all Folks!

For further reading, see XSane website. It’s an open source graphical scanning frontend which can be installed on multiple platforms and perfectly works with saned.

Installing a scanner on Ubuntu Server Edition


Successfully tested on Ubuntu Server 10.04 LTS 64-bit

Today’s mission is to install a scanner (EPSON Perfection V200 Photo) which will be used locally on the server. As you’ll see, it’s pretty easy.

Download the driver and other packages specific to the EPSON Perfection V200 Photo scanner at EPSON Support website:


Install them:

dpkg -i iscan*.deb

In case of dependencies errors during the installation, correct them using the following command:

apt-get -f install

Verify the presence of the /etc/sane.d/dll.d/iscan file which should contain a single line:


epkowa is the name of the backend used by SANE to control the scanner. If the iscan file is not there, edit /etc/sane.d/dll.conf and add or uncomment the following line:


Now set access permissions to the device by creating a new file /etc/udev/rules.d/40-saned.rules with a udev rule which will automatically assign the scanner to the saned group

# Epson Perfection V200 Photo
ATTRS{idVendor}=="04b8", ATTRS{idProduct}=="012e",GROUP="saned"

(ATTRS values can be found using the lsusb command)

and reload the ACL:

udevadm trigger

Each local user will have to be added to the saned group before he can access the scanner:

usermod -aG saned username

One last modification can also be done to /etc/sane.d/epkowa.conf but it seems not to be mandatory:


OK, we’re almost done! Let see if we can access the scanner:


should return something similar to:

found USB scanner (vendor=0x04b8 [EPSON], product=0x012e [EPSON Scanner]) 
at libusb:002:003

Great! Now we can install a command-line frontend named scanimage which is included in the sane-utils package

apt-get install sane-utils

and try if it sees the scanner:

scanimage -L

If everything went fine, the answer should look like:

device `epkowa:interpreter:002:003' is a Epson Perfection V200 flatbed sca

To scan for real, place a document in the scanner and type:

scanimage --format=tiff > test.tif

The scan is made using all the default parameters of the device and placed in the current directory.

That’s all Folks!

For further reading, see the SANE project website.

Newer Entries