Kubuntu Adding printer via "Printer Configuration" tool results in invalid printers.conf, JobSheets entry incorrect

Bug #403169 reported by Crusoe
186
This bug affects 36 people
Affects Status Importance Assigned to Milestone
KDE-Admin
Fix Released
Medium
kdeadmin (Ubuntu)
Fix Released
Critical
Unassigned
Lucid
Fix Released
Undecided
Unassigned
Maverick
Fix Released
Undecided
Unassigned
Natty
Fix Released
Critical
Unassigned

Bug Description

Description: Ubuntu 9.04
Release: 9.04

systemsettings:
  Installed: 4:4.2.2-0ubuntu2
  Candidate: 4:4.2.2-0ubuntu2
  Version table:
 *** 4:4.2.2-0ubuntu2 0
        500 http://ca.archive.ubuntu.com jaunty/main Packages
        100 /var/lib/dpkg/status

cups:
  Installed: 1.3.9-17ubuntu1
  Candidate: 1.3.9-17ubuntu3.2
  Version table:
     1.3.9-17ubuntu3.2 0
        500 http://ca.archive.ubuntu.com jaunty-updates/main Packages
     1.3.9-17ubuntu3.1 0
        500 http://security.ubuntu.com jaunty-security/main Packages
 *** 1.3.9-17ubuntu1 0
        500 http://ca.archive.ubuntu.com jaunty/main Packages
        100 /var/lib/dpkg/status

When adding a printer to Kubuntu via the Printer Configuration tool in System Settings, the resulting printer can not be used to print.

Checking the cups error log, I saw:
E [22/Jul/2009:08:03:39 -0700] Syntax error on line 11 of printers.conf.

Printing from Okular, Evince and Firefox all silently fail. IE, it looks like it worked, but nothing shows in the CUPS queue, no output is seen from the printer.

I looked in /etc/cups/printers.conf...

# Printer configuration file for CUPS v1.3.9
# Written by cupsd on 2009-07-22 11:18
<DefaultPrinter HP_LaserJet_P2055x>
Info
Location Main Dev Office
DeviceURI socket://xxxxxxxx <<<<-- Removed to protect the innocent
State Idle
StateTime 1248285665
Accepting Yes
Shared Yes
JobSheets <<<-- Line 11, changing to "JobSheets none" fixes the issue
QuotaPeriod 0
PageLimit 0
KLimit 0
OpPolicy default
ErrorPolicy retry-job
</Printer>

Many folks report problems printing to network printers after adding them, and the above change fixed the issue for me.

I don't know if the issue IS with cups, or if the KDE4 tool directly edits this file.

TEST CASE:
with the old package
run kcmshell4 system-config-printer-kde
edit an option of your printer
click apply or OK
run sudo stop cups
check /etc/cups/printers.conf, JobSheet should have no arguments, this is the result of this bug

run sudo start cups
install the new package
run kcmshell4 system-config-printer-kde
edit an option of your printer
click apply or OK
run sudo stop cups
check /etc/cups/printers.conf, JobSheet should have arguments "none none" (or whatever you set it to)

affects: kdebase-workspace (Ubuntu) → kdeadmin (Ubuntu)
Revision history for this message
Mark Garland (p-launchpad-markgarland-co-uk) wrote :

Hi,

I'm running the 9.10 Kubuntu beta.

I had the same issue.
Added a HP Business Inkjet 1100d over the network using the KDE tool - all worked fine. Printed a test page, worked great.
Tried to print from okular and nothing happened. Running okular from the command line revealed "lpr: Bad job-sheets value ""!".

Followed the tip above, added "none" to the end of the JobSheets line, restarted CUPS and all worked a treat. Thanks to OP.

Happy to supply any further details if you tell me how to extract them for you.

MG

Revision history for this message
Søren Holm (sgh) wrote :

Is has somehow been fixed twice. After adding a printer is now says "JobSheets none none". Changing it to "JobSheets none" makes printing working again.

Revision history for this message
Bjorn Helgaas (bjorn-helgaas) wrote :

Also affects Kubuntu 10.04 LTS.

Revision history for this message
Par Kurlberg (kurlberg-gmail) wrote :

Still there in Kubuntu 10.04.1 LTS.

Installed printer with cups. No printing with lpr (but "print test page" worked.) Went to config/policy/banner settings - both starting and ending set to "none". Pressed apply. No change in /etc/cups/printers.conf. *However*, after doing "/etc/init.d/cups stop", *two* copies of "none" had been added.

Revision history for this message
mokabar (tim-klingt) wrote :

still in 10.10 beta

Revision history for this message
avlas (avlas) wrote :

This happened also to me and was fixed as it is mentioned

Revision history for this message
avlas (avlas) wrote :

I forgot to say that I'm using Kubuntu Maverick with Kde 4.5.2. I solved it for Okular but I still have problems in Acroread. I guess it is related and I don't know how to fix it. The message is the following:
'lpr: Bad copies value 0.'
On the other hand, do you know if there is a similar workaround to put duplex by default in Okular, because now each time I print something I have to modify the options.

Revision history for this message
avlas (avlas) wrote :

Ok, the problem with Acroread I solved in a similar way. I opened /etc/cups/printers.conf and I modified the line with 'Option copies ' to put 'Option copies 1'. And then stop and start the cups daemon:

 - sudo service cups stop
 - sudo service cups start

Still I don't know how to get Okular doing duplex printing by default though...

Revision history for this message
Daniel Stiefelmaier (mail-stiefelweb) wrote :

I had the exact same problem in Kubuntu 9.10 and fixed it like crusoe described it.
Sad to see this is still present in Kubuntu 10.10.

Additional Info:
- Ubuntu test page could be printed, Acroread failed
- The JobSheets line in the config file had some trailing whitespaces, indicating that the string that was supposed to be there was just empty...

Revision history for this message
Jonathan L. Verner (jonathan-verner) wrote :

Still present here in Maverick, KDE 4.5.2. Adding 'none' to the 'JobSheets' line fixes the problem for okular. Haven't tested with Acroread.

Revision history for this message
Andrea (barlowrm) wrote :

Hi there,

may I point out that this bug is opened since more than one year? I am also still experiencing it on Maverick.

I am not familiar with this tracking system, but such a long time is typically enough to move from the "new" status to a more advanced one. IS there a particular problem here?

As for the "Undecided" importance, I'd say that something that prevents non-expert users from printing is quite important...

Any chance this will be fixed any time soon? Will we receive the bugfix with normal updates?

Thanks for your help,

Andrea.

Revision history for this message
Andrew Kohlsmith (akohlsmith) wrote :

This bug is still in 10.10 release. HP5100dtn if it matters. KDE apps all fail silently, acroread at least tells me what the error is so I can try to fix it.

Revision history for this message
Montblanc (montblanc) wrote :

Confirmed. Same as everyone else on Maverick with HP Officejet 6500 e709n. Changing that line to "JobSheets none" did the trick, but everytime you change something from KDE printer settings (not from hplip) it defaults to "JobSheets".

Changed in kdeadmin (Ubuntu):
status: New → Confirmed
Revision history for this message
Stefano Pasquale (passte69) wrote :

I fixed in Acroread by adopting Salva's suggestions, i.e. removing a line in:
  /etc/cups/printers.conf
containing job-sheets, and stop/starting cups.

Changed in kdeadmin (Ubuntu):
importance: Undecided → Critical
Revision history for this message
P (p92) wrote :

same here with kde 4.5.7

Revision history for this message
Ronald Teune (zeekoe) wrote :

Same in Maverick, same fix; adding "none" & restarting cups.

Revision history for this message
bastafidli (ubuntu-bastafidli) wrote :

I Kubuntu 10.10 with CUPS 1.4.4 I have 2 printers. HP LaserJet 2100 was installed and working just fine. It had JobSheets none none. Then I added cups-pdf printer and encountered the above problem when printing from Acroread. The printers.conf for cups-prd contained "JobSheets". I have fixed it as described above, added "none none" and restarted cups.

Revision history for this message
FriedChicken (domlyons) wrote :

I have an EPSON Stylus Office BX625FWD and the printer din't work anymore after usage of the kde printer configuration. Okular didn't show a message but Acrobat Reader showed the already known "Bad job-sheets value".

After stopping cups, editing printers.conf and starting cups again the printer worked again.

(Kubuntu Maverick, KDE 4.6 RC2)

@Salva:
You can change the default settings by configuring your printer using the CUPS Webinterface on http://localhost:631/

Changed in kdeadmin:
status: Unknown → New
Changed in kdeadmin:
importance: Unknown → Medium
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package kdeadmin - 4:4.6.0-0ubuntu2

---------------
kdeadmin (4:4.6.0-0ubuntu2) natty; urgency=low

  * Add kubuntu_01_no_changes_on_load.diff from upstream, don't mark
    changes on load, fixes LP: #403169
 -- Jonathan Riddell <email address hidden> Mon, 14 Feb 2011 15:55:44 +0000

Changed in kdeadmin (Ubuntu Natty):
status: Confirmed → Fix Released
Revision history for this message
Jonathan Riddell (jr) wrote :

Fixed upstream, uploaded to natty, uploaded to maverick-proposed and lucid-proposed for SRU.

TEST CASE:
with the old package
run kcmshell4 system-config-printer-kde
edit an option of your printer
click apply or OK
run sudo stop cups
check /etc/cups/printers.conf, JobSheet should have no arguments, this is the result of this bug

run sudo start cups
install the new package
run kcmshell4 system-config-printer-kde
edit an option of your printer
click apply or OK
run sudo stop cups
check /etc/cups/printers.conf, JobSheet should have arguments "none none" (or whatever you set it to)

Changed in kdeadmin:
status: New → Fix Released
Revision history for this message
Martin Pitt (pitti) wrote : Please test proposed package

Accepted kdeadmin into lucid-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in kdeadmin (Ubuntu Lucid):
status: New → Fix Committed
tags: added: verification-needed
Revision history for this message
aexl (aexl) wrote :

great to fix this!!

i only got a clue about the reason when acroread printed the lpr output "Bad job-sheets value ""!"
> Printing from Okular, Evince and Firefox all silently fail.
maybe someone(tm) should file an issue against each app that does not report lpr errors.

Revision history for this message
Martin Pitt (pitti) wrote :

Accepted kdeadmin into maverick-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in kdeadmin (Ubuntu Maverick):
status: New → Fix Committed
Revision history for this message
udippel (udippel) wrote :

I hope the patch contains *both* issues mentioned above! (#1, #8)
Here I did what was written in the original post, to no avail. There was another crappy line here (kubuntu 10.10) that had to be modified manually: There was an option
Option copies Unimplemented
(or so, unfortunately I didn't make a copy)
that needed to be set to '1' before it would print.
(Yes, I had set it to '1' as default printing option/policy earlier in CUPS)

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package kdeadmin - 4:4.5.5-0ubuntu2

---------------
kdeadmin (4:4.5.5-0ubuntu2) maverick-proposed; urgency=low

  * Update to final 4.5 version per micro-release exception (LP: #757065)
  * Add debian/patches/kubuntu_01_no_changes_on_load.diff from existing
    kdeadmin pending SRU (LP: #403169)
 -- Scott Kitterman <email address hidden> Mon, 11 Apr 2011 01:59:35 -0400

Changed in kdeadmin (Ubuntu Maverick):
status: Fix Committed → Fix Released
Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :

SRU verification for Lucid:
I have reproduced the problem with kdeadmin 4:4.4.5-0ubuntu1 in lucid-updates and have verified that the version of kdeadmin 4:4.4.5-0ubuntu2 in -proposed fixes the issue.

Marking as verification-done

description: updated
tags: added: verification-done
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package kdeadmin - 4:4.4.5-0ubuntu2

---------------
kdeadmin (4:4.4.5-0ubuntu2) lucid-proposed; urgency=low

  * Add kubuntu_01_no_changes_on_load.diff from upstream, don't mark
    changes on load, fixes LP: #403169
 -- Jonathan Riddell <email address hidden> Mon, 14 Feb 2011 15:59:13 +0000

Changed in kdeadmin (Ubuntu Lucid):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.