Feb

04

How to integrate a CUPS/IPP printer in Windows

Posted by : Florian Löffler | On : 04.02.2007


CUPS glowingEveryone who has his printer connected to his Linux server and wants to use this printer in Windows needs Samba, right? – Wrong!

It’s much more comfortable to talk to the printer via the IP-Protocoll (IPP – Internet Printing Protocoll not to be confused with IP – Internet Protocoll ;)
Releasing the printer via SAMBA is even more complicated and does provide less features than the modern IPP. E.g. that’s why for quite some time I had the problem that in the Windows printing queue it said “Access denied!” instead showing me information on my queued print jobs. So I started looking for a solution to that problem and found IPP to make it work.
Because CUPS has IPP suppurt integerated and activated by standard I will focus on setting up the IPP printer in Windows. That was also the most difficult part for me ;)

Prerequisits
Some things before we get startet:

  • This solution needs _no_ SAMBA to use the Linux printer within Windows.
  • As far as I know IPP is supported natively by Windows 2000 or later. For earlier versions like Windows 98 or something there might be some software you can install to make your Windows speak IPP. But I don’t know about that for sure. Comments appreciated ;)
  • CUPS makes all printers available via IPP by standard but you might have to allow access for the Windows clients in /etc/cups/cupsd.conf manually (another article about that will be linked here later)

Printer setup in Windows

Step 1:

Select under Start->Settings->Printers and Fax the option “add new printer” on the left.

Netzwerkdrucker auswählen, irgendwie logisch ;)

Step 2:

After the add-new-printer-guide has opened select “add network printer” and click “next”.

Hier das Wichtige!

Step 3:

It’s getting a bit more interesting here ;)
First select the option “Connect to printer on the Internet” and then type into the field “URL” exactly the address of the printer according to the following scheme:
http://{IP_of_the_CUPS_server}:631/printers/{printer_name}

In my case it looks like this:
http://192.168.0.1:631/printers/hp

Wenn alles geklappt hat, sollte das am Ende so aussehen.

Last step:

If finally everything went well it should look like on the screenshot here.
The printer should display correct status information and all waiting print jobs in the queue. Although is the interface limited to reading out this information. Sending of commands like aborting a print job or starting/stopping the printer do not work out of the box. This is due to some restrictions in this early CUPS version (SuSE 9.0).

Annotations
Unfortunately communication between Windows clients and the CUPS Server of SuSE 9.0 does not work flawlessly. One problem is that various authentication and user management issues prevent CUPS from receiving and/or executing control commands from the Windows client like the abortion of an enqueued print job.

Another problem has appeared with my USB printer. When I switched off my USB printer, CUPS updated it’s status to “deactivated” which effectively prevents all print jobs in the queue from ever beeing printed since CUPS does not reactivate the printer when I switch the power on again :()

These and other problems will be subject of some future articles about CUPS and it’s configuration.

Edit: I solved the problem with CUPS deactivating the printing queue on printer shut off by writing a script for activating/deactivating the queue automatically according to the printer power state.

Comments (7)

  1. Anonymous said on 2007-06-17

    Dankö :)

  2. srk said on 2007-09-05

    Das Problem mit dem automatischen deakitivieren der Druckerwarteschlange kann auch über den Parameter “ErrorPolicy” (s. CUPS Doku) in der printers.conf mit dem Eintrag
    ErrorPolicy retry-job
    geregelt werden.

  3. Wakeboard Urlauber said on 2010-06-06

    5 years i used windows, than i changed to mac.. i love it!!

  4. Anonymous said on 2010-08-18

    Hallo Florian,

    super, vielen Dank für den Tip. An dem Thema doktere ich schon eine Weile herum, mit Deiner Anleitung hat das sofort geklappt.

  5. Tim said on 2011-08-26

    Drucken von Windows zu CUPS auf die beschriebene Weise hat den Nachteil, dass das nicht global für jeden User eingerichtet ist. Für einen Admin in einem Unternehmen ist das keine befriedigende Lösung. Wir machen das etwas anders:

    1. Windows-Komponenten LPR und LPD nachinstallieren (Systemsteuerung -> Software -> Komponenten hinzufügen/entfernen -> Weitere Datei- und Druckdienste)

    2. Druckertreiber installieren, dabei LPR-Protokoll auswählen:

    Server: Servername oder IP
    Port: Name der Druckwarteschlange

    3. Ggf. in den Eigenschaften des Druckers auf der Registerkarte “Anschlüsse” den bidirektionalen Druckmodus deaktivieren.

    4. Falls gewünscht Druckerberechtigungen anpassen über Register “Sicherheit”.

    5. Drucken und glücklich sein. :-)

  6. Stam said on 2011-10-24

    Ich habe ein SUSE-Linux 11.0 PC mit CUPS Drucker. Die CUPS Name ist

    sc65_66s

    Der Drucker ist eingeschaltet und verbunden mit dem SUSE-Linux PC. Betriebsbereit!

    Die IP Adresse des PC ist

    192.168.0.189

    Wenn ich genau diese Procedur folge von einem Windows XP PC mit

    http://192.168.0.189:631/printers/sc65_66s

    kriege ich die Fehlermeldung

    “Druckerverbindung kann nicht hergestellt werden. Entweder der eingegebene Druckername ist ungültig, oder der angegebene Drucker ist nicht mit dem Server verbunden.”

    Der eingegebene Druckername ist aber richtig und der Drucker ist mit dem Server verbunden!

    Ist LINUX CUPS und Windows XP doch nicht kompatibel?

  7. Mats Rosengren said on 2011-10-25

    Korrektur E-mail vorige Antwort!

Leave a Reply

Your email address will not be published.