Making autoprinter support work

John (J5) Palmieri johnp at redhat.com
Tue Dec 13 07:06:41 PST 2005


On Tue, 2005-12-13 at 14:13 +0100, Martin Pitt wrote:
> Hi!
> 
> gnome-volume-manager offers an 'autoprinter' command, i. e. something
> that is run when a new USB printer is attached. It would be sweet to
> call gnome-cups-add in this case to ease the setup for novice users.
> 
> However, this requires two things:
> 
>  * hal currently does not set the 'printer' capability. This is easy
>    to achieve with a small fdi that gives that capability to an 'USB
>    Printer Interface'. Is there already a common solution for that?
>    David, do you plan to add something like this to the upstream
>    version?	
> 
>  * Does anybody know a robust method how to check whether a particular
>    printer (identified by its hal UDI) is already configured in Cups?
> 
> Thanks in advance for any idea!

g-v-m is really the wrong way to go about it since configuring printers
is something the system and the session need to collaborate on (i.e. it
is not as simple as launching an app).  See how we do it in fedora for
the beginnings of how printer configuration should work.  I plan on
writing up a specification from my experiences with printer
configuration.  Basically it would provide a d-bus interface and hal
methods for managing printer additions and removals.

As for checking if it is already configured in cups you would need a HAL
backend for cups, one of which can be found in the hal-cups-utils srpm
package in fedora.  It uses the HAL udi in place of the device file.

-- 
John (J5) Palmieri <johnp at redhat.com>



More information about the hal mailing list