libkdeprint

Andreas Pakulat apaku at gmx.de
Sat Nov 3 15:49:23 GMT 2007


On 03.11.07 15:26:12, John Layt wrote:
> The bigger problem is that even if CUPS is installed, there's no guarantee 
> that the CUPS version of lpr is installed, and thus that it's safe to pass 
> through the CUPS specific options using -o.  I've looked at how various 
> distros package things and (no surprise) there is no consistant way we can 
> tell if it is installed or not via checking a file exists, and no way I can 
> see to query lpr itself as to its origins.  Instead, I've put a fallback in 
> place, if CUPS is detected but the lpr returns an error code, blindly try 
> again but without the CUPS options.

Hmm, can't you just check wether lp exists and use that for printing to
CUPS? That probably means changing a few options from lpr, but that one
will always exist if a cups client is installed. And if you can't find
it use lpr without cups options.

Andreas

-- 
Next Friday will not be your lucky day.  As a matter of fact, you don't
have a lucky day this year.




More information about the kde-core-devel mailing list