HOWTOs :: Printers
Last modified on Saturday April 8 2006 @ 17:18:06
This page contents an in-depth explanation of how to set up certain printers in Linux.
Hope it helps! If you have any questions or requests, don't hesitate in contacting me on gustavo at zaeratech dot com.
The first thing when we're about to install a printer in Linux, is to make sure that the CUPS
framework is in place and running.
CUPS server installation
In order to get CUPS running on your local machine, do the following steps.
In Gentoo Linux, install CUPS as root by typing:
emerge cups
In debian Linux, install CUPS as root by typing:
apt-get install cupsys
Then, start the service:
(gentoo) /etc/init.d/cupsd start
(debian) /etc/init.d/cupsys start
CUPS printer drivers installation
CUPS should now be up and running, but before we move on to configuring the printer through
CUPS's web-based interface, we need to install some additional printer drivers for CUPS.
(gentoo) emerge hpijs
(debian) apt-get install hpijs
Let's install most of the Linux Printer drivers that exist. In
Debian Linux(*), install the following packages:
(debian) apt-get install foomatic-filters foomatic-filters-ppds cupsomatic-ppd linuxprinting.org-ppds
(*)I don't run Gentoo anymore, but I assume that the names in Emerge are similar to the ones
in Debian's APT.
Preparing the kernel for a USB printer
If your printer is not to be connected to your machine through a USB port, you can skip to
the next section. However, if you have a USB printer, please read on.
The following USB kernel options must be correctly configured:
Device Drivers -> USB Support
<M> Support for USB
--- Miscellaneous USB options
[*] USB device filesystem
...
<M> EHCI HCD (USB 2.0) support
<M> UHCI HCD (most Intel and VIA) support (*)
...
<M> USB Printer support
...
(*)On most non-x86 systems, and on x86 hardware that's not using a USB controller from Intel or VIA, the OHCI module should be
used instead of the UHCI as shown here.
Now, compile the kernel. Refer to
TLDP's Kernel HOWTO for further information
on this topic. After you've compiled your kernel, load the new modules:
modprobe uhci_hcd usblp
If you were able to load the modules successfully (i.e. without any error messages), you can
verify it by typing:
lsmod
and look for the newly loaded modules. Your system is now configured with USB, and you may
continue by inserting your printer cable into your machine. You should see something like the
following text in the output of the 'dmesg' command:
usb 5-1: new high speed USB device using ehci_hcd and address 4
drivers/usb/class/usblp.c: usblp0: USB Bidirectional printer dev 4 if 0 alt 0 proto 2 vid 0x04A9
pid 0x10A2
Ok, the USB port seems to be working correctly! Let's move on to installing the printer
drivers.
Choose printer to install
USB printers
Network printers
Since this printer is a USB device we need to make sure that kernel is properly configured.
Please read the Preparing the kernel for a USB printer section
above.
CUPS packages and drivers
The driver to use for the Canon Pixma IP4200 is the
Canon BJ-600 driver,
but it requires a little hack, as it doesn't come with support for 600x600 dpi out of the box.
Don't worry, I've done this for you, so you can simply download the modified printer driver file
CanonIP4200.ppd and store it under
/usr/share/cups/model/. Make sure the file is world readable by typing the following
command as root:
chmod 644 /usr/share/cups/model/HP-DeskJet_3325-hpijs.ppd
Restart the CUPS system by typing the following command as root:
(gentoo) /etc/init.d/cupsd restart
(debian) /etc/init.d/cupsys restart
Now, open your favourite browser and type in the following url:
http://localhost:631. Click on Printer, and then
add printer. When you get the pop-up box asking you for a login, type in 'root' as the
user, and your root password. The fist screen is not important, so fill in values like this:

The following pictures show you the exact values you need to fill in:





Now, you've installed and configured the printer. NOTE: make sure that the /dev/usblp0
points to the correct usblp device by typing 'ls -l /dev/usblp0'. If the symlink does not
exist, create it by tying:
ln -fs /dev/usb/lp0 /dev/usblp0
Ok, you should be good to go now. Verify by printing a test page.
Since this printer is a USB device we need to make sure that kernel is properly configured.
Please read the Preparing the kernel for a USB printer section
above.
CUPS packages and drivers
Now we need to install the drivers for the HP Deskjet 332x printer in CUPS. Download the
printer driver file HP-DeskJet_3325-hpijs.ppd,
and store it under /usr/share/cups/model/. Make sure the file is world readable by typing
the following command as root:
chmod 644 /usr/share/cups/model/HP-DeskJet_3325-hpijs.ppd
Now, open your favourite browser and type in the following url: http://localhost:631. Now, click on Printer,
and then add printer. When you get the pop-up box asking you for a login, type in 'root' as the user, and your root password. The fist screen is
not important, so fill in values like this:
The following pictures show you the exact values you need to fill in:
Now, you've installed and configured the printer. NOTE: make sure that the /dev/usblp0
points to the correct usblp device by typing 'ls -l /dev/usblp0'. If the symlink does not
exist, create it by tying:
ln -fs /dev/usb/lp0 /dev/usblp0
Ok, you should be good to go now. Verify by printing a test page.
This is a network printer, and no kernel configuration is therefore necessary (well, except
from that you need to be online, but that's outside of the scope of this document). Before we
continue you have to prepare the IP address on your printer. Follow the corresponding sequence
shown here on the printer's menu:
If you have a DHCP server on your network:
- Network Menu → STD Network → Network Card Setup → TCP-IP → Activate DHCP
Static configuration
- Network Menu → STD Network → Network Card Setup → TCP-IP → Define IP Address,
and type an IP address that matches your network configuration (e.g. 192.168.50.50).
- Network Menu → STD Network → Network Card Setup → TCP-IP → Define Netmask,
and type 255.255.255.0.
- Network Menu → STD Network → Network Card Setup → TCP-IP → Define IP Gateway,
and select the default gateway for your network (e.g. 192.168.50.1).
- Network Menu → STD Network → Network Card Setup → TCP-IP → Activate,
and set it to 'yes'.
To get an overview of the printer configuration, select:
- Network Menu → STD Network → Network Card Setup → Print;
This will print out your current configuration. Make sure everything is ok before we continue.
now, from your computer, try to ping the address we configured above (192.168.50.50 if you configured it manually, or read the IP address entry on the
sheet you just printed out to see which IP the DHCP server gave the printer).
You can configure the printer further by typing the IP address in a browser! Pretty sweet! :)
Once the IP address of the printer is set, we can now proceed to the installation of the printer in CUPS.
Configuring the printer in CUPS
First, we need to install the drivers for the Lexmark Optria T610 printer. Download the printer driver file
Lexmark-Optra_T610-Postscript.ppd, and store it under
/usr/share/cups/model/. Make sure the file is world readable by typing the following command as root:
chmod 644 /usr/share/cups/model/Lexmark-Optra_T610-Postscript.ppd
Now, open your favourite browser and type in the following url: http://localhost:631. Now, click on Printer,
and then add printer. When you get the pop-up box asking you for a login, type in 'root' as the user, and your root password.
The fist screen is not of great importance, so fill in values something like this:
Here we need to select the type of printer we're installing:
Replace the IP Address with your printer's IP address.
The following pictures show you the exact values you need to fill in/select:
You've now installed your printer successfully. Click on the "my_network_printer" link to continue.
Now, you've installed and configured the printer, so you should be good to go now. Verify by printing a test page.
This is a network printer, and no kernel configuration is therefore necessary (well, except from that you need to be online, but that's outside of the
scope of this document). Before we continue you have to know the IP address on your printer. Ask your sysadmin or check with your printer's onboard panel if
you're on a DHCP-enabled network.
Download the PPDs for this printer, and put them in CUPS' model directory
(/usr/share/cups/model). Then restart the CUPS system by typing the following command as root:
(gentoo) /etc/init.d/cupsd restart
(debian) /etc/init.d/cupsys restart
Go ahead and configure the printer, just the same way as the Lexmark above.
|