Mandriva

Printing With CUPS

Summary:

Setup and Configuration III

  • Clients Accessing The CUPS Server
    - CUPS
    - LPD
    - Windows
Section index - KB index

Setup and Configuration III

Clients Accessing The CUPS Server

The printers provided by a CUPS server (machine with the CUPS daemon running) can be accessed by a wide range of clients:

CUPS clients

The CUPS daemon broadcasts information about its printers and classes into the local network. Every machine in the local network which has a CUPS daemon running picks up these signals. Thus it knows which printers are available in the local network. So a CUPS client just needs to to start its CUPS daemon and it has access to all the printers on the local network. There's no need to configure anything. Note that the broadcasting happens only every 30 seconds, so it will take up to 30 seconds until your CUPS client sees all printers in your local network.

As has been told above, broadcasting only works when client and server are in the same local network.

If you do not like to have a CUPS daemon running on your client, simply turn it off:

chkconfig &#150;&#150;del cups<br> service cups stop

and edit the file '/etc/cups/client.conf' to have these lines:

~ServerName &#123;name or IP of a server running the CUPS daemon&#125;<br> ~DefaultPrinter &#123;name of the printer you like to have as default&#125;

You can choose every machine which runs the CUPS daemon in your network as a server. You do not only get access to its local printers, but also to all the printers which are broadcast at the server from other servers. DO NOT uninstall the CUPS package, it does not contain only the CUPS daemon, but also all the printing commands as

lpr
,
lpq
, and so on.
On such a daemon-less client you can print with all of the usual printing programs for CUPS:
xpp
,
qtcups
, or
lpr
.

article index

LPD clients

To accept printing jobs from a remote LPD client (for example a machine with an older distribution than Mandrake 7.2 or with a commercial Unix), the CUPS server needs an additional daemon, the CUPS-LPD mini daemon. The CUPS Software Administrator's Manual recommends to start it via the 'inetd' daemon. This is also possible in Linux Mandrake 7.2, but Linux Mandrake 7.2 has the more modern 'xinetd'.
So at first check which of these daemons is running:

ps auxwww|grep inet

Look for

inetd
or
xinetd
. If neither is running, start 'xinetd' with:

chkconfig &#150;&#150;add xinetd<br> service xinetd start

If 'xinetd' is running, add

service printer { socket_type = stream protocol = tcp wait = no user = lp server = /usr/lib/cups/daemon/cups-lpd }

to the '/etc/xinetd.conf' file and restart 'xinetd':

service xinetd restart

If 'inetd' is used, add

printer stream tcp nowait lp /usr/lib/cups/daemon/cups-lpd cups-lpd

(that's one line)
to the file '/etc/inetd.conf' and restart 'inetd':

service inet restart

Now the CUPS-LPD mini daemon will be invoked on any LPD request sent to your server. On the client you have to configure a remote LPD printer where the host name is the name of the server and the queue name is the name of the CUPS queue for the printer. All queues are allowed, queues of printers locally defined on the server and also queues the server knows by a broadcast from another server. So when your server is called "paperwaster" and it has a CUPS queue called "laserjet", you simply configure an LPD queue on your client which sends the data to the "laserjet" of "paperwaster".

article index

Windows Clients

For accessing your printers from clients running Microsoft Windows, you need to run Samba which makes the resources of your Linux machine available to the Windows clients. To activate it, you should have the 'samba' package installed (

urpmi samba
) and you have to start the SMB daemon:

chkconfig &#150;&#150;add smb<br> service smb start

Samba on Linux Mandrake 7.2 is preconfigured to make all CUPS printers available on the guest account. So you can get started easily. Note that the default configuration uses the CUPS drivers of the printers and expects that you set up the printers as a "Generic ~PostScript" printer on the Windows clients. If you want to use the Windows drivers of the respective printer instead, you can do so by editing the

print command
(section '{printers}' in '/etc/smb.conf': the line with the
-o raw
option should be 'active', i.e without a leading "
;
", whereas and the line without "-o raw" is commented out (with a leading "
;
"). Restart the Samba daemon:

service smb restart

To restrict access you have to edit '/etc/smb.conf' and to restart the SMB daemon with

service smb restart

, too. Alternatively, you can use the Samba web configuration tool (SWAT) by going to http://localhost:901/.

article index

Related Resources:

See Resources on article index

Modified: Nov. 15, 2000
Author: Tom Berger

Legal: This page is covered by the GNU Free Documentation License. Standard disclaimers of warranty apply. Copyright LSTB and Mandrakesoft.

KB - Printing With CUPS
Version 1.3 last modified by AdminWiki on 22/03/2004 at 09:44

 


en

RSS

Creator: AdminWiki on 2004/03/22 09:44
(c) Mandriva 2007
18888888