GNOME Bugzilla – Bug 574065
Setup printers
Last modified: 2019-03-20 10:35:31 UTC
We'd need to do something similar to what hal-cups-utils does: https://fedorahosted.org/hal-cups-utils/ When the device is setup, we can call the com.redhat.NewPrinterNotification API, passing the device URI as the 'name' argument to NewPrinter(). When the device is removed (eg. through the preferences), we'd need to remove the queue. When the bluez cups backend can support getting the IEEE1284 for a specific device, we can use something similar to hal-cups-utils (see cupshelpers.ppds.PPDs.getPPDNameFromDeviceID) to guess the PPD for it. Then we'd call: lpadmin -p "${NAME}" -v "${URI}" -m "${PPDNAME}"
Created attachment 130151 [details] Example use of cupshelpers.ppds.PPDs.getPPDNameFromDeviceID 2 problems I could see. It's very very expensive to run (although we can work around that in the UI, is there a cache somewhere?), and it prints out debug.
We could make this easier by installing a bluez driver that checks for the HCRP UUID, and install a GetProperties for it. We could even have it give the PPD name by using the D-Bus helper script. So on the gnome-bluetooth side we would: - check for HCRP - get the properties on the Printer service - launch lpadmin (or equivalent)
Actually, see: https://fedorahosted.org/system-config-printer/ticket/207 You'll need this patch to bluez: http://thread.gmane.org/gmane.linux.bluez.kernel/5879 This allows system-config-printer to do most of the work.
BlueZ patch was updated. Last udev-configure-printer patch is at: https://fedorahosted.org/system-config-printer/ticket/211 Still needed is a bluetoothd plugin to launch "udev-configure-printer add/remove bdaddr", and some integration in gnome-bluetooth (offer a "Setup printer" button in properties, disabled if queue is already available, launch "New printer"[1] when clicked). [1]: https://fedorahosted.org/pipermail/system-config-printer-devel/2010-April/000003.html
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gnome-bluetooth/issues/12.