How to clear status in web interface

Anders Blomdell anders.blomdell at control.lth.se
Tue Mar 30 07:30:42 PDT 2010


> Is there a way to have transient messages propagated from a backend on the page
> http://my.cups.server:631/printers/Printername ? If i have a backend that does the following:
>
>   // Some processing
>   fprintf(stderr, "INFO: First message\n");
>   // Some processing
>   fprintf(stderr, "INFO: Second message\n");
>   // Some processing
>   fprintf(stderr, "INFO:\n");
>
> The /Printername page will not show the INFO message, while http://my.cups.server:631/printers/ will show them. Changing INFO to ERROR will make the /Printername page show the first message only.

The following change got the info into the appropriate page.

--- /usr/share/cups/templates/printer.tmpl~     2009-12-23 12:25:11.000000000 +0100
+++ /usr/share/cups/templates/printer.tmpl      2010-03-30 16:27:58.000000000 +0200
@@ -40,6 +40,7 @@
 <TR><TH ALIGN="RIGHT" VALIGN="TOP">Defaults:</TH><TD>job-sheets={job_sheets_default}
 media={media_default?{media_default}:unknown}
 {sides_default?sides={sides_default}:}</TD></TR>
+<TR><TH ALIGN="RIGHT" VALIGN="TOP">Status:</TH><TD>{printer_state_message}</TD></TR>
 </TABLE>

 </DIV>





More information about the cups mailing list