Bug 5518 - All print jobs are (still) sent as raw (on Ubuntu and possibly other distributions)
Summary: All print jobs are (still) sent as raw (on Ubuntu and possibly other distribu...
Status: CLOSED WORKSFORME
Alias: None
Product: ThinLinc
Classification: Unclassified
Component: Printing (show other bugs)
Version: trunk
Hardware: PC Unknown
: P2 Normal
Target Milestone: 4.10.0
Assignee: Pierre Ossman
URL:
Keywords: prosaic
Depends on:
Blocks:
 
Reported: 2015-05-06 12:12 CEST by Karl Mikaelsson
Modified: 2018-10-09 12:17 CEST (History)
1 user (show)

See Also:
Acceptance Criteria:


Attachments

Description Karl Mikaelsson cendio 2015-05-06 12:12:08 CEST
FINAL_CONTENT_TYPE is set to printer/thinlocal rather than application/pdf, so tlclient thinks all jobs are raw jobs and refuses to show the printer selection dialog.

This is the same problem as reported in bug 5283, but I'm seeing this on Ubuntu servers. Reading the initial bug reports, I got the impression that this was limited to a Red Hat patch, but since this issue has shown up elsewhere, we should probably investigate if any other distributions are affected by this.

I've reported the problems with Ubuntu here:

 https://bugs.launchpad.net/ubuntu/+source/cups/+bug/1452193
Comment 1 Karl Mikaelsson cendio 2015-05-06 12:37:57 CEST
This could be because of how >= CUPS 1.5 interprets the cupsFilter keyword in the thinlocal PPD.

http://www.cups.org/documentation.php/spec-ppd.html#cupsFilter :
> *cupsFilter: "source/type cost program"

In our case, this is:

> *cupsFilter: "application/pdf 0 -"

Jobs that match a cupsFilter rule are seemingly automatically converted to a destination type of "printer/thinlocal".

> D [06/May/2015:01:51:37 -0700] [Job 1] 1 filters for job:
> D [06/May/2015:01:51:37 -0700] [Job 1] - (application/pdf to printer/thinlocal, cost 0)
[...]
> D [06/May/2015:01:51:37 -0700] [Job 1] envp[29]="FINAL_CONTENT_TYPE=printer/thinlocal"

There's also a new (since cups 1.5) cupsFilter2 keyword that looks like this:

http://www.cups.org/documentation.php/spec-ppd.html#cupsFilter2
> *cupsFilter2: "source/type destination/type cost program"

For us, this would look like this:

> *cupsFilter2: "application/pdf application/pdf 0 -"

If you set a destination type through a cupsFilter2, the correct destination type ends up in FINAL_CONTENT_TYPE, which is what we want. It's also possible to use cupsFilter together with cupsFilter2 - cups >=1.5 discards all cupsFilters if it encounters a cupsFilter2 in the PPD.
Comment 2 Pierre Ossman cendio 2015-05-06 12:41:29 CEST
They've just blindly copied Red Hat's broken patch:

http://bazaar.launchpad.net/~ubuntu-branches/ubuntu/vivid/cups/vivid/view/head:/debian/patches/revert-upstream-change-to-FINAL_CONTENT_TYPE-to-fix-printing-to-remote-CUPS-servers.patch

No comment as to why. Probably this generic changelog entry: "* Import Fedora
patches:"
Comment 4 Pierre Ossman cendio 2015-06-29 15:41:31 CEST
I've made a note of this in the platform specific notes.
Comment 5 Pierre Ossman cendio 2018-10-09 12:17:32 CEST
Yay! They've dropped the patch in 1.7.5-6:

https://git.launchpad.net/ubuntu/+source/cups/commit/?id=89c4fdb8cb6a9b0530b8210671a82d7fcd41721c

This version is in 16.04 (and later), but not the older 14.04. So most users should be unaffected.

I've removed the release note as it is very few users affected, and 14.04 is also almost EOL (april 2019).

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