hal-cups-utils does not auto-setup printers on Ubuntu Gutsy

Bug #127841 reported by Till Kamppeter on 2007-07-23
12
Affects Status Importance Assigned to Milestone
hal-cups-utils (Ubuntu)
Medium
Unassigned
system-config-printer (Ubuntu)
Medium
Unassigned

Bug Description

Binary package hint: hal-cups-utils

I have installed hal-cups-utils and system-config-printer (both in main) and in addition python-foomatic (from universe, missing dependency for hal-cups-utils).

With all this installed I was expecting Plug'n'Print via HAL: A printer is plugged into the USB and then a program (/usr/lib/hal-cups-utils/hal_lpadmin from hal-cups-utils) is started to automatically create a print queue.

There seem to be two problems:

1. HAL seems not to start /usr/lib/hal-cups-utils/hal_lpadmin when plugging a printer

2. Running "sudo /usr/lib/hal-cups-utils/hal_lpadmin --add" manually gives an error message in /var/log/syslog, which looks like that a library is missing or out of date:

----------
Jul 24 00:07:52 till-laptop hal_lpadmin: add
Jul 24 00:07:52 till-laptop hal_lpadmin: URIs: ['hal://']
Jul 24 00:07:52 till-laptop hal_lpadmin: File "/usr/lib/hal-cups-utils/hal_lpadm
in", line 198, in main h = HalLpAdmin()
Jul 24 00:07:52 till-laptop hal_lpadmin: File "/usr/lib/hal-cups-utils/hal_lpadm
in", line 172, in __init__ self.addPrinter()
Jul 24 00:07:52 till-laptop hal_lpadmin: File "/usr/lib/hal-cups-utils/hal_lpadm
in", line 185, in addPrinter printer.add()
Jul 24 00:07:52 till-laptop hal_lpadmin: File "/usr/lib/hal-cups-utils/hal_lpadm
in", line 100, in add f = foomatic.Foomatic()
Jul 24 00:07:52 till-laptop hal_lpadmin: AttributeError: 'module' object has no
attribute 'Foomatic'
----------

I did not find any class named "foomatic" or method named "Foomatic" in any of the Python libraries imported by /usr/lib/hal-cups-utils/hal_lpadmin.

How does this work in Xubuntu Gutsy (where it seems to be a standard feature) and how do I get it to work in Ubuntu Gutsy?

Changed in hal-cups-utils:
importance: Undecided → Medium
status: New → Confirmed
Jani Monoses (jani) wrote :

I have not tested this much in Xubutu Feisty either. I am not yet running Gutsy, not much time for Ubuntu these days.
There's a newer upstream version, feel free to upload that to Gutsy.
It is by no means locked by the Xubuntu team, any help is appreciated. If you make it work for Ubuntu it will definitely work
in Xfce as well. I hope I'll have some time later in the Gutsy timeframe to help out.

thanks

Till Kamppeter (till-kamppeter) wrote :

Now I have fixed at least all Python and library errors. Try the packages from (packages will appear in Gutsy soon):

http://www.linux-foundation.org/~till/tmp/ubuntu/gutsy/system-config-printer/
http://www.linux-foundation.org/~till/tmp/ubuntu/gutsy/hal-cups-utils/

Note that you also need to update system-config-printer

What is still not working for me is that HAL seems not to start the /usr/lib/hal-cups-utils/hal_lpadmin when I plug in a USB printer (in my test HP LaserJet P2015).

Changed in system-config-printer:
importance: Undecided → Medium
status: New → Fix Committed
Changed in hal-cups-utils:
status: Confirmed → In Progress
Till Kamppeter (till-kamppeter) wrote :

Now I have solved the problem of HAL not calling the hal_lpadmin script. HAL requires all scripts to be in certain directories, even if they are called with an absolute path. See

http://people.freedesktop.org/~david/hal-spec/hal-spec.html#device-properties-info-callouts

I have fixed this now by moving hal_lpadmin to /usr/lib/hal/scripts/. Now both my HP LaserJet P2015 and my HP PhotoSmart A717 get set up automatically by simply plugging them in.

Packages for testing are here:

http://www.linux-foundation.org/~till/tmp/ubuntu/gutsy/hal-cups-utils/

Changed in system-config-printer:
status: Fix Committed → Fix Released
Changed in hal-cups-utils:
status: In Progress → Fix Committed
Till Kamppeter (till-kamppeter) wrote :

hal-cups-utils (0.6.11-0ubuntu2) gutsy; urgency=low

  * debian/rules, debian/patches/00_fix_libexec.patch: Moved hal_lpadmin
    from /usr/lib/hal-cups-utils/ to /usr/lib/hal/scripts/ to be compliant
    to HAL specificationas
    (http://people.freedesktop.org/~david/hal-spec/hal-spec.html). Now
    the script gets actually called by HAL and so Plug'n'Print (automatic
    setup of a printer when plugged in) really works under Ubuntu (fixes
    https://blueprints.launchpad.net/ubuntu/+spec/automatic-printer-conf
    by having hal-cups-utils installed, LP: #127841).

 -- Till Kamppeter <email address hidden> Mon, 30 Jul 2007 12:45:29 +0100

Changed in hal-cups-utils:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers