Printing on HP printer without running hplip*.run

Asked by Adam Walker on 2019-12-05

Is there a way to use HP printers (specifically an HP LaserJet Pro m102w) without running the hplip installer executable?

Is there a place where we can get the .ppd files instead of the whole executable?

Is there a way to extract the .ppd files from the hplip*.run, without running the whole executable?

Ubuntu 18.04 LTS does not print using this printer out of the box, even though it recognizes the printer.

I'm basically trying to get my printer working without running closed-source software. Already contacted HP helpdesk with zero help - I should have recorded the call, it was quite funny.

Question information

Language:
English Edit question
Status:
Answered
For:
HPLIP Edit question
Assignee:
No assignee Edit question
Last query:
2020-06-08
Last reply:
2020-06-08
brian_p (claremont102) said : #1

> Is there a way to use HP printers (specifically an HP LaserJet Pro
> m102w) without running the hplip installer executable?

Yes:

  https://wiki.debian.org/CUPSQuickPrintQueues
  https://wiki.debian.org/CUPSDriverlessPrinting

> Is there a place where we can get the .ppd files instead of the
> whole executable?

  apt install printer-driver-hpcups

But with driverless printing the HPLIP PPDs are unneeded.

> Is there a way to extract the .ppd files from the hplip*.run,
> without running the whole executable?

Get the original source file from a Ubuntu archive.

> I'm basically trying to get my printer working without running
> closed-source software.

Driverless printing will give you this, but so will HPLIP.

--
Brian.

shivani mandora (shivani1708) said : #2

Hi,

In order to get ppd files, you need to install hplip driver from the portal.

Pravin (pkmori) said : #3

Hi,

Can you provide the link where to get those ppd files ?

Pravin Mori

Adam Walker (adamwalker196) said : #4

Hi Brian,

Thank you for your helpful message.

Even with "apt install printer-driver-hpcups", my specific printer is not being recognized (HP LaserJet Pro m102w). HPs config tools suggest that I need to download a proprietary plugin, and when I try to download it, the UI indicates that "plugin cannot be key verified" - thus I cannot or install it.

Furthermore, I've tried driverless printing with essentially all the possible options over an entire afternoon to no avail. Not a single one worked. Not even a test page.

On a different Ubuntu machine with less stringent security requirements, I had installed hplip and the printer worked fine. Can you think of a way where I can achieve the same effect without installing hplip?

I would extract the ppd files from a .deb file, but hplip comes with a .run, so that's not possible. My current thought is to spin up a virtual machine, install hplip, figure out the ppd file it's using and manually extract it to install on the secure system.

Any thoughts are appreciated,
Best,
Adam

Manfred Hampl (m-hampl) said : #5

In addition to the *.run file HPLIP is also distributed as tar.gz file.
That allows extracting the PPD file (if the one you need is contained in it)

Adam Walker (adamwalker196) said : #6

Thank you for you message. I've downloaded the hplip tar.gz file and extracted the ppds. I haven't been able to find a .ppd file that matches my printer specification (HP LaserJet Pro m102w). There is no ppd file with the string m102w in it.

Is it another file that I should be using, and if so, what would that file be?

Manfred Hampl (m-hampl) said : #7

Have you tried
hp-laserjet_m101-m106.ppd
It contains the string
*Product: "(HP LaserJet m102w)"

Adam Walker (adamwalker196) said : #8

- I've downloaded "hplip-3.20.5.tar.gz"
- Also installed "apt-get hplip"
- Used the "hp-laserjet_m101-m106.ppd" file.
Cannot print test page, or any other printing job. Same behavior if I don't manually add the ppd file. (Incidentally Ubuntu recognizes the printer automatically as m101-m106 upon add printer, so I'm guessing it uses the pdd automatically?)

Anyway. Here's what the syslog says:

---
hpcups[16511]: prnt/hpcups/Hbpl1.cpp 52: Hbpl1 constructor : m_szLanguage = HBPL1

hpcups[16511]: common/utils.c 69: unable to open /var/lib/hp/hplip.state: No such file or directory

hpcups[16511]: common/utils.c 119: validate_plugin_version() Failed to get Plugin version from [/var/lib/hp/hplip.state]

hpcups[16511]: common/utils.c 157: Plugin version is not matching

hpcups[16511]: prnt/hpcups/HPCupsFilter.cpp 486: m_Job initialization failed with error = 48

hp[16512]: prnt/backend/hp.c 919: ERROR: null print job total=0
---

Cannot find hplip.state file in the tar.gz file (I'm guessing it's auto constructed or something?).

Any ideas?
Thanks
-A

Manfred Hampl (m-hampl) said : #9

You probably need a binary plugin that is provided separately.
https://developers.hp.com/hp-linux-imaging-and-printing/plugins
You have to make sure that it is the same version as your HPLIP installation.

(this, however, leads to he case that you do not run hplip.run but plugin.run)

Adam Walker (adamwalker196) said : #10

hmmm... Yes, running a proprietary plugin that I cannot inspect the code of defeats the purpose of the whole thing. That being said, at least running the plugin by itself shouldn't require sudo privileges (right?). And perhaps could be locked into a sandbox like firejail.

Is there any way to inspect the binary plugin's code... Or get the printer running without running the plugin... Or an open source substitute?

Also, how can I figure out which is the right plugin file?

I'm genuinely surprised that getting something as basic and fundamental as a printer working for a major linux distro would have such a big security vulnerability. Am I overreacting or missing something?

Also... Why is hplip required to run with sudo? Is there a away to inspect what it will do?

Manfred Hampl (m-hampl) said : #11

If you do not want to install HP software that you cannot check before, then you have to use other possibilities, e.g. driverless printing. See the links in comment #1

Can you help with this problem?

Provide an answer of your own, or ask Adam Walker for more information if necessary.

To post a message you must log in.