Categories
Uncategorized

Printing with CUPS and KDE4

Printing in linux has always been a particular headache for me, and probably many users.There is a myriad of systems that have to talk to each other to get it to work. You have CUPS which takes care of making your computer talk to the printer, various packages like foomatic and ghostscript that you may or may not need so that CUPS can talk to the printer itself. Then you have the printer configuration frontends under GNOME, KDE, or whatever desktop environment you might be running that, in theory, hook the applications you use up with CUPS.

For a couple of years now, I’ve been running ArchLinux with a KDE desktop. I’ve succesfully configured CUPS to print, but I could never actually print from an applicatoin, like Okular, KDE’s PDF viewer. Whenver I used KDE’s system printer configuration utility to add a printer, the options on the left simply listed “Other” with a field for my printers Device URI (yeah – what is that for a printer, exactly?). KDE could not talk to CUPS, even though CUPS was configured correctly, and didn’t have any access restrictions.

Poking around in /etc/cups/cups.conf, I saw the following lines:

# Socket disabled by default it makes KDE fail on CUPS
# Listen /var/run/cups/cups.sock

I uncommented the Listen line, and presto, my CUPS printer is visible in KDE! This comment must be for an older version, I’m running 4.6.2.