[cups.general] com.redhat.NewPrinterNotification

Tim Waugh twaugh at redhat.com
Tue Jan 4 04:57:43 PST 2011


On Mon, 2010-12-27 at 23:18 -0800, Chris wrote:
> I'm working on a project that involves creating a daemon that updates
> a set of avahi services in step with the cups printers. I want to make
> it as seamless as possible by having the daemon detect when a new
> printer is added and generate the service files there and then. In
> python, running both via sudo and as a regular user, connected to the
> system bus, I was unable to get any callback from the dbus signal when
> it fired. Anyone have any ideas as to why this could be? Do I need to
> somehow 'log in' to cups and register my pid to receive these signals,
> or edit a policykit entry?

First, the details of what you are after:

The "com.redhat.NewPrinterNotification" interface is not what you are
looking for.  I think you were trying to find com.redhat.PrinterSpooler,
specifically its QueueChanged signal.

But did you know about the "dbus" CUPS
notifier, /usr/lib/cups/notifier/dbus?  It uses the
path /org/cups/cupsd/Notifier, and the interface
org.cups.cupsd.Notifier, and has signals named PrinterAdded and
PrinterDeleted.

In order to use this, just create a subscription (using
IPP-Create-Subscription) for "dbus:///".

However, work is under way to have CUPS register printers with Avahi
natively...

Tim.
*/

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part
URL: <https://lists.cups.org/pipermail/cups/attachments/20110104/22f0cf9b/attachment.bin>


More information about the cups mailing list