AppleTalk

Differences between revisions 3 and 5 (spanning 2 versions)
Revision 3 as of 2005-08-28 20:46:43
Size: 2588
Editor: mneptok
Comment:
Revision 5 as of 2005-08-30 08:56:23
Size: 3319
Editor: mneptok
Comment:
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
= Getting Appletalk working = = Appletalk =
Line 3: Line 3:
Some people running Mac OS 9 still want to use Appletalk. Some people using [http://en.wikipedia.org/wiki/Appletalk Appletalk] printers or running Mac OS 9 still want to use Appletalk. While the Appletalk protocol suite is considered deprecated by Apple these days, the large number of legacy devices makes discarding the protocol unfeasible.
Line 5: Line 5:
== Installing == == Installing Appletalk Daemons ==
Line 7: Line 7:
Installation is easy, just use apt-get: Installation is easy, just use apt-get to install [http://netatalk.sf.net Netatalk].
Line 13: Line 13:
== The Problem ==

The Ubuntu node shows up on the Appletalk network as 'localhost'.
This is due to 'hostname -s' returning localhost instead of
using the real name (in /etc/init.d/netatalk).


== The Solution ==

Change the appropriate line in /etc/hosts and move the
real hostname in front of 'localhost.localdomain', for
example:

{{{
127.0.0.1 realname localhost.localdomain localhost
}}}
Line 38: Line 22:
Edit /etc/cups/printers.conf (as root) to add the printer. [http://www.birdhouse.org/~mnep/printers.conf Here's an example] for a printer named "LaserWriter Select 360" Edit /etc/cups/printers.conf (as root) to add the printer. Here's an example for a printer named "LaserWriter Select 360". The "LW360" you see is the name you'd like to see in Ubuntu. It can be almost anything. The "LaserWriter Select 360" name you see in the URL must be exactly the name that nbplkup gave you for the printer.

{{{
# Printer configuration file for CUPS v1.1.23
# Written by cupsd on Mon 25 Apr 2005 02:02:39 PM PDT
<Printer LW360>
Info LW360
Location Local zone
DeviceURI pap://*/LaserWriter Select 360/LaserWriter
State Idle
Accepting Yes
JobSheets none none
QuotaPeriod 0
PageLimit 0
KLimit 0
</Printer>
}}}
Line 44: Line 44:
'''''chmod +x pap''''' {{{
$
chmod +x pap
}}}
Line 46: Line 48:
'''''sudo mv pap /usr/lib/cups/backend''''' {{{
$
sudo mv pap /usr/lib/cups/backend
}}}
Line 50: Line 54:
'''''sudo /etc/init.d/cupsys restart''''' {{{
$
sudo /etc/init.d/cupsys restart
}}}
Line 56: Line 62:
"gs -q -sDEVICE=pswrite -sOutputFile=- -dNOPAUSE -dBATCH -dMozConvertedToLevel2=true - | lpr ${MOZ_PRINTER_NAME:+'-P'}${MOZ_PRINTER_NAME}" {{{
gs -q -sDEVICE=pswrite -sOutputFile=- -dNOPAUSE -dBATCH -dMozConvertedToLevel2=true - | lpr ${MOZ_PRINTER_NAME:+'-P'}${MOZ_PRINTER_NAME}"
}}}
Line 61: Line 69:
== Bug or Feature ? == == Appletalk Names ==
Line 63: Line 71:
There's an open bug report documenting the problem with
said order in /etc/hosts that is causing trouble
with other programs, too.
An Ubuntu node will show up on the Appletalk network as 'localhost'. This is due to 'hostname -s' returning localhost instead of using the real name (in /etc/init.d/netatalk).

To remedy this, change the appropriate line in /etc/hosts and move the real hostname in front of 'localhost.localdomain', for example:

{{{
127.0.0.1 realname localhost.localdomain localhost
}}}

There's an open bug report documenting the problem with said order in /etc/hosts that is causing trouble with other programs, too.

Appletalk

Some people using [http://en.wikipedia.org/wiki/Appletalk Appletalk] printers or running Mac OS 9 still want to use Appletalk. While the Appletalk protocol suite is considered deprecated by Apple these days, the large number of legacy devices makes discarding the protocol unfeasible.

Installing Appletalk Daemons

Installation is easy, just use apt-get to install [http://netatalk.sf.net Netatalk].

$ sudo apt-get install netatalk

Appletalk Printing

Getting your Ubuntu installation to print to an Appletalk printer is relatively easy.

First, install Netatalk from apt or Synaptic (see above).

Once that is installed, run "nbplkup" to find the names of the Appletalk printers on your network. Make a note of thse names.

Edit /etc/cups/printers.conf (as root) to add the printer. Here's an example for a printer named "LaserWriter Select 360". The "LW360" you see is the name you'd like to see in Ubuntu. It can be almost anything. The "LaserWriter Select 360" name you see in the URL must be exactly the name that nbplkup gave you for the printer.

# Printer configuration file for CUPS v1.1.23
# Written by cupsd on Mon 25 Apr 2005 02:02:39 PM PDT
<Printer LW360>
Info LW360
Location Local zone
DeviceURI pap://*/LaserWriter Select 360/LaserWriter
State Idle
Accepting Yes
JobSheets none none
QuotaPeriod 0
PageLimit 0
KLimit 0
</Printer>

This example assumes a single, default Appletalk zone. If you have more than one zone, replace the * in the printer URL with the zone name.

The last step is to provide CUPS with a working PAP (the Netatalk printing methodology) backend. You may download one from [http://www.birdhouse.org/~mnep/pap here]. Once you have that file, cd to where that file is stored and

$ chmod +x pap

$ sudo mv pap /usr/lib/cups/backend

Now all you need to do is restart CUPS. You can do this with

$ sudo /etc/init.d/cupsys restart

This should provide you with Appletalk printing. Open the Printing admin tool and ensure the printer appears there. Try sending a test page.

If all is well, the only remaining step is to ensure Mozilla variant browsers will print. Mozilla uses a newer Ghostscript engine than most Apple printers will support. If an error page stating this comes from the printer when you try to print from Firefox/Mozilla, change the default print string in Firefox/Mozilla's printing prefs to

gs -q -sDEVICE=pswrite -sOutputFile=- -dNOPAUSE -dBATCH -dMozConvertedToLevel2=true - | lpr ${MOZ_PRINTER_NAME:+'-P'}${MOZ_PRINTER_NAME}"

There you go. Appletalk printing from Ubuntu! Enjoy.

Appletalk Names

An Ubuntu node will show up on the Appletalk network as 'localhost'. This is due to 'hostname -s' returning localhost instead of using the real name (in /etc/init.d/netatalk).

To remedy this, change the appropriate line in /etc/hosts and move the real hostname in front of 'localhost.localdomain', for example:

127.0.0.1  realname localhost.localdomain localhost

There's an open bug report documenting the problem with said order in /etc/hosts that is causing trouble with other programs, too.

https://bugzilla.ubuntu.com/show_bug.cgi?id=2256

CategoryDocumentation CategoryCleanup

AppleTalk (last edited 2008-08-06 16:39:39 by localhost)