CUPS is a printing system. What does it mean?
In Linux, printers are represented as queues. Each queue can be a
different printer, or the same printer with different configurations.
When you print something, you send the file to a server in memory. This
server processes the file and sends it to the required queue. It is nice
because local printers and remote printers (of whatever kind) just look
the same for the user.
This server is CUPS (or it could be LPRng,
LPD, etc). It is very complex compared with older
systems like LPRng, and is able to process documents
before they are printed in a very nice way. Some KDE printing features
(in the printing dialog) work only with CUPS.
How do I configure Cups for Server/Client operation ?
SuSE appears to only setup CUPS as a server on your localhost, which causes
problems when setting up a client/server configuration.
The configuration files for cups are located at /etc/cups
There are two main config files:
-
cupsd.conf
-
= Server configuration (used if you have a printer connected to
this machine)
-
client.conf
-
= Client config (used if you are a client to a cups server)
Procedure 1.
Configuring for Server/Client operation
Note
You will have to be logged in as root to alter either of these files.
-
Altering cupsd.conf
This file is extremely well commented and includes examples of what you should
enter.
-
Firstly, at about line 50, add your ServerName. (you will see an example
commented out as shown below).
#ServerName myhost.domain.com
-
Next locate the section marked "######## Browsing Options"
located about line number 470.
Search for BrowseAddress and add your ip address, and replacing the last number
with 255. For example, if my ip address is 10.1.2.3 , I would enter the following:
BrowseAddress 10.1.2.255
Then slighly further down I would add:
BrowseAllow 10.1.2.*
-
Locate the Section marked "######## Security Options" towards the end of
the file. Following this there is details on configuring "Access permissions"
and you see the following:-
<Location />
Order Deny,Allow
Deny From All
Allow From 127.0.0.1
Allow From 127.0.0.2
</Location>
Add in your ip address range, otherwise you will find you are not permitted to
access the CUPS server. e.g.
<Location />
Order Deny,Allow
Deny From All
Allow From 127.0.0.1
Allow From 127.0.0.2
Allow From 10.1.2.* ###
</Location>
-
Altering client.conf
This file is used on machines which are a client to a CUPS Server (e.g. No
printer connected to the machine but connects to another machine to print)
At about line 40 you will find an example commented out of setting the
ServerName. e.g.
#ServerName myhost.domain.com
Add an entry with the Fully Qualified Domain Name of your server there.
-
Debugging Cups problems
All errors are logged in /var/log/cups/error_log file, just goto the end of
the file for the latest debug statements.
The level of the debug entries are controlled by an entry in
/etc/cups/cupsd.conf file. Search for LogLevel, it should be about line
165
Warning
WARNING: Do not set this level too high otherwise you will be flooded with
debug messages and won't be able to identify what is wrong. Start with "info"
and if this does not supply enough details then proceed to "debug". I have
never needed to go any higher than this.
-
Please ensure you restart cups after any alterations are done to the above
configuration files. e.g.
rccups restart
or
/etc/init.d/cups restart
Also see:
How to add root password to cups
>When you try to
change the lp password in Yast it replaces your changes with what was there
when you changed it.
lppasswd -g sys -a root (or any user name)
will add root to allow changes to the printing system. This change was
introduced during the last security updates and is a popup information
window when you install cups.