# insert this into cups:

## DaggyStyle

hello, I'm trying to get my printserver to work and I need to insert the following to /etc/printcap:

```
          printer-name:\

                  :lp=:\

                  :rm=192.168.0.4:\

                  :rp=PS1:\

                  :lf=/var/spool/PrintServerd.log:\

                  :sd=/var/spool/PrintServerd:\

                  :mx#0:

```

but that file is managed by cups so I need to set it up in cups, how can I do that?

----------

## lxg

You could shut down cupsd and add a printer to /etc/cups/printers.conf. If it helps you, here is mine:

```
# Printer configuration file for CUPS v1.3.5

# Written by cupsd on 2008-02-06 22:49

<Printer BRFAX>

Info BRFAX

DeviceURI parallel:/dev/lp0

State Idle

StateTime 1194357759

Accepting Yes

Shared Yes

JobSheets none none

QuotaPeriod 0

PageLimit 0

KLimit 0

OpPolicy default

ErrorPolicy stop-printer

</Printer>

<DefaultPrinter MFC7420>

Info Brother MFC7420

Location Arbeitszimmer

DeviceURI parallel:/dev/lp0

State Idle

StateTime 1202334417

Accepting Yes

Shared Yes

JobSheets none none

QuotaPeriod 0

PageLimit 0

KLimit 0

OpPolicy default

ErrorPolicy stop-printer

</Printer>

```

There's also a manpage (man printers.conf) for this file.

Apart from that, you will find the CUPS interface at http://localhost:631/ (of course only while cupsd is running). There you will be able to add printers with a wizard-like interface. Afterwards you can add special settings in printers.conf.

----------

## DaggyStyle

 *lxg wrote:*   

> You could shut down cupsd and add a printer to /etc/cups/printers.conf. If it helps you, here is mine:
> 
> ```
> # Printer configuration file for CUPS v1.3.5
> 
> ...

 

thanks for the replay but you have given an example normal print, notice that I need to configure a printserver, these are the modified instructions from the owner's manual but I don't know how to add them correctly.

----------

## lxg

Sorry, but what do you mean with printserver in this case? CUPS is a print server. You can print to a CUPS server from any machine in the network, given that the client machine or network is whitelisted in cupsd.conf.

Or is "Printserver" a name for a special product? Do you want CUPS to actually be the client? Or do you want your machine to print to another CUPS server in the network?   :Confused: 

----------

## DaggyStyle

http://global.level1.com/product_d.php?id=308

----------

## lxg

Interesting device (although CUPS could do the same, though not with all the supported protocols) ...

Anyway, the documentation only refers to Unix lpr, which uses the file /etc/printcap. The problem is that, as far as I know, CUPS doesn't actually use the file /etc/printcap, it creates it only for other services (e.g. Samba). This means, the file tells clients what printers managed by the cups server they can access, but not which files cups as a client can access.

As you are the client in your scenario, I think the way to go would be to create a CUPS client entry in /etc/cups/client.conf and "translate" the lpr settings to the CUPS syntax. 

Or, not use CUPS at all, but use lpr for printing. Most apps should be able to use lpr.

----------

## DaggyStyle

 *lxg wrote:*   

> Interesting device (although CUPS could do the same, though not with all the supported protocols) ...
> 
> Anyway, the documentation only refers to Unix lpr, which uses the file /etc/printcap. The problem is that, as far as I know, CUPS doesn't actually use the file /etc/printcap, it creates it only for other services (e.g. Samba). This means, the file tells clients what printers managed by the cups server they can access, but not which files cups as a client can access.
> 
> As you are the client in your scenario, I think the way to go would be to create a CUPS client entry in /etc/cups/client.conf and "translate" the lpr settings to the CUPS syntax. 
> ...

 

ok, how do I translate it?

----------

## baaann

Can you not use the cups web interface, add printer wizard selecting lpd device? From the print server manual I think you should be able to enter

```
lpd://ip-address-of-printserver/lpt[n]
```

where [n] is the printserver port the printer is plugged into.

----------

## DaggyStyle

 *baaann wrote:*   

> Can you not use the cups web interface, add printer wizard selecting lpd device? From the print server manual I think you should be able to enter
> 
> ```
> lpd://ip-address-of-printserver/lpt[n]
> ```
> ...

 

the ps (printserver from now) can be seen via samba but cannot be accessed for printing:

```
dagg@NCC-5001-D ~ $ smbtree

Password:

WORKGROUP

        \\PS-HPF4180

timeout connecting to 192.168.0.4:445

cli_rpc_pipe_open: cli_nt_create failed on pipe \srvsvc to machine PS-HPF4180.  Error was ERRSRV - ERRnosupport (Function not supported.)

                \\PS-HPF4180\IPC$               Gß‗

                \\PS-HPF4180\P1                 From Printcap

```

so you mean:

```
lpd://192.168.0.4/lpt445
```

?

----------

## baaann

 *Quote:*   

> 
> 
> so you mean:
> 
> Code:
> ...

 

The manual suggests 3 possible queue names lpt1, lpt2 or lpt3

 *Quote:*   

> 
> 
> 3. The printer name (or queue name) on the remote host should be lpt1, lpt2 or lpt3, the name of
> 
> the printer port on the printer server.
> ...

 

Why there should be 3 options when you only have one port on the print server I have no idea, but I guess that lpt1 would be the default.

----------

## DaggyStyle

 *baaann wrote:*   

>  *Quote:*   
> 
> so you mean:
> 
> Code:
> ...

 

ok, understood abit more, but what is the right port?

----------

## baaann

Personally I would try setting up as lpt1, if it doesn't work you can always delete the printer entry from the web interface and try the others

----------

