[Xprint] Xprint configuration oddities
Toby Blake
toby at inf.ed.ac.uk
Tue Aug 9 17:12:53 EDT 2005
Hi there,
Thanks for your reply.
>> ...and, after restarting Xprt, I look at the list of printers in
>> Firefox and find that it seems to have taken the output of
>> /usr/bin/printers, but not piped it through 'cut', i.e. printers are
>> listed of the form 'name HP4100DTN on 4th Floor'. I can put the line
>> '/usr/bin/printers |cut -f1' in a separate script, change Xprinters to
>>
>> Augment_Printer_List /path/to/one/line/script
>>
>> ... and it works OK. This is the first oddity.
>
> It sounds like Augment_Printer_List is just expecting a single
> string, which is why it works when you give it the script. It's
> only reading up till the first whitespace. Did you try putting
> "quotes" around "/usr/bin/printers |cut -f1" (though my guess is
> that won't work, it'll just try to use '"/usr/bin/printers' instead)
Yeah, it doesn't work if you put quotes round it - complains about not
finding the second quote (the same behaviour if I use " or ')
> If it's just reversing the normal order, then of course you can add
> " | sort -r" or whatever in your script.
Yes, it's reversing the order, but it uses a custom sort order, so I'd
have to change the script so it sort in reverse order purely for the
purpose of getting it in the right order from Xprt.
>> Also, one other important question on a different matter, how does
>> Xprint relate printer names to their models? There is mention in the
>> FAQ of family/class but it doesn't describe how to tell Xprint which
>> family/class a particular printer belongs to. If I have a list of
>> printers specified in the way above, how does Xprint know what model
>> each printer is, so we can use model-specific configurations?
>>
>
> I think you want to
> use /usr/share/Xprint/xserver/C/print/attributes/printer. See the line
> *xp-model-identifier: PSdefault
> If I read it right, you change it to things like
> name1.xp-model-identifier: PSdefault
> name2.xp-model-identifier: CANONBJ10E-GS
> name3.xp-model-identifier: HPDJ1600C
> etc
> where the various models are defined
> in /usr/share/Xprint/xserver/C/print/models.
OK, thanks, I'll look more into this when I get basic Xprint operation
working correctly.
Cheers
Toby
More information about the Xprint
mailing list