Looking for saved searches? click on "Search Bugs" above.

Print commands do not cope with spaces in printer names

RESOLVED FIXED in mozilla1.9beta3

Status

()

Core
Printing: Output
RESOLVED FIXED
12 years ago
10 years ago

People

(Reporter: Ian Jackson, Assigned: glandium)

Tracking

Trunk
mozilla1.9beta3
x86
Linux
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Reporter)

Description

12 years ago
User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8) Gecko/20060127 Ubuntu/1.5.dfsg-4ubuntu5 Firefox/1.5
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8) Gecko/20060127 Ubuntu/1.5.dfsg-4ubuntu5 Firefox/1.5

print.postscript.print_command and print.print_command's default values should be changed as follows, so that they work correctly if the printer name contains whitespace:

-pref("print.postscript.print_command", "lpr ${MOZ_PRINTER_NAME:+'-P'}${MOZ_PRINTER_NAME}");
+pref("print.postscript.print_command", "lpr ${MOZ_PRINTER_NAME:+-P\"$MOZ_PRINTER_NAME\"}");


Reproducible: Always

Steps to Reproduce:
On an Ubuntu system, use the gnome print manager to add several copies of the same network printer.  The subsequent copies will have spaces in their names.  Now try to print from Firefox to one of those printers.  (NB that I have patched Ubuntu's firefox with the change above).
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9a1) Gecko/20060224 Firefox/1.6a1 ID:0000000000
Confirmed.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Summary: print commands do not cope with spaces in printer names → Print commands do not cope with spaces in printer names
Version: unspecified → 1.5.0.x Branch
This still applies to Firefox 2.0 and Trunk.
Version: 1.5.0.x Branch → Trunk
(Assignee)

Updated

10 years ago
Component: Startup and Profile System → Preferences
QA Contact: startup → preferences
(In reply to comment #2)
> This still applies to Firefox 2.0 and Trunk.

Could you put Ian's patch in actual patch format and request review? Thanks.
Created attachment 292212 [details] [diff] [review]
Patch

Formalize the fix proposed in the bug report as a patch.
Assignee: nobody → mh+mozilla
Status: NEW → ASSIGNED
Attachment #292212 - Flags: review?
(Assignee)

Updated

10 years ago
Attachment #292212 - Flags: review? → review?(timeless)
Component: Preferences → Printing
Product: Firefox → Core
QA Contact: preferences → printing
> Could you put Ian's patch in actual patch format and request review? Thanks.

I did it even before noticing your note ^^
Comment on attachment 292212 [details] [diff] [review]
Patch

Just in case timeless is busy, maybe cls can review this instead.
Attachment #292212 - Flags: review?(cls)

Comment 7

10 years ago
Could you also change the solaris versions of these prefs at the end of the file?
(In reply to comment #7)
> Could you also change the solaris versions of these prefs at the end of the
> file?

Once Mike has a new patch, would you be willing to review it, kherron?
Created attachment 292217 [details] [diff] [review]
Patch also fixing Solaris's print command
Attachment #292212 - Attachment is obsolete: true
Attachment #292217 - Flags: review?(timeless)
Attachment #292212 - Flags: review?(timeless)
Attachment #292212 - Flags: review?(cls)
Comment on attachment 292217 [details] [diff] [review]
Patch also fixing Solaris's print command

kherron, can you review this?
Attachment #292217 - Flags: review?(kherron+mozilla)

Updated

10 years ago
Attachment #292217 - Flags: review?(timeless) → review+
Comment on attachment 292217 [details] [diff] [review]
Patch also fixing Solaris's print command

Fixes print commands to cope with spaces in printer names.
Attachment #292217 - Flags: review?(kherron+mozilla) → approval1.9?
Comment on attachment 292217 [details] [diff] [review]
Patch also fixing Solaris's print command

a=beltzner for 1.9
Attachment #292217 - Flags: approval1.9? → approval1.9+
Keywords: checkin-needed
Thanks for the patch!

Checking in modules/libpref/src/init/all.js;
/cvsroot/mozilla/modules/libpref/src/init/all.js,v  <--  all.js
new revision: 3.714; previous revision: 3.713
done
Status: ASSIGNED → RESOLVED
Last Resolved: 10 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9 M11
You need to log in before you can comment on or make changes to this bug.