HAL and Cups

David Zeuthen david at fubar.dk
Tue Oct 11 07:14:04 PDT 2005


On Tue, 2005-10-11 at 10:42 +0200, Davide Ferrari wrote:
> Hello list
> 
> probably you know the standard cups behaviour of putting the printer
> in a stopped status when a printer is turned off. The bad thing is if
> I turn again the printer on, cups DOES NOT start it again...and from
> cups man pages and website it seems to me that there's no way to do it
> with a config option or whatever.
> So since this is IMO a needed function in a true desktop environment
> (and in fact I'm experiencing problems with it), I was wondering if
> there's something that I could do in the HAL realm, such as executing
> a script to restart the cups printer when HAL detects a printer
> powered on (it's an USB printer, FYI).

CUPS is an abstraction layer for printing. HAL will only notify you if
USB devices that are printers are plugged in and out. However, you can
use HAL to easily catch these signals on either the system-level
(through callouts) or desktop-level (through listening to D-BUS signals)
so what it seems you want is integration between HAL and CUPS, yes? As a
matter of fact, we have this in Fedora but this is our own set of
scripts. I believe SUSE has their own scripts too.

Ideally, someone would implement this *upstream* in GNOME and KDE so all
distros can do the same and we don't have to duplicate effort and work
on what essentially are the same bugs. If you look at GNOME volume
manager (which probably will, and should, be renamed to GNOME Hardware
Manager) there are hooks for running programs when this happens. Of
course, IMHO this is a crazy way to implement it but it's a good start
if you want to get your hands dirty with this :-)

Cheers,
David




More information about the hal mailing list