Lux (ID=lux, ID_LIKE=debian) is not in HPLIP’s distros.dat, so the official .run installer aborts with unknown distro. After extracting the tarball, patch the tree so Lux is reported as Debian 12, and switch the Debian recipe from su to sudo (Lux desktops use sudo).
# 1) Lux → Debian 12
python3 - <<'PY'
from pathlib import Path
p = Path("base/utils.py")
t = p.read_text()
old = 'def get_distro_name(passwordObj = None):\n log.debug("Determining distro...")\n'
new = '''def get_distro_name(passwordObj = None):
try:
import distro as _d
if _d.id() == "lux" or "lux" in (_d.name() or "").lower():
return ("debian", "12")
except Exception:
pass
log.debug("Determining distro...")
'''
assert old in t
p.write_text(t.replace(old, new, 1))
print("patched", p)
PY
# 2) Debian profile: su → sudo
python3 - <<'PY'
from pathlib import Path
import re
p = Path("installer/distros.dat")
t = p.read_text()
m = re.search(r"^\[debian\]\n(.*?)(?=^\[(?!debian:))", t, re.M | re.S)
sec = m.group(0)
new = sec.replace("su_sudo=su", "su_sudo=sudo")
new = re.sub(r'su -c "([^"]+)"', r"sudo \1", new)
new = new.replace(
'package_mgr_cmd=su -c "apt-get install --force-yes -y $packages_to_install"',
"package_mgr_cmd=sudo apt-get install --assume-yes $packages_to_install",
)
p.write_text(t[: m.start()] + new + t[m.end() :])
print("patched", p)
PY
./hplip-installOr use the registered helper: hplip-lux-debian-spoof /path/to/hplip-3.26.4
- HPLIP’s Debian list stops at 12; Lux 2 is Debian 13–based (
trixie), so spoofing 12 is intentional. - On recent GCC/Python, the interactive installer may still fail at compile time; a
./configure && make && sudo make installpath with permissiveCFLAGS(and optionally--disable-scan-buildif you already usesane-airscan) is more reliable. - Driverless IPP +
sane-airscanoften already print/scan HP Smart Tank 580–590 without HPLIP; this hack is for native HPLIP / newer model tables (e.g. 3.26.4).
Tested on Lux 2 (Bellatrix) with HPLIP 3.26.4.