Hosed by hic-CUPS

I wrote a blog entry a while ago on setting up the Canon Pixma MP500 on linux. Well, I upgraded CUPS, and everything went to shizzle. It just stopped working, with no obvious explanation.

Tracing back through my original frustrations, I remembered that the single most vexing problem was that of the user running the CUPS programs. After a wasted evening digging around, I discovered that CUPS 1.2 changed the way CUPS runs its programs, in the name of enhanced security:

RunAsUser Removed; The insecure RunAsUser mode has been removed in favor of OS mechanisms such as SELinux
http://www.cups.org/documentation.php/whatsnew.html

Setting

User root

in /etc/cups/cups.conf for some reason is not able to override the user running the programs. Since cifmp500 insists on being run as root (as I mentioned previously), printing will always fail in CUPS 1.2 with a cryptic debug log to /var/log/cups/error_log:

Error: invalid printer model name

The only solution I had was to roll back to CUPS 1.1 . I followed the ArchWiki directions on building obsolete packages to create a package based on version 1.1.23 . Unfortunately, I ran into an issue with the PNG library using a deprecated function. I did not want to downgrade libpng, so I resolved the issue (hopefully) with a patch. Here’s the CUPS 1.1.23 package source with the PNG patch. To build and deploy:

% tar xvfz cups.tar.gz
% cd cups
% makepkg
% su
% pacman -R cups
% pacman -A -f cups-1.1.23-5.pkg.tar.gz

I still had to go back and twiddle the user setting in cupsd.conf … but an invocation of cngpij finally woke up the printer and did something! Hooray!

Guess what I’m about to do right now?

/etc/pacman.conf:

IgnorePkg   = kernel26 cups

2 Responses to “Hosed by hic-CUPS”

  1. SomeName Says:

    I know that I am replying to a blog-entry which is about 2.5 years old. The accompanied problem however is not.

    I just tried to install the “Canon PIXMA MP550″ and after a rather long search for suitable drivers (Gutenprint, etc. pp.) I finally chose to install the drivers provided by Canon: “cnijfilter-common-3.20-1.i386.rpm” and “cnijfilter-mp500-3.20-1.i386.rpm”.

    This, of course, didn’t work (same problem: CUPS accepted printing job but didn’t print) and after digging deep through log files and juggling config variables I finally tracked the ostensible culprit in the CUPS error log file:
    “Error: invalid printer model name”

    (It was right about then that I found this blog entry)

    So I had the same problem but I didn’t want to downgrade CUPS, as was suggested here. So I “strace”d the program “cifmp550″ and found the real culprit:
    “$> strace ./cifmp550

    brk(0×8077000) = 0×8077000
    open(“/usr/lib/bjlib/cifmp550.conf”, O_RDONLY) = -1 EACCES (Permission denied)
    write(2, “Error: invalid printer model nam”…, 34) = 34
    close(0) = 0
    exit_group(0) = ?”

    So in my case, instead of downgrading CUPS, a simple
    $> chown lp:lp /usr/lib/bjlib/cifmp550.conf
    sufficed.

    I hope this helps people who have the same problem and happen to stumble onto this page… and thanks to you Mr. Chai for linking the error message to the misbehaving program (else my search had probably continued).

  2. gyrm Says:

    @SomeName: Thanks for the post. For the record, Ubuntu 9.10 comes with a driver that works for the MP500 out of the box, which I was very happy to see!

Leave a Reply


Bad Behavior has blocked 77 access attempts in the last 7 days.