How can I tell which package provided my printer driver?

Asked by Rolf Leggewie

I understand that printer drivers are copied to /etc/cups/ppd/ and get a file name corresponding to the name the printer is given in cups. I wonder where those files are copied from? The ppd are just text files and I can look inside to understand a bit about where they roughly came from. But what if I want to know exactly? Another way one could put my question is "where does 'lpinfo -m' look for drivers when compiling the list of available drivers on the system?" lp-info apparently relies on cups-driverd for this task. The cups-driverd man page mentions the /usr/share/cups/model and /usr/lib/cups/driver directories, but that does not seem to be accurate information. The latter only contains two binaries, the former does not even exist and /usr/share/cups has all kinds of stuff, printer drivers doesn't seem to be among them.

I'm asking because I want to report a problem with a printer driver for one of my printers. /usr/share/ppd/ has a bunch of drivers, but it looks like other sources for drivers find their way into lpinfo -m as well.

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu cups Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

You could use apt-file, it will take a long time as it needs to catalogue every file in every package from your available repos to then be searched but it WILL find the file

sudo apt-get install apt-file; sudo apt-file update

This will take a while (10-20 mins or so)

Then you can run

sudo apt-file search filename

and you will be shown the package name(s) which contains that file.

Revision history for this message
Rolf Leggewie (r0lf) said :
#2

actionparship, thank you for your comment. Unfortunately, it doesn't solve the issue. If the name of the file was known, "locate $filename" would likely be sufficient. The problem is that the name of the original driver file is not known.

Revision history for this message
Launchpad Janitor (janitor) said :
#3

This question was expired because it remained in the 'Open' state without activity for the last 15 days.

Revision history for this message
Rolf Leggewie (r0lf) said :
#4

Still looking for an answer

Revision history for this message
Pascal De Vuyst (pascal-devuyst) said :
#5

Printer drivers (ppds) can either be static ones or dynamically generated.

Just check the *NickName from ppds in /etc/cups/ppd, in my case:
$ grep '*NickName:' /etc/cups/ppd/HP_LaserJet_4000_Series.ppd
*NickName: "HP LaserJet 4000 Series Postscript (recommended)"

It should match with an entry from lpinfo -m:
$ lpinfo -m | grep "HP LaserJet 4000 Series, Postscript-HP 20081112 (OpenPrinting $ lpinfo -m | grep "HP LaserJet 4000 Series Postscript (recommended)"
lsb/usr/hplip/HP/hp-laserjet_4000_series-ps.ppd HP LaserJet 4000 Series Postscript (recommended)

Which gives you an idea about where it comes from, in my case a static ppd from /usr/share/ppd/hplip/HP/hp-laserjet_4000_series-ps.ppd

This file is provided by the hplip-data binary package:
$ dpkg-query --search hp-laserjet_4000_series-ps.ppd
hplip-data: /usr/share/ppd/hplip/HP/hp-laserjet_4000_series-ps.ppd

Please provide the NickName of your printer and the matching lpinfo -m entry.

Can you help with this problem?

Provide an answer of your own, or ask Rolf Leggewie for more information if necessary.

To post a message you must log in.