Netatalk, Linux and the Macintosh

With Netatalk, you can drag and drop files from Linux to Mac and back, share system resources and more.

Unix workstations, PCs running Windows 3.x/95/NT/Linux, FreeBSD, and other systems must be able to communicate seamlessly and share data whether they are in an engineering, business or home environment. More than one type of computer platform existing on the same network is a fact of life. Fortunately, with programs such as Netatalk it's easy to get Apple Macintosh computers and Linux systems to coexist and share resources. This article describes what Netatalk is, what it does, where to get it, and how to install, configure and test it. We also included a short technical description of how Netatalk works.

If you have a Mac and want to run Linux, you can use MkLinux (see LJ #31, page 55). If you have a PC and want to run MacOS, you can use Executor (see LJ #19, page 40). However, if you have both machines and want to let each do what it does best, use Netatalk. Netatalk lets you keep the operating systems separate while enabling you to transfer files and share printer resources. I paid my dues to wear a Linux T-shirt—I love Linux. I also love my Mac—for entirely different reasons. Since I use the two systems for different purposes, it is often necessary for the two to communicate.

You can transfer small files with a floppy disk (a.k.a. SneakerNet). When the file size exceeds the 1.44MB floppy limit, however, the solution is FTP—fast and efficient, but cumbersome when moving multiple directories containing subdirectories. The ideal solution is to mount the Linux file system on the Mac desktop, then drag and drop files and directories as you do under the normal MacOS. This is exactly the solution that Netatalk gives you. You can also use Netatalk to send print jobs to the Linux printer from the Mac, thereby sharing other system resources.

Figure 1. Linux Files and Directories on the Macintosh Desktop

At the time of this writing, the most recent version of Netatalk is 1.4b2. Don't let the beta suffix scare you; Netatalk is stable, especially for the PC platform. Current development emphasizes new platforms (see Table 1) such as FreeBSD and Solaris—hence the beta appellation. The primary Netatalk host site and directory is: ftp://terminator.rs.itd.umich.edu/unix/netatalk/. From that address all you need to do is download the single file netatalk-1.4b2.tar.gz. You can uncompress and untar Netatalk with normal Linux commands such as:

gunzip netatalk-1.4b2.tar.gz
tar xvf netatalk-1.4b2.tar

or:

tar xzvf netatalk-14b2.tar.gz

Figure 2. One of Several Netatalk Web Pages

Note that prior to the release of Linux 2.x, installation of Netatalk required that the Datagram Delivery Protocol (DDP) software be integrated into the kernel. Now that DDP is part of the Linux kernel, all you need to do is make sure that you turn on Appletalk during kernel configuration. Do this by specifying the kernel configuration option as:

CONFIG_ATALK=y

You should always use the README files that accompany the Netatalk distribution as the ultimate authority for installation instructions. Since Netatalk is offered for several platforms, as shown in Table 1, there are actually several different README files. Each operating system has its own defaults for file locations. For this reason, the Makefile that comes with Netatalk provides user-defined variables that you can change to alter the installation and ultimately the file structure. For the Linux installation, I used the default values and the installation worked flawlessly.

The DESTDIR variable in the Makefile points to the directory where binaries are placed. The default for this directory is /usr/local/atalk and does not need to be altered. Note that setting DESTDIR causes all installation-relative pathnames to be set correctly. The other important variable is MANDIR, by which you can specify the location of the man pages. The default for this directory is /usr/man, and again does not need to be changed.

Installation to make all binaries begins with the ubiquitous command:

make

To install the binaries at the root of the source tree, type:

make install
Pretty easy! Now let's go on to configuration.

______________________

Webinar
One Click, Universal Protection: Implementing Centralized Security Policies on Linux Systems

As Linux continues to play an ever increasing role in corporate data centers and institutions, ensuring the integrity and protection of these systems must be a priority. With 60% of the world's websites and an increasing share of organization's mission-critical workloads running on Linux, failing to stop malware and other advanced threats on Linux can increasingly impact an organization's reputation and bottom line.

Learn More

Sponsored by Bit9

Webinar
Linux Backup and Recovery Webinar

Most companies incorporate backup procedures for critical data, which can be restored quickly if a loss occurs. However, fewer companies are prepared for catastrophic system failures, in which they lose all data, the entire operating system, applications, settings, patches and more, reducing their system(s) to “bare metal.” After all, before data can be restored to a system, there must be a system to restore it to.

In this one hour webinar, learn how to enhance your existing backup strategies for better disaster recovery preparedness using Storix System Backup Administrator (SBAdmin), a highly flexible bare-metal recovery solution for UNIX and Linux systems.

Learn More

Sponsored by Storix