[Originally reported as Sun bug id #4376961 against the Solaris Xprint.] The Solaris print system provides printer descriptions via the command "lpget -k description printername(s)". The Solaris Xprint server should return these printer descriptions in the description field of the GetPrinterList response.
Created attachment 313 [details] [review] Patch against older version of xc/programs/Xserver/Xprint/Init.c This is the patch that was added to the Solaris 9 Xprint source to add this support. The code in the open source release has diverged a bit since then to add support for other spooling systems, so if you actually want this to be integrated into the current Xprint, it would need to be reworked to fit into the current source (and hopefully to produce better error messages than this does, as noted in http://freedesktop.org/cgi-bin/bugzilla/show_bug.cgi?id=660 ).
Nice work... :) Do you know whether CUPS and LPRng have similar ways to fetch the descriptions of a printer ?
I see a small problem with this statement: -- snip -- - name[strlen(name) - 1] = (char)'\0'; /* strip the \n */ - AddPrinterDbName(name); + desc = strchr(name, '\t'); + + if (desc) { + *(desc++) = '\0'; + if (*desc == '\0') { + desc = NULL; + } + } + name[namelen - 1] = (char)'\0'; /* strip the \n */ + AddPrinterDbName(name,desc); -- snip -- If I read this right the new code uses the format "${name}<tab>${description}", right ? What about using "${name}<tab>xp-desc=${description}" - that would allow custom scripts to provide more attributes (like the model-config name, e.g. "xp-model-identifier=${mode-config-name}") in the future (e.g. the mechanism would be extensible) ?
Comment on attachment 313 [details] [review] Patch against older version of xc/programs/Xserver/Xprint/Init.c I found a more or elss fatal flaw in the patch: A "descriptor" set in the model-config overrides the "descriptor" set via this patch. And since all mode-config's (at least those from HP and those from xprint.mozdev.org, incl. "PSdefault") set that attribute the functionality becomes a NO-OP... ;-(
s/more or elss/more or less/
Created attachment 365 [details] [review] Proposed patch for 2004-06-12-trunk
Comment on attachment 365 [details] [review] Proposed patch for 2004-06-12-trunk Requesting r= from alan... :)
Created attachment 415 [details] [review] Patch for checkin Final patch for checkin, incl. ChangeLog entry (and the bogus copyright notice has been removed from spooler.h).
Patch checked-in... /cvs/xorg/xc/ChangeLog,v <-- ChangeLog new revision: 1.71; previous revision: 1.70 /cvs/xorg/xc/programs/Xserver/Xprint/Init.c,v <-- Init.c new revision: 1.6; previous revision: 1.5 /cvs/xorg/xc/programs/Xserver/Xprint/spooler.c,v <-- spooler.c new revision: 1.3; previous revision: 1.2 Mailing the commit message to xorg-commit@pdx.freedesktop.org... ... marking bug as FIXED.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.