Printing to a CUPS server from Linux, OS X and Windows

Introduction
I have 5 computers all behind a NAT enabled router and one server with a Canon PIXMA IP3000 attached. I think it is a great printers since it can print duplex and compatible ink cartridges can be bought for about 4$ (25 DKK). The server is running Debian Etch 4.0r0 and a CUPS (Common UNIX Printing System) server which all the five computers uses to print. This way I can print from Macintosh OS X, Windows XP and Linux with out any hassle.

Creating the CUPS server
My server is actually an old laptop which I have installed Debian Linux on. The installation is beyond the scope of this article but I can recommend the article The Perfect Setup – Debian Etch (Debian 4.0) (howtoforge.com).

The first thing to do is installing the cups server:

root@nobel:~# aptitude install cupsys-driver-gimpprint cupsys-driver-gutenprint cupsys

CUPS
CUPS running on my server with the printer installed with to different drivers. One for duplex and one for simplex.

The next thing is to make sure that other computers on the local area network is allowed to print to the server. The syntax of the config file is straight forward and the main thing to notice is Allow @LOCAL in all the sections and BrowseAllow @LOCAL:

root@nobel:~# cat /etc/cups/cupsd.conf
# Show general information in error_log.
LogLevel info
SystemGroup lpadmin
# Allow remote access
Port 631
Listen /var/run/cups/cups.sock
# Enable printer sharing and shared printers.
Browsing On
BrowseOrder allow,deny
BrowseAllow @LOCAL
BrowseAddress @LOCAL
DefaultAuthType Basic
<Location />
  # Allow shared printing and remote administration...
  Order allow,deny
  Allow @LOCAL
</Location>
<Location /admin>
  Encryption Required
  # Allow remote administration...
  Order allow,deny
  Allow @LOCAL
.....

The next thing to is installing some comercial drivers since Canon hasn’t released drivers so I can use the duplex option. So I download the drivers from http://www.turboprint.info/ and installed the debian package:

root@nobel:~# wget http://www.turboprint.info/turboprint_1.95-2_i386.deb
root@nobel:~# dpkg -i turboprint_1.95-2_i386.deb
root@nobel:~# /etc/init.d/cupsys restart

Now I can use the turboprints setup tool to add the new printer which I call ip3000duplex. The config for this new printer can be changed with the tool tpconfig. The most important change is to set the quality to draft – if not there will be a turborpint logo on every page. I use this driver to provide duplex printing of articles I read and later throw out, so quality is not important.

root@nobel:~# tpsetup
root@nobel:~# tpconfig

From the information found on http://www.linuxprinting.org/ I know that my Pixma IP3000 printer can use the driver for BJC-7100 but not with duplexing so I will use this driver to provide good quality simplex printing. My server has the IP address 192.168.1.153 and to access the configuration of CUPS I start a browser and look at the page

http://192.168.1.153:631/printers/

Printing from Linux
I created a new file called /etc/cups/client.conf as root and inside i wrote:

ServerName 192.168.1.153

and then restarted the local cups server:

root@dirac:~$/etc/init.d/cupsys restart

Printing from Apples OS X
OS X is nice from my perspective since it much closer to Linux and easier to manage. OS X even comes with CUPS installed, so instead of using the build in graphical tools, which is somewhat limited since it can add raw printers, I can add the printers through the Macintosh own CUPS server. The graphical tool is actually just a fronted to the cups server. This is done by pointing a browser to the address http://127.0.0.1:631. 127.0.0.1 is always the IP address of the local machine and 631 is port number of the cups server.

Under printers I chose “Add printer” and fill a name that identifies the printer in this case “ip3000simplex”. In the next window I chose IPP (Internet Printing Protocol) and fill in the url of my printer

 http://192.168.1.153:631/printers/ip3000simplex

The next step is to define a driver and here the right choice is “RAW”.

Printing from Windows XP
This turned out to be much easier than I expected. In the Control Center under “Printers and Faxes” I clicked “Add Printer” and chose a network printer. Then I was able to type in the URL of my CUPS printer:

 http://192.168.1.153:631/printers/ip3000simplex

CUPS

The driver I chose was Generic and the MS “Publisher Imagesetter”.

Only registered users can comment.

  1. Thanks for sharing, I was looking for something that would allow me to print from mac osx to my cups server. If you want to get funky, you can also configure samba on your cups server and get it to push out the drivers that are needed for windows clients (not sure if it works for osx)

  2. I like the booklet printing feature of my IP4000R… Is this supported by this CUPS setup?

  3. It worked very good!, now my problem is that i can not print from some applications on the mac. Can you give me some hints if you know?

    Sorry for my bad english…

  4. Allan Ploug: I guess that would depend on the driver used on CUPS server. If the drivers support the feature you just make a “new printer” on the cups server with those settings and then it should work. I am not sure if the feature is present though.

    ic: My experience with mac is limited, but I would guess the problem would be that the those applications had problems with Mac’s local cups server. If you find out why – then please post, so I will know. šŸ˜€

  5. I finally find the solution… i have to add my server in my mac, the problem was that my mac was looking for a machine named presario, i add it inside the “netinfo manager” and everything works very good. The server and my mac speak the same language: unix+cups.

    Now i can print remotely to a laptop-debian-server in a PSC1215.

    It was pretty easy to get it work if you know what r u doing, in general:

    1. Configure printer
    2. Allow mac ip in cupsd.conf
    3. Add printer locally in mac: localhost:631 with http socket

    and that’s it.

Leave a Reply