hp-setup wont setup my HP Officejet

With new installs of openSuse 11.4 I’ve hit a printer problem.

I can run hp-setup (or hp-toolbox) for the wireless Officejet j6410 and it is recognised. The right driver is selected. Then when I choose add printer it all falls over with the error message:

\error: Printer queue setup failed. Could not connect to CUPS Server Is user added to “lp” group(s)
error: Fax queue setup failed. Please restart CUPS and try again.

The user is added to the lp group. I have this problem with my 64 bit desktop and 32 bit laptop installs of 11.4, it all worked perfectly in 11.2.

I’ve used the Cups web interface to set up the printer now and can print from both machines, but I would prefer to use the hp-toolbox, which has several convenient features. Where do I go from here?


Don’t know exactly why, must be a default permissions thing, but on openSUSE you need to run hp-setup with root permissions:

su -c hp-setup

Best is to remove the printer through Yast first. Good luck, please post results

So simple! Works a dream. I’d tried it after logging in as root, but hit problems. Using su worked. Thanks!

I have to post this: never ever log in as root on a desktop environment. Reasons are found in the many threads and posts in the forums.

It was called desperation, though I did pull the connection to the outside world first.

hehe . . . with an older HP printer I had I could not get it to set up using su and had to log in as root to get it to work (I know I shouldn’t).

However, with my current HP printer (wireless B110a) I do the complete setup in yast without problem.
hp-setup seems to choke on setting up the wireless aspects.

I concur, I ran su -c hp-setup and it worked flawlessly. Good one, Knurpht!

Running openSUSE 12.3, HP Photosmart C410a

You can also do an Alt-F2 and enter either kdesu hp-setup or gnomesu hp-setup and never drop to terminal to run the application. It is not text based, but a graphic installer.

Thank You,

Same worked for me:

su -c hp-setup

The problem was insufficient privileges to add the printer to the cups printing queue.
I think that HPLIP should ask for an administrative password when it needs to, and not silently crash, or fail in the attempt

The program is not part of any desktop menu or script, where you would add in the request to be root. Since it effects the system setup, perhaps being root was just assumed. None the less, we are here to tell you of how it works and try to help when we can.

Thank You,

Actually is part of one menu:
In XFCE: Alt+F1 or click on main menu >> System >> hp-toolbox.
I configured the printer this way, so that’s why I have been in trouble trying to configure it.

Thanks for your help

Yes, ‘hp-setup’ gets added to KDE menu too: Kickoff >> System >> Configuration >> hp-setup. I’ve edited the menu command, so that it launches using

/usr/bin/xdg-su -c /usr/bin/hp-setup

Root credentials are then requested before it starts.

Don’t use XFCE, but hp-setup is not a KDE or GNOME menu option but the hp-toolbox is there. None the less, we do need to run hp-setup as root for sure.

Thank You,

Yes, you’re right. I must have added ‘hp-setup’ manually (in the distant past).

The launcher at menu should be modified to ask root password in order to properly allow add new printers.
Don’t you think this should be reported as a bug or improvement request?

I see advanced users here, I think the goal is to get a novice user friendly environment

But open SUSE has no control over XYZ corps propritary stuff. Maybe suggest that to HP But I would not hold my breath. Have not used that myself have not used a printer forever but I would not be surprised that the need to run as root is in the instruction. Also since printer setup is a system wide thing it is obvious that you need to be the system administrator ie root. New users have a small obligation not to be completely ignorant

On 07/31/2013 03:56 PM, altmas5 pecked at the keyboard and wrote:
> The launcher at menu should be modified to ask root password in order to
> properly allow add new printers.
> Don’t you think this should be reported as a bug or improvement
> request?

Are you saying that root should be the only one that can add printers?
It should be just the opposite. Just like setting the network should be
allowed by common user.

> I see advanced users here, I think the goal is to get a novice user
> friendly environment

That is a question for HP - it’s their software. The workaround is to create a menu option, that launches with ‘/usr/bin/xdg-su -c /usr/bin/hp-setup’ as I explained previously. You will be prompted for the root password before it launches (as you desire).

I think the workaround should be applied during the distro packaging in the menu/launcher for hp-toolbox as it is made for wireshark (e.g.) and not by users handmade.
Obviously the fix should be made by HP and ask for the root password when the printer is being added and remove the need of launch the HPLIP with root uid during all of it’s execution.
I know the fix in the launcher (‘/usr/bin/xdg-su -c /usr/bin/hp-setup’) is easy for experienced users but for a newbie is one of those things that make them think that linux desktops are harder to configure.

I think the same way, root privileges shouldn’t be needed for basics things like this but it’s the way it works or people involved are used to work. I think this is one of those programs that need a SUID bit or linux capacilities granting privileges over cups.

Sorry no root privileges must be for any system wide operation and installing a printer is system wide. Remember Linux is a MULTI user OS. so if you installed with only a users credentials other users would not have access. This is one of the failing of Windows and one of the reasons that is is such an easy target for attacks. So Linux 101 is that any system configurations must be done as root.