# CUPS and printing

## Butts

I have CUPS configured for a network printer and everything seems to be working fine when I configure everything. I get a perfect test page from CUPS, but when I try to print from anywhere else (Open Office or command line) the command just hangs. I tried lpq and lpr just to find out if the commands were working, and I get nothing. Does anybody have some more insight to this.

I shouldn't have been so excited when I saw the test page. I'm still so far.

Matt

----------

## papal_authority

Maybe post the output of lpstat -t here.

----------

## siddhartha

You can get some more info as to what is missing by doing these:

1. Change the LogLevel to debug in /etc/cups/cupsd.conf

```
 

# LogLevel: controls the number of messages logged to the ErrorLog

# file and can be one of the following:

#

#     debug2    Log everything.

#     debug     Log almost everything.

#     info      Log all requests and state changes.

#     warn      Log errors and warnings.

#     error     Log only errors

#     none      Log nothing.

#

LogLevel debug

```

then

2. restart cups , try to print something and then look at the log at /var/log/cups/error_log

You might get some hint what is going wrong.

HTH

----------

## Butts

Well, before I had a chance to try one of these solutions, I ditched cups for lprng. I must say that I definately do not like lprng, but I did get the printer working. If I run into any issues, I will probably go back to cups and try to make it work.

Thanks,

Matt

----------

## Cintra

Hei Butts

What kernel version are you using? I had similar problems with development-sources 2.6.9-rc3.. 

2.6.8.1 worked ok, I believe (didn't spend a lot of time on it) and so far 2.6.9 seems OK.

regards

----------

## Butts

OK. I ditched lprng. That thing sucks.

I am using 2.6.7 and now back with CUPS.

lpstat -t just hangs

It seems as though my command line print commands are all broken. lpr, lpstat, lpq all just hang. Please help.

Am I missing something in the kernel config?

----------

## papal_authority

Is your printer network, parallel, serial or USB? You'll need to ensure you have the correct driver in your kernel. After that's okay, perhaps try unmerging and re-emerging cups...

----------

## Butts

It's a network printer, and it uses the basic HP driver. Test pages come out beautifully as long as I use the cups web interface.

The problem comes when I try to use lpr or the like.

I tried remerging cups with no luck, same thing happens.

Is this a bug in the current cups ebuild or just me?

----------

## papal_authority

I have a networked HP (using a JetDirect card) under CUPS as well. Some of the problem might be that you don't have a default printer (/usr/sbin/lpadmin -d PRINTER_NAME) so lpr doesn't know what to do? I'd suggest unmerging and re-emerging CUPS though. After the unmerge, ensure that the /etc/cups directory is removed before re-emerging. That has caused problems for others. I don't really know the web interface very well, but here's the CLI steps to setup a printer:

```

   1. # /etc/init.d/cupsd start

   2. # /usr/sbin/lpadmin -p hp -m hplaserjet4plus.ppd -v socket://192.168.0.3 -E

     

       NOTE: It *DOES* matter what order you put the commandline options!

 

            -E accept and enable

            -m PPD file from model directory, use the one for YOUR printer

            -p printer name

            -v device

 

   3. # /usr/sbin/lpadmin -d hp

 

   4. # echo "Testing" | lp -d hp

 

   5. # rc-update add cupsd default /etc/init.d/cupsd

```

That's it. It would probably be advisable (unless this is a print server) to turn off browsing and restart CUPS. Do this by ensuring the line "Browsing Off" is uncommented in /etc/cups/cupsd.conf. HTH  :Very Happy: 

----------

## prleu

 *Butts wrote:*   

> OK. I ditched lprng. That thing sucks.
> 
> I am using 2.6.7 and now back with CUPS.
> 
> lpstat -t just hangs
> ...

 

have you tried "ping localhost" ?

whats the output ?

 :Wink: 

----------

