Bug 84299 - wish: show detailed device status ("XX% complete", etc) with CUPS
Summary: wish: show detailed device status ("XX% complete", etc) with CUPS
Status: CLOSED DUPLICATE of bug 117040
Alias: None
Product: kdeprint
Classification: Unmaintained
Component: kjobviewer (show other bugs)
Version: 0.1
Platform: unspecified Linux
: NOR wishlist
Target Milestone: ---
Assignee: KDEPrint Devel Mailinglist
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-07-01 11:23 UTC by Jens
Modified: 2008-12-31 17:30 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jens 2004-07-01 11:23:04 UTC
Version:           0.1 (using KDE 3.2.3,  (testing/unstable))
Compiler:          gcc version 3.3.3 (Debian 20040422)
OS:                Linux (i686) release 2.6.6-bk1-jb

Hi,

when I print a large document via CUPS kjobviewer only shows me "processing ..." ("Verarbeitung läuft ..." in German). The http://localhost:631 CUPS control web page shows detailed info like "waiting for printer", "timeout on lp0", "sending print data, XX% complete", etc.

This is fairly important for large print jobs, to get an idea about when the print job will be finished and how far it has processed. Please show this detailed info in the kjobviewer window. I don't know if/how other printer systems provide this info but CUPS seems to become standard, and it doesn't need to conflict (you could show it in the same column as the status is showed now).

Thanks!
Comment 1 Jens 2005-01-11 15:01:38 UTC
Hello,

is it possible to implement this fairly easily or would this take up a lot of work?

I think although this is just a wish, it is quite an important one, even if only CUPS supports it, because CUPS (or rather IPP) is becoming the de facto standard printing system everywhere (not just Unix/Linux), and we need more detailed printer status info without having to resort to calling up http://$printer_host:631/.

Thank you!

Jens
Comment 2 Michael Goffioul 2005-01-11 16:03:05 UTC
It's not that complicated: it's just a matter of finding the correct IPP attribute and use it in the GUI. It's currently more a lack of time and Linux system availability.
However, I have a question regarding the detailed messages you see in http://localhost:631: do you see them when viewing job properties or printer properties?

Michael.
Comment 3 Jens 2005-01-11 16:43:33 UTC
Am Dienstag, 11. Januar 2005 16:03 schrieb Michael Goffioul:

> 16:03 ------- It's not that complicated: it's just a matter of finding
> the correct IPP attribute and use it in the GUI. It's currently more a
> lack of time and Linux system availability. However, I have a question
> regarding the detailed messages you see in http://localhost:631: do you
> see them when viewing job properties or printer properties?

It's the text that the web interface, at http://...:631/printers, prints in 
italic when anything happens. Like "Sending print data, 67% sent" or 
something like that.

Can you point me to a starting point (ie. where would I put the code to get 
the IPP attribute and put it into the GUI)? Then I'll try to whip up a 
patch.

Thanks for answering!

Comment 4 Michael Goffioul 2005-01-12 10:05:05 UTC
That was my guess as well. The problem with the message you see with CUPS web interface is that it's a printer-specific message (corresponds to printer-state-message IPP attribute of the printer object), not a job-specific message, so it's not suited for showing it in the job viewer (you'd have the same message for all jobs queued on the same printer, but the message wouldn't relevant for all of them). IPP defines the job attribute job-state-message that could be used, unfortunately CUPS doesn't implement it; the only IPP job attributes are then job-state (which is currently used by kdeprint) and job-state-reason. The latter gives you a more detailed information about the job state; this could be used in this case.
The relevant code lies in kdelibs/kdeprint/cups/ (for job retrieval) and kdelibs/kdeprint/management/ (for the GUI). The idea would then be to retrieve job-state-reason attribute for the jobs, convert it to a human-readable string (this attribute can take as value a set of predefined keyword that you have to map to an actual message) and store it in KMJob object. Then make such that KMJobViewer object shows that info.

Note that the printer-state-message attribute could also be shown, but only in the print manager, not in the job viewer.

Michael.
Comment 5 Jens 2005-01-12 10:48:50 UTC
Hi,

Thank you for your long answer!

CUPS 1.2 will be implementing job-state-message, at least according to 
rumours on various mailing lists.

For the time being, it would IMHO make sense to display the 
printer-state-message together with the job that is currently printing. 
That should be fairly easy to find out via CUPS (right?) and put into the 
job viewer. Also, perhaps a popup (one of these yellowish background 
thingies) when hovering over the print icon in Kicker's system area could 
display something like

	$printer1: Printing, $printer-state-message
	$printer2: Idle
	$printer3: Stopped, $printer-state-message
	(etc)

if more than, say, 5 printers are configured, just display the active ones. 
If more then 5 printers are active, just display the ones that the current 
user is printing on (so the popup doesn't get too big). If the current 
user is printing on more than five printers at once, well, that's his 
problem. :)

I'd like to have a go at this, if there's a chance that  it'll be accepted 
into CVS.


Comment 6 Michael Goffioul 2005-01-12 18:18:37 UTC
If you have some time, please go ahead :-)

kdeprint provides some facilities to send requests to the CUPS server. See kmcupsmanager.cpp, kmcupjobmanager.cpp and ipprequest.[h|cpp]. What you need to do is when finding an active job, send a request with the corresponding printer URI to retrieve only printer-state-message and put into some additional field of the KMJob class.

The code for the docked print system (in kicker) lies in kdebase/kdeprint/kjobviewer/. For this, I would keep it simple: only shows info about the opened job viewer windows, not for all printers.

Michael.
Comment 7 Dik Takken 2006-01-30 23:39:26 UTC
I would *love* to be able to see the printer status in the printer KCM module. Not everyone knows how to find out what is going on from the commandline or the web interface.

The KCM module is often way too optimistic about the status of the printer. It will just tell you that it is idle/ready while lpstat -t says it is on fire...
Comment 8 Kurt Pfeifle 2007-01-13 22:48:15 UTC
duplicate of bug 117040 (in a way)

*** This bug has been marked as a duplicate of 117040 ***
Comment 9 John Layt 2008-12-31 17:30:01 UTC
Closing old Resolved status bug.