[okular] [Bug 398486] New: Okular cannot print to remote cups server

lp bugzilla_noreply at kde.org
Tue Sep 11 10:53:44 BST 2018


https://bugs.kde.org/show_bug.cgi?id=398486

            Bug ID: 398486
           Summary: Okular cannot print to remote cups server
           Product: okular
           Version: unspecified
          Platform: openSUSE RPMs
                OS: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: NOR
         Component: printing
          Assignee: okular-devel at kde.org
          Reporter: paulatz at gmail.com
  Target Milestone: ---

This bug is caused triggered by sing a remote server via the cups client.conf
file, in my case ~/.cups/client.conf contains this line
  ServerName printers1:631
Using the system-wide client.conf with the same configuration gives the same
error.

The symptoms are:

1. When opening the print dialog, okualr always set the default to "Print to
file" irrespective of what is set via lpoptions. The list of printers is
available via the drop-down menu and contains all the printers, although most
of the printers options are greyed out.


2. When printing, no error is returned on screen, but 
   /usr/bin/lpr: No such file or directory
   is written in the terminal


3. Doing a strace of okular shows that lpr is invoked with wrong arguments:
   17461 execve("/usr/bin/lpr", ["/usr/bin/lpr", "-P", "", "-#1", "-J",
"xanes.pdf", "-r", "/tmp/okular_YAmrVt.ps"], 0x7ffe48e5d8c8 /* 137 vars */
<unfinished ...>
Note the empty argument after "-P" which causes the error, as no printer is
set.


4. Checking the strace I can see that the connection with the remote cups
server is opened:
   17452 connect(16, {sa_family=AF_INET, sin_port=htons(631),
sin_addr=inet_addr("134.157.17.150")}, 16) = -1 EINPROGRESS (Operation now in
progress)
but the answers from the server look broken as they are essentially all NULL:
17452 recvfrom(16, "HTTP/1.1 200 OK\r\nDate: Tue, 11 S"..., 2048, 0, NULL,
NULL) = 201
17452 recvfrom(16, "\2\0\0\0\0\0\0\1", 8, 0, NULL, NULL) = 8
17452 recvfrom(16, "\1", 1, 0, NULL, NULL) = 1
17452 recvfrom(16, "G", 1, 0, NULL, NULL) = 1
17452 recvfrom(16, "\0\22", 2, 0, NULL, NULL) = 2
17452 recvfrom(16, "attributes-charset", 18, 0, NULL, NULL) = 18
17452 recvfrom(16, "\0\5", 2, 0, NULL, NULL) = 2
17452 recvfrom(16, "utf-8", 5, 0, NULL, NULL) = 5
17452 recvfrom(16, "H", 1, 0, NULL, NULL) = 1
17452 recvfrom(16, "\0\33", 2, 0, NULL, NULL) = 2
 ...

(I have attached the full strace as  "log")


5. The cups server is fairly old (CUPS 1.4.2) and has a relatively large
variety of printers installed. This is the output of "lpstat -t"
scheduler is running
system default destination: lafayette
device for dell3010-2: socket://dell3010-2:9100
device for depisan: socket://depisan:9100
device for destael: socket://destael:9100
device for dulac: socket://dulac:9100
device for duras: socket://duras:9100
device for ernaux: socket://ernaux:9100
device for hp2324-415: socket://hp2324-415:9100
device for hp2324-506: socket://hp2324-506:9100
device for hp4200: socket://hp4200:9100
device for lafayette: socket://lafayette:9100
device for leduc: socket://leduc:9100
device for minolta283: socket://minolta283:9100
device for yourcenar: socket://yourcenar:9100
dell3010-2 accepting requests since Tue 04 Sep 2018 18:47:12 CEST
depisan accepting requests since Tue 11 Sep 2018 11:45:42 CEST
destael accepting requests since Tue 11 Sep 2018 10:50:21 CEST
dulac accepting requests since Tue 11 Sep 2018 11:08:06 CEST
duras accepting requests since Tue 11 Sep 2018 10:17:20 CEST
ernaux accepting requests since Tue 11 Sep 2018 10:21:47 CEST
hp2324-415 accepting requests since Fri 07 Sep 2018 15:34:39 CEST
hp2324-506 accepting requests since Mon 10 Sep 2018 16:59:02 CEST
hp4200 accepting requests since Tue 17 Oct 2017 15:48:50 CEST
lafayette accepting requests since Tue 11 Sep 2018 11:07:35 CEST
leduc accepting requests since Mon 10 Sep 2018 16:57:25 CEST
minolta283 accepting requests since Tue 11 Sep 2018 11:11:52 CEST
yourcenar accepting requests since Tue 04 Sep 2018 18:47:43 CEST
printer dell3010-2 is idle.  enabled since Tue 04 Sep 2018 18:47:12 CEST
printer depisan is idle.  enabled since Tue 11 Sep 2018 11:45:42 CEST
        Ready to print.
printer destael is idle.  enabled since Tue 11 Sep 2018 10:50:21 CEST
        Ready to print.
printer dulac is idle.  enabled since Tue 11 Sep 2018 11:08:06 CEST
        Ready to print.
printer duras now printing duras-31692.  enabled since Tue 11 Sep 2018 10:17:20
CEST
        Connecting to printer...
printer ernaux is idle.  enabled since Tue 11 Sep 2018 10:21:47 CEST
        Ready to print.
printer hp2324-415 is idle.  enabled since Fri 07 Sep 2018 15:34:39 CEST
printer hp2324-506 is idle.  enabled since Mon 10 Sep 2018 16:59:02 CEST
printer hp4200 is idle.  enabled since Tue 17 Oct 2017 15:48:50 CEST
printer lafayette is idle.  enabled since Tue 11 Sep 2018 11:07:35 CEST
        Ready to print.
printer leduc is idle.  enabled since Mon 10 Sep 2018 16:57:25 CEST
printer minolta283 is idle.  enabled since Tue 11 Sep 2018 11:11:52 CEST
        Ready to print.
printer yourcenar is idle.  enabled since Tue 04 Sep 2018 18:47:43 CEST
duras-31692             aufort        15968256   Tue 31 Jul 2018 10:56:48 CEST
duras-31762             aufort          585728   Wed 08 Aug 2018 11:22:11 CEST
duras-31921             aufort          215040   Wed 29 Aug 2018 11:14:17 CEST


6. Printing by hand with lpr work fine, as do all non Qt5 applications.

I'm available to run any kind of test if necessary.

kind regards

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the Okular-devel mailing list