Error CUPS

When I try to setup my printer, display this message:
# hp-setup
Code:
HP Linux Imaging and Printing System (ver. 3.14.10)
Printer/Fax Setup Utility ver. 9.0

Copyright (c) 2001-13 Hewlett-Packard 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.

warning: Fax setup disabled - Python 2.3+ required.
No protocol specified
hp-setup: cannot connect to X server :0
How can I solve?
 
Last edited by a moderator:
It will give that message of not being able to connect to the X server, if your desktop is not run from root, but your terminal is in root. It can also happen from running inside a jail.
 
If you want to run hp-setup as root, you can prefix it with the DISPLAY variable with value, like so:
# DISPLAY=:0.0 hp-setup
First you will have to find out what the correct value is, by doing echo $DISPLAY as your normal user.
 
This is my results like root:
Code:
 # echo $DISPLAY
:0
and then
Code:
 # DISPLAY=:0.0 hp-setup
DISPLAY=:0.0: Command not found.
like normal user:
Code:
$  DISPLAY=:0.0 hp-setup

HP Linux Imaging and Printing System (ver. 3.14.10)
Printer/Fax Setup Utility ver. 9.0

Copyright (c) 2001-13 Hewlett-Packard 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.

warning: Fax setup disabled - Python 2.3+ required.
Searching... (bus=usb, search=(None), desc=0)
error: Failed to find the lsusb command
error: No devices found on bus: usb
Searching... (bus=usb, search=(None), desc=0)
error: Failed to find the lsusb command
error: No devices found on bus: usb
Searching... (bus=usb, search=(None), desc=0)
error: Failed to find the lsusb command
error: No devices found on bus: usb
Searching... (bus=usb, search=(None), desc=0)
error: Failed to find the lsusb command
error: No devices found on bus: usb

Done.

Ideas?
 
The root user's shell is csh(1). (No, do not change it.) So either set that environment variable with that shell's method ( setenv DISPLAY :0.0) or start sh(1) or bash(1) to do it as shown above.
 
Back
Top