# Cups

## ed-gentoo

This one is about cups printing.

I have emerged cups and gimp-print. First I couldn't connect to the local host, but solved that by using http://0:631 (solved with my error log). Next I wanted to add my epson color stylus 880 (parralel) and saw their were no ports, I rembered I don't have parrel enabled in my kernel (should do that) so I decided to install my epson photo stylus 810 instead (usb). So I selected the usb port 1 (which to choose if you have the option of 12??) and the first driver (of the 5! same ones) listed titled epson photo stylus 810. I went to print a test page. There it goes wrong. It first said couldn't find hostname so i put it in the hosts file as 10.0.0.127 hostname for the pc is connected to an adsl modem which is dhcp server. Then retried to print the test page and then nothing comes out and the job stays on 1% what is wrong here?

Any ideas welcome to solve which usb port (printer connected to usb hub which is found by kernel), which of the drivers! And any other important things

----------

## ronmon

The web interface for CUPS is kind of neat looking, but I've never been able to do a complete configuration with it. Inevitably, I end up doing a lot of hand editing on cupsd.conf and printers.conf, which you will find in /etc/cups/. I have a parallel laser printer and an Epson Photo Stylus 820 USB. Here's the section from printers.conf for the Stylus. Note the URI.

```

<Printer Stylus> (<DefaultPrinter PrinterName> if it is your only or primary printer)

Info Epson Stylus Photo 820

Location clubhouse

DeviceURI usb:/dev/usb/lp0

State Idle

Accepting Yes

JobSheets none none

QuotaPeriod 0

PageLimit 0

KLimit 0

</Printer>

```

----------

## Roel

ed-gentoo: I think your /etc/hosts isn't alright, if 't can't find localhost.

Your /etc/hosts file should look like this:

```

# /etc/hosts:  This file describes a number of hostname-to-address

#              mappings for the TCP/IP subsystem.  It is mostly

#              used at boot time, when no name servers are running.

#              On small systems, this file can be used instead of a

#              "named" name server.  Just add the names, addresses

#              and any aliases to this file...

# $Header: /home/cvsroot/gentoo-src/rc-scripts/etc/hosts,v 1.7 2002/11/18 19:39:22 azarah Exp $

#

127.0.0.1       localhost 

192.168.1.1    yourhostname # replace this ip and hostname with yours!

```

This is my setup and it works..

[/code][/quote]

----------

## int1

If you are using KDE, I strongly suggest using control-center's peripheral configuration section to setup printers in CUPS.  It's a wonderful tool, and I've never had to do any manual modification of my cups conf files.

int1

----------

## ed-gentoo

Okay, did some changes yesterday. Changed the hosts file with 127.0.0.1 localhost and 127.0.0.1 hostname this because I use dhcp and have multiple computers running. Now I have to use the standard localhost:631 to connect to cups. 

I changed my port but now luck there. What I did find out is that it proces upto 6% then waits a while and then comes with printer not connected. It's connected to a usb 4 port hub which the kernel regonises an is turned on. I still don't have any parralel ports, and still have 5 entries for each driver! Should I reinstall cups and gimpprint, can this be done without removeing other things? This because they're installed as dependencies for something else, not sure what because it emerge over night.

----------

## rommel

add parport, parport_pc, and lp to the kernel then load them either through modules.autoload or using insmod or modprobe. also be sure you have usb filesytem enabled as well as usb printer support.

again remember anything compiled as a module and not directly in add to mdules.autoload

----------

## ed-gentoo

okay. I'll try that see what then happens. What is better, adding it directly to the kernel or as modules?

----------

## Roel

I would say modules... With modules you can load/unload them on the fly. If you have a problem with you port, you don't have to reboot.

----------

## mtPete

 *Roel wrote:*   

> ed-gentoo: I think your /etc/hosts isn't alright, if 't can't find localhost.
> 
> Your /etc/hosts file should look like this:
> 
> ```
> ...

 [/quote]

What do you do if your ip is set by DHCP?

I'm getting the following error when I try to print a test page in the cups webadmin (regular printing used too, but does not now work):

```
Hostname could not be found. Please check the name and try again.

```

Where Hostname is my computers name. I checked the /etc/hostname file and it was in there. My /etc/hosts file just lists the 127.0.0.1 ip.

----------

