Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Locating CUPS print hosts on the network Network
CUPS printing works fine out of the box for most people, but there are a few exceptions. The biggest problem is that many people can't seem to find networked CUPS print servers. I found, in my case, this was because CUPS was not being told where to look for one.

There is a file in /etc/cups called client.conf which needs to be edited. This is most easily done with pico (a Terminal text editor), but as the file is also owned by root, you need to be an administrator. Open the terminal program and move to the cups directory by typing cd /etc/cups then type sudo pico client.conf to start editing the file. If you want to, you could make a backup first by typing something like sudo client.conf client.backup.conf. The first time you use sudo you will get a warning about being careful and, whenever you use sudo after a long period as a 'normal' user, you need to enter your password.

In pico, find the line starting with #ServerName and on the next line, type ServerName Name_of_print_host (don't use quotes or anything; just type the name of the host). Notice the lack of a # sign at the start of the line. There shouldn't be one - that's important. Press control-x to exit pico and save (say yes, you do want to save the file). That's the change made.

Now, for the changes to take effect, you need to restart the cupsd deamon. If you don't like doing this soft of command line stuff, just restart the machine. If you don't want to restart, the following line will usually do it (it finds the pid of the cupsd deamon and sends it a restart command). This all needs to go on one line so it might be better not to copy and paste. Also notice the single quote marks near the start and right at the end are the ones on (on my Apple keyboard) the left under the ~, not the one under the double quote:
sudo kill -HUP `ps -Uroot | grep -n "cupsd" | awk '{print $2}'`
When you next run Print Center, all the printers from the print host should appear.
    •    
  • Currently 0.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (0 votes cast)
 
[6,972 views]  

Locating CUPS print hosts on the network | 2 comments | Create New Account
Click here to return to the 'Locating CUPS print hosts on the network' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Restarting CUPS
Authored by: Anonymous on Aug 31, '02 04:52:42PM

An easier way to do this is to deselect printer sharing in the System preferences and then reselect. This turns CUPS off and then on again. No need to reboot.



[ Reply to This | # ]
Restarting CUPS
Authored by: nevlyn on Sep 02, '02 02:43:46PM

This restarts the CUPS daemon but does not always re-read the client.conf file. In fact, if you don't mind a slight delay when the printer dialog appears and are worried about security, you don't have to turn on printer sharing at all (the Print Center still uses the client configuration). In this case, a reboot (or forced killing of the background cups client process started - I assume - by the system) is needed.



[ Reply to This | # ]