Bug 108738 - CUPS mangles -J option of lpr when printing to remote server
Summary: CUPS mangles -J option of lpr when printing to remote server
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: cups
Version: 9
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Tim Waugh
QA Contact: David Lawrence
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2003-10-31 19:08 UTC by charles finlay
Modified: 2007-04-18 16:59 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2003-12-02 17:36:51 UTC
Embargoed:


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

Description charles finlay 2003-10-31 19:08:34 UTC
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 15:17:21 UTC
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 13:39:17 UTC
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.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.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 15:16:41 UTC
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 16:52:26 UTC
Created attachment 95795 [details]
debug2 from cups reload to end of print

Comment 5 Tim Waugh 2003-11-07 17:14:21 UTC
Okay, it needs 'banner' set.  Please enable 'banner' and try again. 
Thanks.

Comment 6 charles finlay 2003-11-07 18:18:47 UTC
Made a banner with Title: ,land
Chose standard banner.


Comment 7 charles finlay 2003-11-07 20:42:26 UTC
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 15:27:24 UTC
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 17:32:31 UTC
Created attachment 95947 [details]
error_log with banner set

Comment 10 Tim Waugh 2003-11-13 18:34:39 UTC
How are you enabling banner?  Using redhat-config-printer's 'Options' tab?

Comment 11 charles finlay 2003-11-14 13:26:36 UTC
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 13:28:44 UTC
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 14:21:25 UTC
Created attachment 95967 [details]
output of print-tui --Xexport

Comment 14 Tim Waugh 2003-11-14 15:09:35 UTC
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 16:58:59 UTC
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 17:20:30 UTC
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 18:01:54 UTC
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 16:33:46 UTC
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 16:37:13 UTC
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 18:51:09 UTC
Created attachment 96189 [details]
lpd://dps-a/b142a9as?reserve=yes+banner=yes+sanitize_title=no

Comment 21 Tim Waugh 2003-11-28 15:57:22 UTC
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 18:40:22 UTC
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 16:38:24 UTC
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 15:36:06 UTC
Created attachment 96280 [details]
error_log debu2 level FC1 machine

Comment 25 charles finlay 2003-12-02 15:39:41 UTC
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 16:08:22 UTC
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 17:36:51 UTC
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.