Previous 1 2 3 Next 37 Replies Latest reply: Jan 19, 2014 8:57 AM by rminot Go to original post
  • Bob R Oregon Level 1 (60 points)

    Here is the same help page from cups 1.6svn. Note that the section "Automatic configuration using CUPS Browsing" has been removed! Searching for "cups browsing" (with quotes) found nothing in 1.6svn  Note the last paragraph  under "The Basics" has changed, there is a lot less that clients can automatically discover. I can only conclude functionality has been removed, and one has to find out the hard way, it no longer works and then one compares documents manually. I personally find this ironic because when I bought my mac-mini and printing just worked, I was so impressed the next computer I bought was the mac book air with mountain lion.


    Printer Sharing

    This document discusses several ways to configure printer sharing.

    The Basics

    A "server" is any machine that communicates directly to a printer. A "client" is any machine that sends print jobs to a server for final printing. Clients can also be servers if they communicate directly with any printers of their own.

    By default, CUPS uses the Internet Printing Protocol (IPP) to send jobs from a client to a server. When printing to legacy print servers you may also use the Line Printer Daemon (LPD) protocol when printing to older UNIX-based servers or Server Message Block (SMB) when printing to Windows® servers.

    Clients can automatically discover and access shared printers via DNS Service Discovery (DNS-SD a.k.a. Bonjour®). SMB browsing can also be used to manually discover and access shared printers when Samba is installed.



    Configuring the Server

    You must enable printer sharing on the server before clients can print through it. The simplest way to do this is to use the cupsctl(8) command on the server:

    cupsctl --share-printers 

    By default, the above command will allow printing from other clients on the same subnet as your server. To allow printing from any subnet, use the following command instead:

    cupsctl --share-printers --remote-any 

    Next, tag each printer that you want to share using the lpadmin(8) command on the server, for example:

    lpadmin -p printer -o printer-is-shared=true 

    You can require authentication for shared printing by setting the policy on each printer, for example:

    lpadmin -p printer -o printer-op-policy=authenticated 

    Automatic Configuration using IPP


    This method of configuration does not work on OS X 10.7 or later because sandboxed applications do not always have direct network access.

    CUPS can be configured to run without a local spooler and send all jobs to a single server. However, if that server goes down then all printing will be disabled. Use this configuration only as absolutely necessary.

    The default server is normally the local system ("localhost"). To override the default server create a file named /etc/cups/client.conf with a line as follows:

    ServerName server 

    The server name can be the hostname or IP address of the default server. If the server is not using the default IPP port (631), you can add the port number at the end like this:

    ServerName server:port 

    The default server can also be customized on a per-user basis. To set a user-specific server create a file named ~/.cups/client.confinstead. The user client.conf file takes precedence over the system one.

    Finally, you can set the CUPS_SERVER environment variable to override the default server for a single process, for example:

    CUPS_SERVER=server:port firefox 

    will run the Firefox web browser pointed to the specified server and port. The environment variable overrides both the user and systemclient.conf files, if any.

    Manual Configuration of Print Queues


    This method of configuration does not work on OS X 10.7 or later because sandboxed applications do not always have direct network access.

    The most tedious method of configuring client machines is to configure each remote queue by hand using the lpadmin(8) command:

    lpadmin -p printer -E -v ipp://server/printers/printer 

    The printer name is the name of the printer on the server machine. The server name is the hostname or IP address of the server machine. Repeat the lpadmin command for each remote printer you wish to use.

  • Bob R Oregon Level 1 (60 points)

    If I go to the CUPS website and look at whats new for 1.6, at



    There is this buried in the technical jargon:


    11. Sharing Protocols; The scheduler no longer supports the CUPS, LDAP, or SLP protocols for printer sharing.


    What I think this means you can no longer use CUPS with CUPS! Huh? I think there are dozens of threads of users that now have printing problems after updating to mountain lion. I really don't know what the "best" solution is. I had to manually add the printer, under "connection" I used "ipp://". I know it will always be at that IP because I have told my router, I don't know if that is necessary; the "/printers/MP160" part I knew from going into the cups web page that was local to the linux printer server system, that may have also told me ipp was used, I don't remember, and I don't know if my fix will survive a restart. It would be nice if Apple had a how-to or best work around since the auto-discover no longer works.

  • ralf_on_iMac Level 1 (0 points)

    Reply to Bob R Oregon:


    Thx for your valuable input here! You asked in one of the earlier posts:

    Bob R Oregon wrote:



    I may have gotten it work for me, but I am not completely sure yet. First, some questions. At one point, you seem to have said you manually added a printer at locationhttp://    Did you do this on your mac, with cups web, and is/was your linux print server    So, on your mac, you can web browse to localhost:631 , go to the printers tab, and it list printer(s)? Yet, when you go to your "System Preferences" > "Print & Scan", and then "+" to add a printer, the lists don't agree? (and you've done right click to get advanced and can force search for new printers...). If they don't agree, what does the command "lpstat -a" in terminal return?


    Yes, I did this on my Mac.

    Yes, I can web browse to the remote printer. No problems.

    Yes, I did all the steps you refer to ...."print&Scan", then "+" ...etc.

    The Mac printer list shows only "EPSON_R285", the lpstat -a command shows:


    Ralfs-iMac:~ ralf$ lpstat -a

    EPSON_R285 accepting requests since Sön 11 Nov 14:03:17 2012

    RAW_R285 accepting requests since Sön 11 Nov 14:04:42 2012

    Ralfs-iMac:~ ralf$


    The RAW_R285 is the one that showed up automatically and worked perfectly before in Lion and which still prints the files flawlessly, once I re-direct the printerjob to this printer after it has failed to print to EPSON_R285. This re-directing is of course done in the CUPS web interface; you can't do this from OSX. So there is nothing wrong with the printer or CUPS, or how the printer is set-up. It's OSX that has changed.


    So, to be clear here:

    We are not talking about a bug here. The extrated pages from the CUPS manual clearly show that Apple has actively removed an imporant function; not by accident, but deliberately. What is the customer value of this? I get the strong impression that Apple is trying to keep customers to the Apple world by preventing customers to do what they want: using quality and innovative products and machines that just work in any network, not just Apples.

    Instead of forcing customers to stay inside the Apple-world, it's much better to make the Apple products so much better than the competition, that customers WANT to stay in the Apple-world (Pull instead of Push in marketing terms). This is exactly what I liked when I bought my Mac-mini: it just worked.... It was this that made me buy the big iMac! Forcing has never worked in the long run in the past and will never work. In fact, today, I have no plans to buy another Apple product.

    Apple is just becoming another very big company which thinks that the short term values for the company are more important than the values they provide to its customers. This is a big, but classic mistake. I hope I am wrong about Apple here......

  • Bob R Oregon Level 1 (60 points)

    Hi Ralf, since asking you those questions, I have gone to the cups web site and learned a few things, although there are many parts of the documentation that I still don't understand. The following may help explain why the cups protocol is being discontinued:


    These changes have been in the works for over a year now, and in hindsight maybe could have been handled better. If cups protocol for auto discover is being dropped because of excessive broadcasts, then newer versions of cups could have still listened as a client, but not use it as a server. I think this would have been more backward compatible. But there are a lot of things I do not understand about cups.


    I can tell you what I have experienced, with some speculation of what is going on. I have a HP laser printer connected thru usb to a linux system running CUPS 1.3.9 (a very old system). When I got my mac-mini, running Lion with CUPS 1.5.4, it auto discovered that printer right away, I didn't have to go to the cups web interface, and I didn't have to run "cupsctl BrowseRemoteProtocols=cups" in terminal. If I go to the mac-mini now and say I want to add a printer, it lists the printer and under "Kind" it reports "Bonjour Shared", which is what is now favored over cups protocol.


    I have a second printer, a Canon inkjet, that is connected thru usb to a second linux system, running CUPS 1.4.3. The two linux systems could print to either printer, it just worked. The mac-mini did not see the Canon inkjet until recently, after I ran "cupsctl BrowseRemoteProtocols=cups" in terminal. I might have run some other terminal commands on the linux system cupsctl --share-printers and cupsctl 'BrowseLocalProtocols="cups dnssd lpd smb"''  ( I don't always understand everything, but I do try to read the documentation and do what it says, perform trial and error and iterate. Slowly over time, I understand more.)


    Now, in hindsight, I assume my laser printer was shared using dnssd (bonjour) and the inkjet using cups protocol. Why? I can only guess, different defaults? [WHAT IS VERY CONFUSING IS THAT THE CUPS 1.5 (and before?) DOCUMENTATION HAS A SECTION TITLED "Automatic Configuration using CUPS Browsing" AND WHAT THEY ARE TALKING ABOUT IS CUPS PROTOCOL?] But that section is now deleted, so it is somewhat moot. (But it still has a heading Automatic Configuration using IPP, which I don't understand, maybe it means dns-sd, but now with Bonjour favored and cups gone, the document needs a rewrite. But I digress.)


    Mountain Lion was shipped with cups 1.6svn (the svn means a snapshot development release!) and the cups protocol is no longer there.


    In conclusion, now, I _think_ that if you go to your linux, and run 'BrowseLocalProtocols="dnssd"'', and I don't know what else may have to get cleared/reset/rebooted, but then your Mountain Lion system should auto discover your printer. That's if BrowseLocalProtocols means what I think it means, although BroadcastAutoDiscoverProtocols might be a better word. Right now I can't remember if there was something more I had to do to my Mountain Lion system for it to auto discover my laser printer. But if you are willing to change your linux system from cups to dnssd, and reset the print system on your ML (System Prefs>Print &Scan, then left click in box on left, click on reset), well, then try it and post back. There are other possible solutions, put cups 1.6 on your linux, or cups 1.5 on your mountain lion, but those may cause other problems.

  • Bob R Oregon Level 1 (60 points)

    > In conclusion, now, I _think_ that if you go to your linux, and run'BrowseLocalProtocols="dnssd"''


    my linux print server is running CUPS 1.4.3, and this did not work for me. After doing this, I couldn't get either mac to see my printer.


    There is some discussion going on at forum about the incompatibilities, but it is above my level.


    I did have it working at one time.

  • Bob R Oregon Level 1 (60 points)

    Ralf, you may have a few options.


    Option 1. Since your lpstat -a  returns both printers, then instead of needing to go into the cups web interface each time to re-direct, you might be able to go into your terminal and do:

    lpmove EPSON_R285 RAW_R285


    I don't know if you only need to do this once, or every time you try to print. If you need to do it every time, in terminal you can use your curser arrow keys (up) to recall previous commands making it simple to redo, that may be your simpliest option.


    Or you could write a script, with nano or vi or some text editor, something like:


    while true


       string=`lpstat -o EPSON_R285`

      if [ -n "$string" ]


        lpmove EPSON_R285 RAW_R285


       sleep 60



    If you don't know how to do this, in terminal, you can "nano movejobs" then type/paste in the above, write it out, exit nano, then in terminal "chmod +x movejobs" and then "./movejobs"

    If you shut down, you will again need to "./movejobs"after starting up each time. Every minute, it will check if your queue for EPSON_R285 has anything in it, and if it does, it will move it to RAW_R285. I don't have the same problem as you, so I haven't tested this.


    Option 2. To get CUPS 1.6 and Mountain Lion to automatically work "Bonjour" with an older CUPS server, you not only need to change protocol to dnssd, but also according to what I have been told on the cups forum,  'use one of the various add-ons to register DNS services for each of the queues so they appear in the "nearby printers" list.' If anyone else is reading this and understands this, please help me out! I have gone to the cups forum, created a login and expressed some of my frustration.


    Option 3. I seem to have my system again working by doing this: I go to my MBA running Mountain Lion, safari > localhost:631 (this is the cups web interface) then  click on the admin tab , click on "Add Printer" button, I selected "Internet Printing Protocol (ipp)", next page in the connection box I entered "ipp://", next page I fill in Name, Description, Location, I do not check "share this printer", next page, for the "make", there wasn't cannon available, so I selected "Raw", next page under Model, "Raw Queue (en)" was all there was, so I clicked "add printer", next page was banners, I left it to none, and clicked "set default options". This seemed to set it, it told me default options have been set successfully. Now when go to "System Preferences" > "Print & Scan", the MP160 shows up as kind "Remote Printer"   I hope what this means is that my MBA sends the pdf file to the server and then it gets printed using the driver on the server (linux running cups 1.4). It seems to work for me, even after rebooting, but I can't guarantee it will work for you. I could not get adding the printer using OSX  "System Preferences" > "Print & Scan" >  "+" to work, no matter how I filled it out.


    Eventually, I may try installing CUPS 1.6 on my linux.

  • ralf_on_iMac Level 1 (0 points)

    Hi Bob, Thx for persisting!


    I had tried the lpmove command before and learned that this does not work in general, but you need to have a print job in the queue for that printer. However, the script, looking for a failed printer job every minute, is a good idea and this should work.

    The 2nd proposal, I don't understand that either, so I have to skip this.

    The 3rd proposal is what I have done all the time (I think !!)

    But, I thought, well, doesn't harm to try it again...

    I did exactly as you said, but the very last step was extra, compared to what I did many times before:

  page was banners, I left it to none, and clicked "set default options".........


    This clicking "set default options" seemed to do the trick!!

    This remote raw printer appeared in the Mac printer list as a remote printer and although it says "grayscale", is does print in full color. No problems. I can now print both from my linux workstations and the iMac to the same printer on the Linux server.


    All problems solved!!  Thanks Bob!


    Thanks to you, I have now the same functionality on Mountain Lion as with Lion.

  • rminot Level 1 (5 points)

    Greetings! Hopefully all this trouble might be of some help here!

    Using MAVERICKS!


    All seemed to be fine printing to Fedora 17. There's an HP laserjet 6mp attached to the linux box by usb. Could print fine. (Although, I don't remember doing so since upgrading to Mavericks).


    The Linux box got an upgrade and is now running Fedora 20, and got a new hard drive.

    According to the cups from the linux, the printer connection is listed as:  hp:/par/HP_LaserJet_6MP?device=/dev/parport0.


    How do I get to this from Mavericks? I've tried... and tried hard.


    Mavericks recognizes it as a bonjour printer. But adding it that way, it fails to load some software.

Previous 1 2 3 Next