[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#429715: cupsys-client: printing to a remote IPP printer is dang hard



Package: cupsys-client
Version: 1.2.11-3
Severity: important

My friend gave me the IPP URL of his printer.  Not knowing much about
this newfangled protocol, I installed cupsys-client, thinking (based on
the package description) it would be a cinch to access the printer.  It
turned out to be an ordeal.  I'm filing this bug as important even
though nothing is necessarily (?) broken, because basic functionality is
either missing or exceedingly difficult and frustrating to figure out.
If this should be routed upstream, let me know, but I thought it would
be best to start in the Debian BTS.

The URL was of the form

    ipp://192.168.0.10/printers/HPLJ1012

I started by looking in the lp and lpstat man pages, expecting to find a
URL option.  Nothing.  Then I tried to find some documentation on what
to do with the URL, what parts of it to pass to what options of
lp/lpstat.  All I found was the IPP URL RFC, which isn't very accessible
and is not helpful directly.

So I experimented.  I started with the lpstat program.  Passing
192.168.0.10 to the -h option was fairly obvious.  Using the -r option,
I was able to ping the server.  But using, say, -t returned several
repetitions of "lpstat: Forbidden" and nothing else useful.  I figured
maybe I had to query this printer specifically.  The first problem is I
didn't know whether the name of the printer should be
"/printers/HPLJ1012", "HPLJ1012", or something else.  I tried passing
variations to -a, -p, and -v, but I always got "lpstat: Unknown
destination \"HPLJ1012\"!".  So it seemed like the remote server didn't
recognize the printer name.  But when I investigated further by running
the command under strace, I found that the string HPLJ1012 was never
even sent to the server!  In fact, the "Unknown destination" message was
printed after failed attempts to read a file called lpoptions.  Why it
needs to read a local file about a remote printer I have no idea.  I
looked at the lpoptions man page, but I didn't see anything that looked
relevant.

At a loss, I turned my attention to lp, and finally I caught a break.  I
passed HPLJ1012 to the -d option, gave a PDF file on the command line
(although the man page says nothing about what format the file should be
in, so that was a guess), and got a printout.  Looking at the strace of
the run, I found it curious that there were several "POST /" requests
that all got "403 Forbidden" responses, before finally a "POST
/printers/HPLJ1012" (hey--this program does know how to construct the
URL, it just doesn't accept it!) succeeded.  I don't know whether this
represents a misconfiguration of the server, or futility on the part of
the client.  And even after this, I never figured out how to use lpstat
to get job status, etc.

So in the end, I can at least print (though not query), but I still
don't know how I was supposed to figure it out.  If I missed something,
maybe it could be documented more prominently.

Andrew

-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)

Kernel: Linux 2.6.21-1-686 (SMP w/1 CPU core)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages cupsys-client depends on:
ii  adduser                       3.102      Add and remove users and groups
ii  cupsys-common                 1.2.11-3   Common UNIX Printing System(tm) - 
ii  libc6                         2.5-11     GNU C Library: Shared libraries
ii  libcupsys2                    1.2.11-3   Common UNIX Printing System(tm) - 
ii  libgnutls13                   1.6.3-1    the GNU TLS library - runtime libr
ii  zlib1g                        1:1.2.3-15 compression library - runtime

Versions of packages cupsys-client recommends:
ii  cupsys-bsd                    1.2.11-3   Common UNIX Printing System(tm) - 

-- no debconf information




Reply to: