个人工具

“UbuntuHelp:AppleTalk”的版本间的差异

来自Ubuntu中文

跳转至: 导航, 搜索
第2行: 第2行:
 
{{Languages|UbuntuHelp:AppleTalk}}
 
{{Languages|UbuntuHelp:AppleTalk}}
 
=== Introduction ===
 
=== Introduction ===
Some people using [http://en.wikipedia.org/wiki/Appletalk AppleTalk] printers or running Mac OS 9 still want to use [[UbuntuHelp:AppleTalk|AppleTalk]]. While the [[UbuntuHelp:AppleTalk|AppleTalk]] protocol suite is considered deprecated by Apple these days, the large number of legacy devices makes discarding the protocol unfeasible.
+
Some people using [[http://en.wikipedia.org/wiki/Appletalk|AppleTalk]] printers or running Mac OS 9 still want to use [[UbuntuHelp:AppleTalk|AppleTalk]]. While the [[UbuntuHelp:AppleTalk|AppleTalk]] protocol suite is considered deprecated by Apple these days, the large number of legacy devices makes discarding the protocol unfeasible.
 
=== Installing [[UbuntuHelp:AppleTalk|AppleTalk]] Daemons ===
 
=== Installing [[UbuntuHelp:AppleTalk|AppleTalk]] Daemons ===
Installation is easy, just use apt-get to install [http://netatalk.sf.net Netatalk].
+
Installation is easy, just use apt-get to install [[http://netatalk.sf.net|Netatalk]].
 
<pre><nowiki>
 
<pre><nowiki>
 
sudo apt-get install netatalk
 
sudo apt-get install netatalk
第23行: 第23行:
 
sudo /etc/init.d/netatalk start
 
sudo /etc/init.d/netatalk start
 
</nowiki></pre>
 
</nowiki></pre>
[http://archives.devshed.com/forums/networking-100/nbp-rgstr-connection-timed-out-startingnetatalk-on-fedora4t-1871279.html Reference]
+
[[http://archives.devshed.com/forums/networking-100/nbp-rgstr-connection-timed-out-startingnetatalk-on-fedora4t-1871279.html|Reference]]
 
=== [[UbuntuHelp:AppleTalk|AppleTalk]] Printing ===
 
=== [[UbuntuHelp:AppleTalk|AppleTalk]] Printing ===
 
Getting your Ubuntu installation to print to an [[UbuntuHelp:AppleTalk|AppleTalk]] printer is relatively easy.
 
Getting your Ubuntu installation to print to an [[UbuntuHelp:AppleTalk|AppleTalk]] printer is relatively easy.
第59行: 第59行:
 
</Printer>
 
</Printer>
 
</nowiki></pre>
 
</nowiki></pre>
The last step is to provide CUPS with a working PAP (the Netatalk printing methodology) backend. You may download one from [ftp://saf.bio.caltech.edu/pub/software/linux_or_unix_tools/pap here]. Once you have that file, cd to where that file is stored and:
+
The last step is to provide CUPS with a working PAP (the Netatalk printing methodology) backend. You may download one from [[ftp://saf.bio.caltech.edu/pub/software/linux_or_unix_tools/pap|here]]. Once you have that file, cd to where that file is stored and:
 
<pre><nowiki>
 
<pre><nowiki>
 
sudo chmod +x pap
 
sudo chmod +x pap

2008年10月19日 (日) 04:13的版本

Introduction

Some people using [[1]] 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 [[2]].

sudo apt-get install netatalk

In case you get an error similar to:

Starting Netatalk services (this will take a while): nbp_rgstr: Förbindelsen dog ut (timeout)
Can't register laptop:Workstation@*
invoke-rc.d: initscript netatalk, action "start" failed.
dpkg: fel vid hantering av netatalk (--configure):
 underprocess post-installation script gav felkod 1
Fel uppstod vid hantering:
 netatalk
E: Sub-process /usr/bin/dpkg returned an error code (1)

Then try adding your AppleTalk connected interface (eth0, eth1 etc) to the end of /etc/netatalk/atalkd.conf and then retry starting the services:

sudo /etc/init.d/netatalk start

[[3]]

AppleTalk Printing

Getting your Ubuntu installation to print to an AppleTalk printer is relatively easy. With netatalk installed, run nbplkup to find the names of the AppleTalk printers on your network. Make a note of these names. Edit /etc/cups/printers.conf (as root) to add the printer. Here's an example for a printer named "Laser Writer Select 360". The "LW360" you see is the name you'd like to see in Ubuntu. It can be almost anything. The "Laser Writer 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://Laser%20Writer%20Select%20360
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, the printer URL should end with %40 followed by the zone name.

# 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://Laser%20Writer%20Select%20360%40zonefour
State Idle
Accepting Yes
JobSheets none none
QuotaPeriod 0
PageLimit 0
KLimit 0
</Printer>

The last step is to provide CUPS with a working PAP (the Netatalk printing methodology) backend. You may download one from [[4]]. Once you have that file, cd to where that file is stored and:

sudo 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.

Finding Your Printer URI

You can find the correct URI for your printer by calling the backend without argument :

/usr/lib/cups/backend/pap

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://launchpad.net/distros/ubuntu/+source/netcfg/+bug/8980