# Error CUPS



## nuklear (Nov 18, 2015)

When I try to setup my printer, display this message:
`# 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.
No protocol specified
hp-setup: cannot connect to X server :0
```
How can I solve?


----------



## sidetone (Nov 18, 2015)

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.


----------



## nuklear (Nov 18, 2015)

I must run `hp-setup` like a normal user?


----------



## tingo (Nov 18, 2015)

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.


----------



## nuklear (Nov 18, 2015)

Ok thanks. Now I'll try and I'll tell you


----------



## nuklear (Nov 23, 2015)

This is my results like root:

```
# echo $DISPLAY
:0
```
 and then

```
# DISPLAY=:0.0 hp-setup
DISPLAY=:0.0: Command not found.
```
like normal user:

```
$  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?


----------



## wblock@ (Nov 23, 2015)

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.


----------



## kpa (Nov 24, 2015)

You can always use env(1) regardless of the shell used:

`# env DISPLAY=:0.0 hp-setup`


----------



## tingo (Nov 28, 2015)

and csh(1) has a rehash command too...


----------

