Print from Mac to Ubuntu Printer w/o Samba

Mindwatering Incorporated

Author: Tripp W Black

Created: 09/16/2010 at 02:28 AM

 

Category:
OS X Tips & Hints, Ubuntu
General Mac Tips
Configuration Files

How to configure Ubuntu and a Mac OS X client to use a printer attached to an Ubuntu workstation.

For this example, we are assuming the following for our Ubuntu workstation and printer:
myubuntuworkstation.local
192.168.1.176
printers/myprinter

PART I: Configure the Ubuntu Server/Workstation

1. Add the printer and make sure it works locally on the Ubuntu workstation.
2. Share the printer.
Ubuntu 16 and earlier:
System --> Administration --> Printing

Ubuntu 18/20:
Settings --> Printers --> Additional Printer Settings -->Printers - localhost (dialog pop-up)

2a. Menu --> Server --> Settings
Check/enable "Publish shared printers connected to this system"
Check/enable "Allow remote administration"
Check/enable "Allow users to cancel any job (not just their own)"
2b. Right-click Printer --> (click/enable) Shared.
2c. Right-click Printer --> Properties.
Access Control (tab) --> (verify selected radio button) "Allow printing for everyone except these users"
2d. Note the name of your printer (e.g. myprinter)

Go to the Mac:
1. Macintosh HD (Open the local Mac file system.) --> Applications --> Utilities --> Network Utility
Port Scan (tab) --> myubuntuworkstation.local
Verify that port 631 is displayed as open.
(If not you need to go back to Ubuntu and open it.)
Quit the Network Utility program. (<apple + q>)
2. Open a browser (Firefox or Safari)
2a. Enter the full address (URL) to your printer as follows to bring up the CUPS administration page:
http://myubuntuworkstation.local:631

2b. It is likely you are going to get "400 Bad Request".
If you got the error, do the following tangent below.
If not, your Mac has successfully accessed the other server. Verify you can Print Test Page using the Manage Printers option under Administration.

Important:
Use the "Print Test Page", and NOT the "Print Self Test Page". The latter will send you hunting for a CUPS issue for "unsupported format 'application/vnd.cups-command'!".

2c. If you printed successfully, proceed to step 3 below.
__________________
Tangent:

T1a. Enter the IP instead:
http://192.168.1.176:631
T1b. Choose the Administration option --> choose the "Edit Configuration File" option --> add a new line (we put it at the top):
ServerAlias = myubuntuworkstation.local
T1c. Click the Save button. Wait for the services to restart.
Now try 2a again.

Note: Cannot get Tangent 1a to load (T1a)?
Perhaps the CUPS admin pages are still blocked.
T2a. On the Ubuntu server, start a terminal and enter the following:
$ sudo vi /etc/cups/cupsd.conf
T2b. Change the line Listen localhost:631 to:
Port 631
Change the Restrictions section to:
<Location /admin>
Order allow,deny
Allow from 192.168.1.*
</Location>
(use your network mask)
_______________________

3. Now add your printer to your Mac. System Preferences --> Print & Fax
3a. Click "+" to add a new printer.
3b. Choose IP tab.
3c. Change Protocol to IPP from LPD.
3d. For Address, enter your Ubuntu workstation's host name as follows:
myubuntuworkstation.local:636
Note:
For OS X 10.7 and 10.8, leave off the port number. It now works again w/o it.
myubuntuworkstation.local
3e. For Queue, enter the printer as follows:
printers/Myprinter
3f. Select the appropriate driver for your printer.
3f. Click Add.

4. Print a test page, again.
If you printed, congratulations.
If you did not, check the error in the printers queue window. Then verify your protocol, address, and queue as needed.


Note:
If you get a firewall message about opening port 631 (IPP), do so.

previous page