Setting up hplip With Graphical Interface

I have openSUSE LEAP 15.2 (64-bit) and an HP Officejet Pro 8610.
I installed hplip 3.20.6 via YaST2 and want to set up my printer with hplip graphical interface.

When I go through the setup process, I get a window that states:

You do not have permission to add a printer. You need authentication.

If I enter my username and password, it is not accepted. Only if I use the root username and password it is accepted.
Knowing that I should never use root to login, I am left wondering what I need to do in order to set up the printer…

Enter your root (administrator) credentials as requested.

If it becomes necessary, another way HP’s can be installed is within YAST in the printer section. Identify the printer, then install the drivers, then reboot, and my HP printers have all done well.

Good luck.

If you’re launching hplip from a Desktop menu item, the properties for that shortcut should be modified to automatically invoke with root permissions. If this is how you launched hplip, is this an entry which was set up automatically by the hplip installation or something you custom created? If it was part of the hplip installation, The proper behavior is for you to be prompted for root credentials and you provide it… This should be OK and is not the same as logging into your system as root because the scope of root permissions used is very different.

Another way to get around being prompted for permissions is to open an elevated console first, and then launch your hplip application.

TSU

True you should not log into a GUI desktop as root. But you can become root for the purpose of installing packages to the system which requires root permissions or other system level chores. Two different things.

Ok, I’ve done as you suggested. Hplip found the network printer and it is set up. But I just tried to print a page and nothing happens…
I know that the printer works just fine because I have Microsoft Windows 10 installed on the same PC and everything prints without a problem.

I tried to print a test page from within hplip but that too did not print. So, maybe there is some incompatibility with LEAP 15.2?

Run the following commands, capture the output, and report back here…

lpstat -t
hp-check -r

Hello Deano. Here are the outputs.

~> lpstat -t
scheduler is running
system default destination: HP_Officejet_Pro_8610
device for HP_Officejet_Pro_8610: hp:/net/HP_Officejet_Pro_8610?ip=192.168.1.75
HP_Officejet_Pro_8610 accepting requests since Sat 04 Jul 2020 04:10:32 PM CDT
printer HP_Officejet_Pro_8610 is idle.  enabled since Sat 04 Jul 2020 04:10:32 PM CDT
HP_Officejet_Pro_8610-20 tb              164864   Sat 04 Jul 2020 08:11:24 PM CDT
HP_Officejet_Pro_8610-21 tb              230400   Sat 04 Jul 2020 08:12:58 PM CDT

~> hp-check -r
Saving output in log file: /home/tb/hp-check.log

HP Linux Imaging and Printing System (ver. 3.20.6)
Dependency/Version Check Utility ver. 15.1

Copyright (c) 2001-18 HP Development Company, LP
This software comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to distribute it
under certain conditions. See COPYING file for more details.

Note: hp-check can be run in three modes:
1. Compile-time check mode (-c or --compile): Use this mode before compiling the HPLIP supplied tarball (.tar.gz or .run) to determine if the proper dependencies are installed to successfully compile HPLIP.                                                                 
2. Run-time check mode (-r or --run): Use this mode to determine if a distro supplied package (.deb, .rpm, etc) or an already built HPLIP supplied tarball has the proper dependencies installed to successfully run.                                                          
3. Both compile- and run-time check mode (-b or --both) (Default): This mode will check both of the above cases (both compile- and run-time dependencies).                                                                                                                     

Check types:                                                                                                                                                                                                                                                                   
a. EXTERNALDEP - External Dependencies                                                                                                                                                                                                                                         
b. GENERALDEP - General Dependencies (required both at compile and run time)                                                                                                                                                                                                   
c. COMPILEDEP - Compile time Dependencies                                                                                                                                                                                                                                      
d. [All are run-time checks]                                                                                                                                                                                                                                                   
PYEXT SCANCONF QUEUES PERMISSION                                                                                                                                                                                                                                               

Status Types:
    OK
    MISSING       - Missing Dependency or Permission or Plug-in
    INCOMPAT      - Incompatible dependency-version or Plugin-version

warning: 3-15.2 version is not supported. Using 3-15.1 versions dependencies to verify and install...

---------------
| SYSTEM INFO |
---------------

 Kernel: 5.3.18-lp152.19-default #1 SMP Tue Jun 9 20:59:24 UTC 2020 (960cb00) GNU/Linux
 Host: linux-wx70
 Proc: 5.3.18-lp152.19-default #1 SMP Tue Jun 9 20:59:24 UTC 2020 (960cb00) GNU/Linux
 Distribution: 3 15.2
 Bitness: 64 bit


-----------------------
| HPLIP CONFIGURATION |
-----------------------

HPLIP-Version: HPLIP 3.20.6
HPLIP-Home: /usr/share/hplip
warning: HPLIP-Installation: Auto installation is not supported for 3 distro  15.2 version 

Current contents of '/etc/hp/hplip.conf' file:
# hplip.conf.  Generated from hplip.conf.in by configure.

[hplip]
version=3.20.6

[dirs]
home=/usr/share/hplip
run=/var/run
ppd=/usr/share/cups/model/manufacturer-PPDs/hplip
ppdbase=/usr/share/cups/model/manufacturer-PPDs
doc=/usr/share/doc/packages/hplip
html=/usr/share/doc/packages/hplip
icon=/usr/share/applications
cupsbackend=/usr/lib/cups/backend
cupsfilter=/usr/lib/cups/filter
drv=/usr/lib/cups/driver
bin=/usr/bin
apparmor=/etc/apparmor.d
# Following values are determined at configure time and cannot be changed.
[configure]
network-build=yes
libusb01-build=no
pp-build=no
gui-build=yes
scanner-build=yes
fax-build=yes
dbus-build=yes
cups11-build=no
doc-build=yes
shadow-build=no
hpijs-install=yes
foomatic-drv-install=no
foomatic-ppd-install=yes
foomatic-rip-hplip-install=no
hpcups-install=yes
cups-drv-install=no
cups-ppd-install=yes
internal-tag=3.20.6
restricted-build=no
ui-toolkit=qt5
qt3=no
qt4=no
qt5=yes
policy-kit=no
lite-build=no
udev_sysfs_rules=no
hpcups-only-build=no
hpijs-only-build=no
apparmor_build=no
class-driver=no


Current contents of '/var/lib/hp/hplip.state' file:
Plugins are not installed. Could not access file: No such file or directory

Current contents of '~/.hplip/hplip.conf' file:
[commands]
scan = /usr/bin/xsane -V %SANE_URI%

[fax]
email_address = 
voice_phone = 

[last_used]
device_uri = "hp:/net/HP_Officejet_Pro_8610?ip=192.168.1.75"
printer_name = HP_Officejet_Pro_8610
working_dir = .

[polling]
device_list = 
enable = false
interval = 5

[refresh]
enable = false
rate = 30
type = 1

[settings]
systray_messages = 0
systray_visible = 0

[upgrade]
last_upgraded_time = 1480209558
latest_available_version = 3.13.11
notify_upgrade = true
pending_upgrade_time = 0

[installation]
date_time = 07/05/20 14:52:55
version = 3.20.6


 <Package-name>        <Package-Desc>      <Required/Optional> <Min-Version> <Installed-Version> <Status>   <Comment>

-------------------------
| External Dependencies |
-------------------------

 cups                 CUPS - Common Unix Printing System                           REQUIRED        1.1             2.2.7           OK         'CUPS Scheduler is running'
 gs                   GhostScript - PostScript and PDF language interpreter and previewer REQUIRED        7.05            9.52            OK         -
 error: xsane         xsane - Graphical scanner frontend for SANE                  OPTIONAL        0.9             -               MISSING    'xsane needs to be installed'
 scanimage            scanimage - Shell scanning program                           OPTIONAL        1.0             1.0.27          OK         -
 error: dbus          DBus - Message bus system                                    REQUIRED        -               1.12.2          MISSING    'DBUS may not be installed or not running'
 policykit            PolicyKit - Administrative policy framework                  OPTIONAL        -               0.116           OK         -
 network              network -wget                                                OPTIONAL        -               1.20.3          OK         -
 error: avahi-utils   avahi-utils                                                  OPTIONAL        -               -               MISSING    'avahi-utils needs to be installed'

------------------------
| General Dependencies |
------------------------

 error: libjpeg       libjpeg - JPEG library                                       REQUIRED        -               -               MISSING    'libjpeg needs to be installed'
 error: cups-devel    CUPS devel- Common Unix Printing System development files    REQUIRED        -               2.2.7           MISSING    'cups-devel needs to be installed'
 error: cups-image    CUPS image - CUPS image development files                    REQUIRED        -               2.2.7           MISSING    'cups-image needs to be installed'
 error: libpthread    libpthread - POSIX threads library                           REQUIRED        -               b'2.26'         MISSING    'libpthread needs to be installed'
 error: libusb        libusb - USB library                                         REQUIRED        -               1.0             MISSING    'libusb needs to be installed'
 sane                 SANE - Scanning library                                      REQUIRED        -               -               OK         -
 error: sane-devel    SANE - Scanning library development files                    REQUIRED        -               -               MISSING    'sane-devel needs to be installed'
 error: libnetsnmp-devel libnetsnmp-devel - SNMP networking library development files REQUIRED        5.0.9           5.7.3           MISSING    'libnetsnmp-devel needs to be installed'
 error: libcrypto     libcrypto - OpenSSL cryptographic library                    REQUIRED        -               1.1.1           MISSING    'libcrypto needs to be installed'
 python3X             Python 2.2 or greater - Python programming language          REQUIRED        2.2             3.6.10          OK         -
 error: python3-notify2 Python libnotify - Python bindings for the libnotify Desktop notifications OPTIONAL        -               -               MISSING    'python3-notify2 needs to be installed'
Traceback (most recent call last):
  File "/usr/bin/hp-check", line 862, in <module>
    num_errors, num_warns = dep.validate(time_flag, is_quiet_mode)
  File "/usr/bin/hp-check", line 368, in validate
    self.core.dependencies[dep])
  File "/usr/bin/hp-check", line 210, in __update_deps_info
    installed_ver = self.core.version_func[deps_info[6]]()
  File "/usr/share/hplip/installer/dcheck.py", line 303, in get_pyQt4_version
    from PyQt4 import QtCore
ImportError: cannot import name 'QtCore'

Please post:

zypper se -si hplip

Hello Sauerland. Here is the output.

~> zypper se -si hplip
Loading repository data...
Reading installed packages...

S  | Name        | Type    | Version            | Arch   | Repository
---+-------------+---------+--------------------+--------+-----------
i+ | hplip       | package | 3.20.6-lp152.216.2 | x86_64 | Printing
i+ | hplip-hpijs | package | 3.20.6-lp152.216.2 | x86_64 | Printing
i+ | hplip-sane  | package | 3.20.6-lp152.216.2 | x86_64 | Printing

| External Dependencies |
-------------------------

 cups                 CUPS - Common Unix Printing System                           REQUIRED        1.1             2.2.7           OK         'CUPS Scheduler is running'
 gs                   GhostScript - PostScript and PDF language interpreter and previewer REQUIRED        7.05            9.52            OK         -
 error: xsane         xsane - Graphical scanner frontend for SANE                  OPTIONAL        0.9             -               MISSING    'xsane needs to be installed'
 scanimage            scanimage - Shell scanning program                           OPTIONAL        1.0             1.0.27          OK         -
 error: dbus          DBus - Message bus system                                    REQUIRED        -               1.12.2          MISSING    'DBUS may not be installed or not running'
 policykit            PolicyKit - Administrative policy framework                  OPTIONAL        -               0.116           OK         -
 network              network -wget                                                OPTIONAL        -               1.20.3          OK         -
 error: avahi-utils   avahi-utils                                                  OPTIONAL        -               -               MISSING    'avahi-utils needs to be installed'

------------------------
| General Dependencies |
------------------------

 error: libjpeg       libjpeg - JPEG library                                       REQUIRED        -               -               MISSING    'libjpeg needs to be installed'
 error: cups-devel    CUPS devel- Common Unix Printing System development files    REQUIRED        -               2.2.7           MISSING    'cups-devel needs to be installed'
 error: cups-image    CUPS image - CUPS image development files                    REQUIRED        -               2.2.7           MISSING    'cups-image needs to be installed'
 error: libpthread    libpthread - POSIX threads library                           REQUIRED        -               b'2.26'         MISSING    'libpthread needs to be installed'
 error: libusb        libusb - USB library                                         REQUIRED        -               1.0             MISSING    'libusb needs to be installed'
 sane                 SANE - Scanning library                                      REQUIRED        -               -               OK         -
 error: sane-devel    SANE - Scanning library development files                    REQUIRED        -               -               MISSING    'sane-devel needs to be installed'
 error: libnetsnmp-devel libnetsnmp-devel - SNMP networking library development files REQUIRED        5.0.9           5.7.3           MISSING    'libnetsnmp-devel needs to be installed'
 error: libcrypto     libcrypto - OpenSSL cryptographic library                    REQUIRED        -               1.1.1           MISSING    'libcrypto needs to be installed'
 python3X             Python 2.2 or greater - Python programming language          REQUIRED        2.2             3.6.10          OK         -
 error: python3-notify2 Python libnotify - Python bindings for the libnotify Desktop notifications OPTIONAL        -               -               MISSING    'python3-notify2 needs to be installed'

This is what make no sense, install the missing packages.

PS
Why not using the packages shipped withn Leap 15.2?

Hello Sauerland.
I thought that’s what I did when I went to YaST2 Software Management… There I did a search for hlplip and installed what YaST2 was proposing.
It might be that I have old remnants of a previous hplip still installed and I think the best way to proceed would be to completely uninstall hplip and then re-install it again via YaST2 Software Management.
Would the 3 programs shown in this screen grab be the only things that I need to uninstall?

See my quote, hplip is missing dependencies…

The problem that I am running into with installing missing dependencies is that YaST2 Software Management does not always propose a clear choice as to what I need to install. For instance, DBUS might be missing from the current installation.
A search in YaST2 Software Management brings up a ton of packages that have the string DBUS included. And I do not know which one to install or how to run DBUS if it is already installed.
That is why I would prefer starting over with a fresh installation of hplip.

Another strange thing that I have noticed is that the current hplip installation seems to create two entries for the same printer. See this screenshot:

Neither of the two entries allow to print anything from Firefox.

That print dialogue box looks like a GTK app, correct? If so, that is due to Avahi automatically discovering network printers, and GTK apps publish them. See here…
https://lists.debian.org/debian-user/2017/09/msg00991.html

I doubt the dbus would be missing. It’s intrinsic part of most desktop environments.

zypper se -si dbus

Hello Deano.
There were a couple of other missing files that I could not find with YaST2 Software Management, and therefore I have decided to uninstall hplip with the intention of re-installing it from scratch.
But, as you can see from the screen grab, one of the printer entries is still there… Do you know how I can get rid of it?

I already gave you the reason for that. It is NOT a configured printer but is enumerated because the printer is discovered by Avahi. It’s a GTK thing. You can ignore it.

The printer is still not printing. I have reinstalled hplip using YaST2. I have installed almost all of the missing files flagged by

hp-check -r

.

hp-check -r

shown below shows which files I was not able to install because I do not know which ones to pick…

> hp-check -r
Saving output in log file: /home/tb/hp-check.log

HP Linux Imaging and Printing System (ver. 3.20.6)
Dependency/Version Check Utility ver. 15.1

Copyright (c) 2001-18 HP Development Company, LP
This software comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to distribute it
under certain conditions. See COPYING file for more details.

Note: hp-check can be run in three modes:
1. Compile-time check mode (-c or --compile): Use this mode before compiling the HPLIP supplied tarball (.tar.gz or .run) to determine if the proper dependencies are installed to successfully compile HPLIP.                                                                 
2. Run-time check mode (-r or --run): Use this mode to determine if a distro supplied package (.deb, .rpm, etc) or an already built HPLIP supplied tarball has the proper dependencies installed to successfully run.                                                          
3. Both compile- and run-time check mode (-b or --both) (Default): This mode will check both of the above cases (both compile- and run-time dependencies).                                                                                                                     

Check types:                                                                                                                                                                                                                                                                   
a. EXTERNALDEP - External Dependencies                                                                                                                                                                                                                                         
b. GENERALDEP - General Dependencies (required both at compile and run time)                                                                                                                                                                                                   
c. COMPILEDEP - Compile time Dependencies                                                                                                                                                                                                                                      
d. [All are run-time checks]                                                                                                                                                                                                                                                   
PYEXT SCANCONF QUEUES PERMISSION                                                                                                                                                                                                                                               

Status Types:
    OK
    MISSING       - Missing Dependency or Permission or Plug-in
    INCOMPAT      - Incompatible dependency-version or Plugin-version

warning: 3-15.2 version is not supported. Using 3-15.1 versions dependencies to verify and install...

---------------
| SYSTEM INFO |
---------------

 Kernel: 5.3.18-lp152.19-default #1 SMP Tue Jun 9 20:59:24 UTC 2020 (960cb00) GNU/Linux
 Host: linux-wx70
 Proc: 5.3.18-lp152.19-default #1 SMP Tue Jun 9 20:59:24 UTC 2020 (960cb00) GNU/Linux
 Distribution: 3 15.2
 Bitness: 64 bit


-----------------------
| HPLIP CONFIGURATION |
-----------------------

HPLIP-Version: HPLIP 3.20.6
HPLIP-Home: /usr/share/hplip
warning: HPLIP-Installation: Auto installation is not supported for 3 distro  15.2 version 

Current contents of '/etc/hp/hplip.conf' file:
# hplip.conf.  Generated from hplip.conf.in by configure.

[hplip]
version=3.20.6

[dirs]
home=/usr/share/hplip
run=/var/run
ppd=/usr/share/cups/model/manufacturer-PPDs/hplip
ppdbase=/usr/share/cups/model/manufacturer-PPDs
doc=/usr/share/doc/packages/hplip
html=/usr/share/doc/packages/hplip
icon=/usr/share/applications
cupsbackend=/usr/lib/cups/backend
cupsfilter=/usr/lib/cups/filter
drv=/usr/lib/cups/driver
bin=/usr/bin
apparmor=/etc/apparmor.d
# Following values are determined at configure time and cannot be changed.
[configure]
network-build=yes
libusb01-build=no
pp-build=no
gui-build=yes
scanner-build=yes
fax-build=yes
dbus-build=yes
cups11-build=no
doc-build=yes
shadow-build=no
hpijs-install=yes
foomatic-drv-install=no
foomatic-ppd-install=yes
foomatic-rip-hplip-install=no
hpcups-install=yes
cups-drv-install=no
cups-ppd-install=yes
internal-tag=3.20.6
restricted-build=no
ui-toolkit=qt5
qt3=no
qt4=no
qt5=yes
policy-kit=no
lite-build=no
udev_sysfs_rules=no
hpcups-only-build=no
hpijs-only-build=no
apparmor_build=no
class-driver=no


Current contents of '/var/lib/hp/hplip.state' file:
Plugins are not installed. Could not access file: No such file or directory

Current contents of '~/.hplip/hplip.conf' file:
[commands]
scan = /usr/bin/xsane -V %SANE_URI%

[fax]
email_address = 
voice_phone = 

[installation]
date_time = 07/06/20 19:14:05
version = 3.20.6

[last_used]
device_uri = "hp:/net/HP_Officejet_Pro_8610?ip=192.168.1.75"
printer_name = HP_Officejet_Pro_8610
working_dir = .

[polling]
device_list = 
enable = false
interval = 5

[refresh]
enable = false
rate = 30
type = 1

[settings]
systray_messages = 0
systray_visible = 0

[upgrade]
last_upgraded_time = 1480209558
latest_available_version = 3.13.11
notify_upgrade = true
pending_upgrade_time = 0


 <Package-name>        <Package-Desc>      <Required/Optional> <Min-Version> <Installed-Version> <Status>   <Comment>

-------------------------
| External Dependencies |
-------------------------

 cups                 CUPS - Common Unix Printing System                           REQUIRED        1.1             2.2.7           OK         'CUPS Scheduler is running'
 gs                   GhostScript - PostScript and PDF language interpreter and previewer REQUIRED        7.05            9.52            OK         -
 xsane                xsane - Graphical scanner frontend for SANE                  OPTIONAL        0.9             0.999           OK         -
 scanimage            scanimage - Shell scanning program                           OPTIONAL        1.0             1.0.27          OK         -
 error: dbus          DBus - Message bus system                                    REQUIRED        -               1.12.2          MISSING    'DBUS may not be installed or not running'
 policykit            PolicyKit - Administrative policy framework                  OPTIONAL        -               0.116           OK         -
 network              network -wget                                                OPTIONAL        -               1.20.3          OK         -
 avahi-utils          avahi-utils                                                  OPTIONAL        -               0.7             OK         -

------------------------
| General Dependencies |
------------------------

 error: libjpeg       libjpeg - JPEG library                                       REQUIRED        -               -               MISSING    'libjpeg needs to be installed'
 cups-devel           CUPS devel- Common Unix Printing System development files    REQUIRED        -               2.2.7           OK         -
 cups-image           CUPS image - CUPS image development files                    REQUIRED        -               2.2.7           OK         -
 libpthread           libpthread - POSIX threads library                           REQUIRED        -               b'2.26'         OK         -
 error: libusb        libusb - USB library                                         REQUIRED        -               1.0             MISSING    'libusb needs to be installed'
 sane                 SANE - Scanning library                                      REQUIRED        -               1.0.27          OK         -
 sane-devel           SANE - Scanning library development files                    REQUIRED        -               1.0.27          OK         -
 libnetsnmp-devel     libnetsnmp-devel - SNMP networking library development files REQUIRED        5.0.9           5.7.3           OK         -
 libcrypto            libcrypto - OpenSSL cryptographic library                    REQUIRED        -               1.1.1           OK         -
 python3X             Python 2.2 or greater - Python programming language          REQUIRED        2.2             3.6.10          OK         -
 python3-notify2      Python libnotify - Python bindings for the libnotify Desktop notifications OPTIONAL        -               -               OK         -
Traceback (most recent call last):
  File "/usr/bin/hp-check", line 862, in <module>
    num_errors, num_warns = dep.validate(time_flag, is_quiet_mode)
  File "/usr/bin/hp-check", line 368, in validate
    self.core.dependencies[dep])
  File "/usr/bin/hp-check", line 210, in __update_deps_info
    installed_ver = self.core.version_func[deps_info[6]]()
  File "/usr/share/hplip/installer/dcheck.py", line 303, in get_pyQt4_version
    from PyQt4 import QtCore
ImportError: cannot import name 'QtCore'

Please share

zypper se -s dbus