Restricted kprinter view

Michael Goffioul goffioul at imec.be
Tue Aug 12 11:52:10 CEST 2003


Dave Shield wrote:

> A quick question about 'kprinter'
> 
> Is there any way to configure it (at the system level) to only
> display a subset of the available printers for selected users?
> I.e. a global (fixed) "filter", or something similar?

This is not possible at KDE level, but this wouldn't make much
sense to do it at KDE level only, as any other app would have
access to all printers. So maybe you should look into CUPS
configuration itself. You cannot "hide" printers to users, but
you can restrict access to some printers (allow or deny access
to specific users of group of users). See for example
http://www.cups.org/sam.html#4_3_7

What you can do with KDE (but it can easily worked around) is
to enable the printer filtering globally and pre-define the
filter in the global KDEPrint configuration file. Note however
that clicking on the "filter" button in the print dialog would
show all printers. This feature was intended to be used by the
user himself, to help him to locate printers easily (when you
have a large park of printers).
Printer filtering is based on the "Location" (CUPS-only) and
on its name: both constraint are OR'ed. The location trick is
a regular expression, while the name trick is a simple list
of printers. Example of kdeprintrc:

[Filter]
LocationRe=Students*
Printers=lp1,lp2,lpstudents

But the enabling of the printer filter is a per-application
attribute. This means that you should enable printer filtering
in all global config files, using the following lines:

[KPrinter Settings]
FilterEnabled=true

As I said, this is just a complicated workaround, as this feature
was not intended for that purpose.

> Failing that (or ideally as well), is there any way of
> controlling which printer is selected by default?
> It seems to tend to be the first (alphabetically).
> It would be more helpful for us if this was the system
> default printer, or else could be set somewhere.
>    Is this possible - if so how?

Normally, using the KDEPrint settings dialog (accessible from
the print manager, or the print dialog's "System Options" button)
you can specify that the printer selected by default in the
print dialog is the default printer. However, it might not work
correctly. Just try.

Michael.

-- 
------------------------------------------------------------------
Michael Goffioul		IMEC-DESICS-MIRA
e-mail: goffioul at imec.be	(Mixed-Signal and RF Applications)
Tel:    +32/16/28-8510		Kapeldreef, 75
Fax:    +32/16/28-1515		3001 HEVERLEE, BELGIUM
------------------------------------------------------------------




More information about the kde-print mailing list