1.    9

     

    Set up a Linux Print Server for Windows and Mac

    At my apartment, my roommates have all different kinds of laptops.  They want to use my printer, but I can’t always be at there for them to email me the documents so I can print them from my computer.  Luckily I have a desktop running Ubuntu 10.10 in my room for reasons like this.  This tutorial will explain how to set up a Linux machine to be a CUPS print server that will work for Windows, Mac, and PC.

    WARNING! This tutorial involves changing system level settings.  If you are not comfortable in the command line of your Linux server, do not attempt.

    Install the CUPS printing server by typing:

    sudo apt-get install cups

    Next, we need to configure the server to allow network connections.  With Ubuntu this is very simple.

    Open System > Administration > Printing > Server > Settings

    Check “Publish shared printers connected to this system” and you’re done.

    With other distributions like Fedora or openSUSE, I don’t know the interface so you will need to modify the configuration file manually.

    Open a Terminal and type:

    sudo nano /etc/cups/cupsd.conf

    Change Listen localhost:631 to

    Port 631

    After BrowseRemoteProtocols CUPS add

    BrowseAddress @LOCAL

    Within the <Location /> tag after Order allow, deny add

    Allow @LOCAL

    Save and exit.  

    Restart the CUPS server with this command

    sudo /etc/init.d/cups restart

    That’s it! We are done with the server. Now for the clients.

    Windows 7 is very simple to set up.  First open a web browser on the client and see if you can connect to the server with this address

    <SERVERIPADDRESS>:631

    If you are brought to the CUPS Admin page, you did something right.  Now go over to the Printers tab and write down the name of the printer you want to connect to under the “Queue Name” column.  We will need this for later.

    Open the Add New Printer Wizard.  Click “Add a network…printer”

    Click “The printer that I want isn’t listed” then “Select a shared printer by name”

    Enter in the following address

    http://<SERVERIPADDRESS>:631/printers/<PRINTERNAME>

    Where <PRINTERNAME> is the name we wrote down from earlier.  Click Next and then choose the driver of your printer. If it isn’t there, just pick an HP Deskjet, it should work. And that’s it, print a test page and you are done with your Windows client.  

    Mac is a little more involved however.  In the most recent operating system versions of OS X, Apple disabled CUPS scanning the network.  You can fix it back by adding one line to the cupsd.conf file.

    Open System Preferences > Print & Fax.

    Right click in the Printers pane and click “Reset Printing System”

    Open the Terminal and type

    sudo nano /etc/cups/cupsd.conf

    After BrowseAllow all add

    BrowseRemoteProtocols all

    Save and exit.

    Restart the cupsd service with the following commands

    sudo launchctl stop org.cups.cupsd

    sudo launchctl start org.cups.cupsd

    And that’s it.  You are all all done setting up the server to print with any Windows, Mac, or Linux machine.  Good luck.  Feel free to comment if I got something wrong or if there is an easier way to do anything I’ve shown.

     
  2. Feb 14th, 2012     linuxmacwindowscupscupsdprintingserverclient
  1. michaelneeley posted this