# Network printing (only) documentation lacking?

## wobbly

Hi,

I am trying to connect to a network printer, and I have looked

at the printing guide but not found what I need. The printing guide

is not clear (IMO) if one wants ONLY network printing. For example,

do I start reading at "3. Network printing using CUPS and Samba"?

No, since starting there one does not even install CUPS, and I don't

need Samba, rather just a plain old Unix network printer (HP Laser

Jet). Well, I thought, maybe I should start at the top of the document.

The discussion here starts with kernel modules for parallel and USB

printing which I'm pretty sure I don't need since I am printing to

a network printer. I am then left to trying to pick the parts from

the document that probably apply to my situation, and searching

the forums, both of which have failed me.

Could someone point me to some instructions for printing to a network

printer? At this point I don't even know if I need CUPS, foomatic,

and/or ghostscript!?

Thanks!

----------

## plasmaroo

It can vary.

What SORT of *nix printer? LPD or CUPS (IPP)? Or a Windoze box running Unix Printing Services (LPD)? Or the other way round?

-----------------------------------------------

FOR *Nix LPD/Windoze Unix Print Services

emerge cups

emerge gs

Go to http://127.0.0.1:631/admin/?op=add-printer

Choose a name, then in the next prompt choose LPD printer. Then just follow the yellow brick road. Once done go to http://127.0.0.1:631/printers/yourprintername and press "Test Page"

-----------------------------------------------

CUPS to CUPS

emerge cups

emerge gs

Go to http://127.0.0.1:631/admin/?op=add-printer

Choose a name, then in the next prompt choose HTTP.

For the URL, use http://ipaddress:631/printers/printername

Once done go to http://127.0.0.1:631/printers/yourprintername and press "Test Page"

-------------------------------------------------------

CUPS to Windoze SMB/SAMBA

emerge cups

emerge gs

Go to http://127.0.0.1:631/admin/?op=add-printer

Choose a name, then in the next prompt choose "Windows via SAMBA".

For the URL use smb://username:password@WORKGROUP/machinename/printername

Once done go to http://127.0.0.1:631/printers/yourprintername and press "Test Page"

------------------------------------------------------

Hope that's what you want   :Wink: 

----------

## wobbly

Thanks for the response.

The printer is not attached to a computer, it is just sitting

on the network (i.e., the ethernet cable goes from the printer

to a switch.)

I tried the CUPS to CUPS instructions you gave and when I print

the test page it gets cancelled.

Any more suggestions?

Thanks!

----------

## Elear

I have a lan at home, the printer is a Samsung ML-4500 connected to my wife computer, using w2k. She shares the printer via samba, and currently the only thing i need to do was

emerge samba

emerge cups

went to linuxprinting web and downloaded the PDD document, installed in the proper directory, and then start cupsd, open mozilla to localhost:631 and configure the url as 

smb://username:password@WORKGROUP/machinename/printer_queuename

But this is my case, yours vary depending on what computer is sharing the printer, what method of sharing are you using and how you want to connect, so as much details you post about your configuration, the better.

----------

## plasmaroo

I see....

If it's on the network it should have its own print server thing. In which case it is probably an HP JetDirect thing.

http://127.0.0.1:631/admin/?op=add-printer

Choose AppSocket/HP....

URL is socket://printeripaddress

      or socket://printeripaddress:9100

----------

## wobbly

hmmm.... using

 *Quote:*   

> 
> 
> socket://printeripaddress:9100
> 
> 

 

(with the printer's IP address of course) the test page

job still gets cancelled. I'm not sure where to go from here ...

Thanks!

----------

## plasmaroo

Edit your /etc/cups/cupsd.conf so LogLevel is debug.

Look at your log in /var/log/cups/error_log after printing... In fact attach it  :Smile: 

----------

## plasmaroo

Ah.... 

Cancelled is a possible symptom of gentoo cups buginess

Do  emerge gs ... I assume it is a NON-PostScript printer, right?

----------

## wobbly

Well, a reboot cured the problem!

(I know rebooting isn't the linux way, but I'm new enough that

I don't know what daemons, etc. to restart ...)

Test page printed fine, and now I'll try to send a real document.

Thanks!

jgw

----------

## plasmaroo

Yes.... When you re-merge gs, I forgot to tell you that you need to do

 /etc/init.d/cupsd restart 

Glad it works  :Wink: 

----------

## wobbly

The test page worked, but ...

I tried printing a PDF document from gv

File-->Print Document

brings up the dialog box with the command

lpr

I hit return and get the error

Printing via 

'lpr /home/wohlbier/gv_3ea9_PHP03395.ps.tmp'

failed.

The message sent to my xterm has the above text, plus

- No such file or directory

Should I not be using lpr?

Thanks!

jgw

----------

## plasmaroo

Try

lpr -P CUPSprintername

----------

## wobbly

using lpr -P CUPSprintername

this gave me the same error.

I have the default printer set to

CUPSprintername so in principle

lpr = lpr -P CUPSprintername

??

jgw

----------

## bsolar

Moved from Hardware & Laptops.

----------

## plasmaroo

OK,

Print it to a file output, say zzz.ps...

Then do  lpr zzz.ps 

----------

## meclizine50mg

 *wobbly wrote:*   

> 
> 
> I am trying to connect to a network printer, and I have looked
> 
> at the printing guide but not found what I need. The printing guide
> ...

 

I'll describe what worked for me, maybe it'll help some other newbie like me with a fresh install. I have an HP 855c printer connected to my little Netgear PS104 printserver which is connected to my home network. First I had to get the webserver on my gentoo setup running in order to use the CUPS configuration. Then I installed CUPS:

```
emerge apache

/etc/init.d/apache2 start

emerge cups

/etc/init.d/cupsd start
```

When I tried to emerge gs as instructed in the above posts, it didn't recognize a gs package even exists. I don't know, but maybe it's because I'm using PPC (G4 PowerBook) ? But apparently I don't need it, or I must have a substitute package installed.

	Then I browsed to http://localhost:631, clicked on Administration. I'm prompted for a username and password, so I enter 'root' and my password. Then I clicked on Add Printer, added an lpd/lpr printer connecting to lpd://192.168.1.49/port1 (local IP address of my printserver, which has 2 ports). I selected my printer and driver, printed a test page, and it worked.

	Additional notes: 

-I'm using kde, and I had to make sure that kde was set (in KDE menu:Print System:Print Manager) to CUPS and not lpd/lpr. Once CUPS was set, kde was able to monitor print jobs. Also, it looks like kde has a good setup for CUPS and adding printers, without going thru a browser.

-to get apache and CUPS to start automatically at boot, I did the following as root:

```
rc-update add apache2 default

rc-update add cupsd default
```

This adds apache2 and cupsd to /etc/runlevels/default.

----------

## plasmaroo

I sorted him out a while ago. No apache needed either, CUPS via HPJetDirect socket://......... worked fine  :Smile: 

----------

## christsong84

 *plasmaroo wrote:*   

> It can vary.
> 
> What SORT of *nix printer? LPD or CUPS (IPP)? Or a Windoze box running Unix Printing Services (LPD)? Or the other way round?
> 
> -----------------------------------------------
> ...

 

What about CUPS to LPR?  Is there any way to browse what's avail on the server through lpr (the way you can with samba)?

----------

## ejlinux

Hi,

I just find that I can not print to a samba printer after I run emerge -u world several days ago. Now my cups version is 1.1.18-r4, gimp-print-cups version is 4.3.8-r1, samba version is 2.2.8a. And I even reconfigure my printer and can not print the test page in WWW administration page. The error log is listed below. 

I [01/May/2003:21:59:11 -0500] Job 208 queued on 'lp' by ''.

I [01/May/2003:21:59:11 -0500] Started filter /usr/lib/cups/filter/pstops (PID 1690) for job 208.

I [01/May/2003:21:59:11 -0500] Started filter /usr/lib/cups/filter/cupsomatic (PID 1691) for job 208.

I [01/May/2003:21:59:11 -0500] Started backend /usr/lib/cups/backend/smb (PID 1692) for job 208.

E [01/May/2003:21:59:12 -0500] [Job 208] cli_connect() failed...

I [01/May/2003:21:59:13 -0500] Started "/usr/lib/cups/cgi-bin/printers.cgi" (pid=1697)

I [01/May/2003:21:59:21 -0500] Started "/usr/lib/cups/cgi-bin/printers.cgi" (pid=1698)

I [01/May/2003:21:59:24 -0500] Started "/usr/lib/cups/cgi-bin/jobs.cgi" (pid=1699)

I [01/May/2003:21:59:24 -0500] Job 208 was cancelled by ''.

I [01/May/2003:21:59:28 -0500] Started "/usr/lib/cups/cgi-bin/printers.cgi" (pid=1700)

It seems that it can not connected to the printer. But when I boot into window and it print to that same printer without any problem and I have no problem to print to the same printer before I upgrade my system also. Any suggestions? Thanks.

----------

## ejlinux

Hi,

sorry for the last question. I just found that the problem is caused by I lost my original hosts file in which I put some alias for the machine where my print share is located. Without that, my original printer configuration can not found the specified printer. After change the configuration, everything is OK again.

----------

## foosh

oh man, things working brilliantly with JetDirect...  no samba involved!!!  

it just took me a while to figure out that the network printer I was trying to use was, in fact, using JetDirect...but even once I had figured that out, i didn't realize that it was using a commmpletely different IP address than I was seeing through xsmbrowser...  anyway, i sat down at the windoze machine itself and checked out the printer config, found the correct IP, reconfigured using the CUPS HTML interface and printed one sweet-ace test page!  (which I left downstairs next to the printer for my fellow classmates to marvel over   :Wink:  )

----------

