Wireless printing from the mac (Lion)
This page is obsolete This page describes how to print on OS X (Lion) versions 10.7.0 to 10.7.3.
If you are using 10.7.4 or newer, please see Installing a printer.
This page describes how to set up printing on your Mac.
To be able to print, you must:
- Follow the instructions on this page to install the printers on your Mac. This only needs to be done once.
- Open a Terminal window and log on to our main server with this command:
ssh login.math.ntnu.no.
This needs to be done every time you use your Mac.
You will need to remain logged on to our main server for printing to work. If you log out, printing will stop working (the print jobs will queue up).
We recommend that you run the ssh command above each time you log on to your Mac,
and then just leave it running.
The problem and the solution
Apple has removed some functionality from Lion that was present in Snow Leopard. This means that the instructions used for Snow Leopard no longer work.
We assume that Apple will fix this problem in a later update of OS X (10.7.2, 10.7.3, etc.). Until then, you have to use the workaround described on this page. The procedure is a bit inconvenient, but it will make printing work.
Before you start
You will need to make a note of the name and type of the printer(s) you wish to enable.
Setup instructions
0. Open System Preferences → Print & Scan. If it shows a closed padlock icon in the bottom left corner, click it and provide your password when prompted (or name and password of an administrative user, if you don't have admin privileges yourself).
1. On the left there is a (possibly empty) list of current printers. Click the plus sign icon below the list and choose “Add Printer or Scanner…”.
2. Click «IP» and fill out the form as shown below. Make sure Protocol (red highlight) is set to LPD . Write “localhost:1515” in the Adress-field (red highlight). Replace the text “hp11-4015” in the Queue-field (red highlight) with the official name of the printer. For the Name (yellow highlight) you can use whatever you want; the printer will appear using this name in any printer menu. Fill in some text for the Location (green highlight) if you wish.
3. In the popup menu after the text “Print Using:”, choose “Select printer software …”. This will result in a new popup window containing a long list of printer names, from which you pick the best available fit.
4. Double check your work, then hit the «Add» button.
5. After you hit the «Add» button there will probably pop up a window that looks like the picture below. Just hit the «Continue» button.
6. You now get to specify printer options in a pane that opens up. The most important is to specify the duplex unit, provided the printer can print two-sided. It is probably ok to ignore the other options, with the possible exception of the “Fit to Page” popup, which affects what happens when you print a file that specifies a non-A4 size such as US Letter. If you get this part wrong, you can correct your error later, selecting the printer from the list, then Options & Supplies → Driver. Press Continue and close System Preferences.
7. When satisfied, hit “Continue”.
8. Open the Terminal application (Applications → Utilities → Terminal) and run the following commands:
mkdir -p .ssh touch .ssh/config open .ssh/config
This will open a text editor on a blank file. Copy the following text into that file, but substitute YOUR-NTNU-USERNAME with your NTNU username:
Host login.math.ntnu.no User YOUR-NTNU-USERNAME LocalForward 1515 localhost:515
Save the file and quit the text editor application.
9. Remember that the ssh login.math.ntnu.no command mentioned at the top of the page
must be running when you want to print. If your print jobs just queues up on your Mac
without being sent to the printer, the reason may be that you've been logged out from
our main server. This can happen for several reasons:
- You've closed the Terminal window where you were logged in to our server.
- You've closed the Terminal application.
- Your Mac has momentarily lost contact with the network. This may log you out of our server.
If this happens, just open a new Terminal window and run the ssh login.math.ntnu.no command
again.
Summary (for experts)
- System Preferences → Print & Scan
- Plus icon at bottom of list
- IP tab:
- Protocol: LPD
- Adress: localhost:1515
- Queue: printers name
- Name: (choose carefully – used in printer menu)
- Location: (whatever)
- Print Using: → Select printer software …
- Add button
- Countinue
- Installable options:
- Check duplex unit if available
- Fit to Page: Nearest size and scale
- For printing to work, you must set up an SSH tunnel beforehand:
ssh -L 1515:localhost:515 username@login.math.ntnu.no
or similar.