Bug 108738 - CUPS mangles -J option of lpr when printing to remote server
CUPS mangles -J option of lpr when printing to remote server
Status: CLOSED NOTABUG
Product: Red Hat Linux
Classification: Retired
Component: cups (Show other bugs)
9
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Tim Waugh
David Lawrence
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-10-31 14:08 EST by charles finlay
Modified: 2007-04-18 12:59 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2003-12-02 12:36:51 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
debug2 from cups reload to end of print (22.36 KB, text/plain)
2003-11-07 11:52 EST, charles finlay
no flags Details
error_log with banner set (19.29 KB, text/plain)
2003-11-13 12:32 EST, charles finlay
no flags Details
output of print-tui --Xexport (2.90 KB, text/plain)
2003-11-14 09:21 EST, charles finlay
no flags Details
cups error_log for banner=yes (19.17 KB, text/plain)
2003-11-14 11:58 EST, charles finlay
no flags Details
error_log with lpadmin setting reserve=yes+banner (19.31 KB, text/plain)
2003-11-14 13:01 EST, charles finlay
no flags Details
lpd://dps-a/b142a9as?reserve=yes+banner=yes+sanitize_title=no (19.11 KB, text/plain)
2003-11-25 13:51 EST, charles finlay
no flags Details
debug2 error_log from FC1 machine (38.44 KB, text/plain)
2003-11-28 13:40 EST, charles finlay
no flags Details
error_log debu2 level FC1 machine (34.59 KB, text/plain)
2003-12-02 10:36 EST, charles finlay
no flags Details
Comments for attachment 96280 (34.59 KB, text/plain)
2003-12-02 10:39 EST, charles finlay
no flags Details

  None (edit)
Description charles finlay 2003-10-31 14:08:34 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20030225

Description of problem:
Use redhat-config-printer. Select Strict RFC1179. Remote print server is a SUN.
The -J option is not passed through in the control file. So far, we have used
lpadmin to turn sanitize_title on and off and banner on and off.

The old print server does not process the -J option, as in lpr -J,land file . We
pass page orientation, fonts, duplex, and tray select through this mechanism.

If you need to see the control file on RH 9 or the control file passed to dps-a,
we can provide those. 

Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1.Configure remote lpd printer with RFC1179
2. lpr -J,land file
3. Observe Control file on remote print server
    

Actual Results:  files print without special commands passed through -J option.

Expected Results:  Remote server should have detected commands in job name and
performed actions appropriate for printer.

Additional info:

[root@ayrport cups]# redhat-config-printer
[root@ayrport cups]# cat printers.conf
# Printer configuration file for CUPS v1.1.19
# Written by cupsd on Fri 31 Oct 2003 01:32:21 PM EST
<DefaultPrinter b142a9as>
Info Created by redhat-config-printer 0.6.x
DeviceURI lpd://dps-a/b142a9as?reserve=yes
Location
State Idle
Accepting Yes
JobSheets none none
QuotaPeriod 0
PageLimit 0
KLimit 0
</Printer>
[root@ayrport cups]# lpr -J,land /etc/yum.conf
[root@ayrport cups]# lpadmin -p b142a9as -v
lpd://dps-a/b142a9as?format=o+order=control+sanitize_title=off+reserve=yes+sanitize_job=no
[root@ayrport cups]# lpr -J,land /etc/yum.conf

Okay so this was done on Fedora. It is the same for 8.0 and 9. I can duplicate
this for 9.
Comment 1 Tim Waugh 2003-11-04 10:17:21 EST
Can you explain whether/how sanitize_title and banner are relevant to
the -J problem?

Also could you clarify what you mean by 'The old print server does not
process the -J option'?  LPRng?  Or a previous version of CUPS?  Or
the remote print spooler?

The control file would be useful to demonstrate the problem, yes
please.  Thanks.
Comment 2 charles finlay 2003-11-07 08:39:17 EST
1) Since -J refers to "job name to be printed on the banner page", I
tried those options.

2) Sending the -J option from a unix system produces this control file
on dps-a, a Solaris 8 machine. Worked with RH versions that used lpr.
Worked with LPRng at one time, although cups is used on RH 8.0 and 9.


C 1
D b142a9as
F /var/spool/lp/tmp/ayr.grc.nasa.gov/183-1
O flist='.cshrc' nobanner
P 20
T ,land\n#####\n#####\t\t ayr
t postscript
U smfinla@ayr.grc.nasa.gov
s   0000
v 0

3) Using the command lpr -Pb142a9as -J,land /root/.cshrc on RedHat 9
produces this control file on dps-a.

C 1
D b142a9as
F /var/spool/lp/tmp/ayrshire.grc.nasa.gov/774-1
O nobanner flist='_land'
P 20
T 774-1
t postscript
U root@ayrshire.grc.nasa.gov
s   0000
v 0

The control file on the localhost looks like this:

[root@ayrshire cups]# cat c00037
Gattributes-charset
iso-8859-1Httributes-natural-languageen-usE
                                          
printer-uri%ipp://localhost:631/printers/b142a9asBjob-originating-user-namerootjob-name,landIdocument-format
text/plainB
job-sheetsnoneBnoneBcpi12Blpi7!
                               page-bottom$!    page-left$!
page-right$page-top$!scalingd"wrap!
                                  
job-priority2Bjob-originating-host-name      localhost!job-id%#      
job-state!?job-media-sheets-completedEjob-printer-uri%http://ayrshire:631/printers/b142a9asjob-name,land!
                               
job-k-octets!time-at-creation?ª²2time-at-processingtime-at-completedDjob-hold-untilno-hold[root@ayrshire
cups]


Comment 3 Tim Waugh 2003-11-07 10:16:41 EST
Please edit /etc/cups/cupsd.conf and change the LogLevel line to read:

LogLevel debug2

Then do (as root): service cups reload

Print again with lpr -P.. -J.. and then please attach
/var/log/cups/error_log.  Thanks.
Comment 4 charles finlay 2003-11-07 11:52:26 EST
Created attachment 95795 [details]
debug2 from cups reload to end of print
Comment 5 Tim Waugh 2003-11-07 12:14:21 EST
Okay, it needs 'banner' set.  Please enable 'banner' and try again. 
Thanks.
Comment 6 charles finlay 2003-11-07 13:18:47 EST
Made a banner with Title: ,land
Chose standard banner.
Comment 7 charles finlay 2003-11-07 15:42:26 EST
Put the banner at the back. No change.

Loaded LPRng and made a "raw" print queue. -J option work fine.

Tried changing queue to raw and text only with and without banner
pages. No change. 
Comment 8 Tim Waugh 2003-11-13 10:27:24 EST
I meant: please enable the 'banner' option, then try printing again
and attach the resulting error_log.  Thanks.
Comment 9 charles finlay 2003-11-13 12:32:31 EST
Created attachment 95947 [details]
error_log with banner set
Comment 10 Tim Waugh 2003-11-13 13:34:39 EST
How are you enabling banner?  Using redhat-config-printer's 'Options' tab?
Comment 11 charles finlay 2003-11-14 08:26:36 EST
Yes. I used redhat-config-printer, Edit->Queue options Banner pages
"At start of job" standard. OK. Apply. Quit. /etc/init.d/cups restart
Comment 12 Tim Waugh 2003-11-14 08:28:44 EST
Okay, for some reason the lpd backend isn't seeing it.  Can you please
attach the output of 'printconf-tui --Xexport', so that I can see the
configuration it's looking at?  Thanks.
Comment 13 charles finlay 2003-11-14 09:21:25 EST
Created attachment 95967 [details]
output of print-tui --Xexport
Comment 14 Tim Waugh 2003-11-14 10:09:35 EST
I see what's happening.  Try this:

In the 'Filter options' part of that dialog screen click 'Add...'.  In
the dialog that pops up enter 'banner' as the option name and 'yes' as
the value for that option.  OK out, apply and quit, and see if that's
any better.
Comment 15 charles finlay 2003-11-14 11:58:59 EST
Created attachment 95975 [details]
cups error_log for banner=yes

Used redhat-config-printer adding banner as an option with value=yes. applied
and quit redhat-config-printer. Restarted cups.

No landscape output. Error log complains about banner being an invalid option.
Comment 16 Tim Waugh 2003-11-14 12:20:30 EST
Okay, my mistake, please take that banner=yes option out again.

But try:

lpadmin -p b142a9as -v lpd://dps-a/b142a9as?reserve=yes+banner

(still interested in error_log output)
Comment 17 charles finlay 2003-11-14 13:01:54 EST
Created attachment 95982 [details]
error_log with lpadmin setting reserve=yes+banner

Did not produce landscape output. 

lpadmin -p b142a9as -v lpd://dps-a/b142a9as?reserve=yes+banner=yes
Comment 18 Tim Waugh 2003-11-19 11:33:46 EST
Okay, we have an 'L' line now, so there should have been a banner
page?  It's just the translation from ',' to '_' now.
Comment 19 Tim Waugh 2003-11-19 11:37:13 EST
How about this?:

lpadmin -p b142a9as -v
lpd://dps-a/b142a9as?reserve=yes+banner=yes+sanitize_title=no
Comment 20 charles finlay 2003-11-25 13:51:09 EST
Created attachment 96189 [details]
lpd://dps-a/b142a9as?reserve=yes+banner=yes+sanitize_title=no
Comment 21 Tim Waugh 2003-11-28 10:57:22 EST
Did you say the same thing happened with Fedora Core 1?  I'm having a
hard time reproducing this problem with FC1.  I see 'J,land' in the
control file sent.
Comment 22 charles finlay 2003-11-28 13:40:22 EST
Created attachment 96243 [details]
debug2 error_log from FC1 machine

This print did not produce a banner page. So, I need to check configuration
against the RedHat 9 machine. FYI here is the lpstat output on the FC1 machine:

root@ayrport cups]# lpstat -t
scheduler is running
system default destination: b142a9as
device for b142a9as:
lpd://dps-a/b142a9as?reserve=yes+banner=yes+sanitize_title=no
b142a9as accepting requests since Jan 01 00:00
printer b142a9as is idle.  enabled since Jan 01 00:00

Did not produce landscape output.
BTW: the original problem submission had used the Fedora machine. I have been
using the RH 9 machine since.
Comment 23 Tim Waugh 2003-12-01 11:38:24 EST
D [28/Nov/2003:13:31:01 -0500] [Job 7] Control file is:
D [28/Nov/2003:13:31:01 -0500] [Job 7] Hayrport.grc.nasa.gov
D [28/Nov/2003:13:31:01 -0500] [Job 7] Proot
D [28/Nov/2003:13:31:01 -0500] [Job 7] J,land
D [28/Nov/2003:13:31:01 -0500] [Job 7] Lroot
D [28/Nov/2003:13:31:01 -0500] [Job 7] ldfA036ayrport.grc.nasa.gov
D [28/Nov/2003:13:31:01 -0500] [Job 7] UdfA036ayrport.grc.nasa.gov
D [28/Nov/2003:13:31:01 -0500] [Job 7] N,land

The differences between this and a working control file that look like
they might be important are:

No 'C' line
'N' used instead of 'T'
The 'working' one doesn't even set 'L'!

Would you like to try this experimental CUPS package?:

ftp://people.redhat.com/twaugh/tmp/cups-1.1.19-16.0.0.1.i386.rpm
ftp://people.redhat.com/twaugh/tmp/cups-libs-1.1.19-16.0.0.1.i386.rpm

It adds a C line and a T line.
Comment 24 charles finlay 2003-12-02 10:36:06 EST
Created attachment 96280 [details]
error_log debu2 level FC1 machine
Comment 25 charles finlay 2003-12-02 10:39:41 EST
Created attachment 96281 [details]
Comments for attachment 96280 [details]

Loaded new cups and cups-lib on the FC 1 system. We have a banner page. But,
the output still is no rotated.
Comment 26 charles finlay 2003-12-02 11:08:22 EST
Got it to work. On both RH 9 and FC 1. Was sure this was tried before,
but maynot.

Define print queue as raw and no banners. Restart cupsd. Use
lpadmin -p b142a9as -v
lpd://dps-a/b142a9as?reserve=yes+banner=yes+sanitize_title=no

and lpr -J,land file does produce landscape output.

Thanks. Do you want to see error_log output for this condition?
Comment 27 Tim Waugh 2003-12-02 12:36:51 EST
So it was that it needed a raw queue then.  Okay, glad you got it working.

Note You need to log in before you can comment on or make changes to this bug.