HPLIP inside a distrobox (HP printer, printing works but scanning doesn't)
Printer model: HP LaserJet Pro MFP M127fs
Without the hplip drivers I can print but cannot scan, so I am trying to get scanning to work. Overlaying hplip with
rpm-ostree
does not work since the hplip gui wants to do the installation of drivers itself, which due to bazzite being an atomic distro is not an allowed operation, therefore hplip must go inside a container.
I have created a debian:stable container and installed the hplip-gui
package in it. Here is what happens when I try to run hp-toolbox
(printer is connected over usb): https://pastebin.com/f9wbHFY0 (pastebin due to being too long). The key error seems to be error: Unable to connect to dbus system bus. Exiting.
but googling reveals nothing and I cannot understand why this error is happening or what it means.
Anyone have any idea what to do after this?Pastebin
```bashumnikos@bazzite:~$ distrobox stop hplipDo you really want to...
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
Solution:Jump to solution
DBUS_SYSTEM_BUS_ADDRESS=unix:path=/run/host/var/run/dbus/system_bus_socket hp-toolbox
53 Replies
hplip is part of bazzite though?
what?
it definitely isn't.
...oh wait
that particular command isn't, but I seem to have other hp commands...
yeah have you tried to just add the printer through the kde/gnome gui?
it is listed there
and I can print
but I can't scan
the gnome scanner tool detects my printer but then when I hit the scan button immediately errors
saying it can't connect to the scanner
with no further elaboration on why
lemme get a screenshot real quick...
here
hm.
@HikariKnight any further wisdom?
i hate printers, especially multifunction ones from hp 😂
i am digging around a bit though
I tried
hp-plugin
to update stuff but it just says "installation failed" after being given admin password
which is basically as far as I got when trying to overlay hplip-gui anyway
I've used this same printer on a debian machine before with no problems
with hplipall im finding so far by searching is that people dislike hplip
I do not like it either
just for sanity checking you have tried a different port right?
i have like 0 experience with hp printers on linux (might have something to do that i have avoided them like the plague or the fact i print maybe 1 page per year...)
did just now
same thing
it's a laser printer, and it accepts bootleg cartridges
doesn't even connect to wifi
ah
as far as printers go this is a good one
only thing i got was that it needs to download the hp plugin for scanner support
whats the error when you try download that?
probably doesnt like that it is on atomic
yep.
therefore distrobox
except it doesn't like that either
yeah and there you get the plugin but you dont get access to the printer
.......is the hplip running on the host interfering with the hplip running in the box
not a service that runs
well there's cups that runs
and probably other things?
but without cups on the host routing print requests into the distrobox might be impossible
only thing i can think of is download the scanning plugin in distrobox (fedora 40) and try fish it out and put it in the appropriate
/usr/local
folders and then cross your fingers and pray
that or fishing out the files and package them as an rpm you keep for yourself
that you then install with rpm-ostree
wish i had an easier answerI'll wait for others to answer
could also get fedora workstation on a live usb and just confirm that is whats missing by trying to add it in the live environment and download the plugin 🤔
if hplip comes preinstalled on bazzite I'd reckon it not working is actually a bug and not just a question, maybe?
that too but most likely we cant redistribute those proprietary plugin files by running the hp-plugin-download and answering the prompts in CI @Kyle Gospo
try a rootful distrobox
i keep forgetting those exist
now I have to figure out how to do that without being in the sudoers file...
You make the distrobox as a rootful box
You can't make an existing box rootful
distrobox create --root blah
box buddy might also have the button when making a new distroboxbut
distrobox enter
has a --root
flag :thonk:For entering a rootful box
I see.
ah it just creates the box under the root user
so I could've just done
su
and then distrobox there.
wait, question, what will the rootful box actually do that's different from a regular boxPotentially fix your dbus issue
If that doesn't work your only option would be to make a custom image
never run distrobox with sudo
use the root flag
...okay I think what might actually work is make an init box
full access to everything on your host
argh I don't want to make more containers if I don't even know by what mechanism it might help
what even does the error mean
the error means it cant communicate with the scanner
I/O error
yes but more specifically it means the dbus doesn't even exist
the folder
/run/dbus
does not exist in the box
hoooly shitSolution
DBUS_SYSTEM_BUS_ADDRESS=unix:path=/run/host/var/run/dbus/system_bus_socket hp-toolbox
Nice
so rootfull worked?
nope
this is a rootless box
it's not an init box either
so just needed env var
yep
well, let's see if it can scan
immediately prompts for a driver install...
probably the plugins
yep
plugin install failed...
but it prompted me for root password for no reason
so I'll just try
sudo hp-plugin
success
it can scan!
but weirdly it can't from the hp-toolbox gui
it scanned from the hp-scan
command
and now for the ultimate test
can I somehow hook up the gnome scan utility to the distroboxinstall it in distrobox and run it there i think
should be easiest, yeah
yep, it works
everything is super.