November 2006
Monthly Archive
Mon 27 Nov 2006
Posted by bde under
Linux ,
Mac[5] Comments
The OS X file sharing in the Finder is so beautifully designed that I just had to make our new Ubuntu file server integrate cleanly with Finder. This turned out to be a fairly painful process, without any clear documentation, so here’s a tutorial:
Background:
OS X file sharing is done with AFP (AppleTalk Filing Protocol) and Bonjour (zeroconf) style service discovery. AFP allows one Mac to connect to another’s shares, while Bonjour handles the auto-discovery of available shares.
Packages required:
netatalk - This package contains an implementation of AFP.
avahi - This package performs the Bonjour style service publishing to make it easy for other Macs to discover the share.
These packages are not in the standard distribution, so you have to enable the “universe” repository by editing /etc/apt/sources.list. This is documented here.
sudo apt-get update (update the system’s knowledge of available packages)
The standard installation of netatalk cannot handle encrypted logins, which means OS X will pop up an annoying warning about cleartext passwords. For this reason, the following instructions are provided to build and install the netatalk package from source.
sudo apt-get install devscripts (installs debuild)
apt-get source netatalk
sudo apt-get build-dep netatalk
sudo apt-get install cracklib2-dev
cd netatalk-2.0.3
DEB_BUILD_OPTIONS=ssl debuild (no quotes)
sudo dpkg -i ../netatalk_*.deb
Configuration:
netatalk:
To share your home directories, add the following line to /etc/netatalk/AppleVolumes.default:
~ “$u - Home Directory”
To run netatalk on system startup:
cd /etc/rc2.d
ln -s ../init.d/netatalk S96netatalk
avahi:
Create a /etc/avahi/services/afpd.service file as described on this page.
%h _afpovertcp._tcp 548
]]-->
To run avahi on system startup:
cd /etc/rc2.d
ln -s ../init.d/avahi S97avahi
Testing
Either reboot to start the services, or run them like this:
sudo /etc/init.d/netatalk start
sudo /etc/init.d/avahi start
Now pull up your trusty Mac and try to access your home directory on the Linux box via the Network section of Finder. It should look and behave exactly like an OS X share.
Mon 27 Nov 2006
Posted by bde under
Linux[2] Comments
We finished the conversion of our household network to all OS X machines, but I felt bad for my poor Athlon XP gaming rig that was gathering dust. I decided to make it the next iteration of the Basement File Server. This would, of course, require getting a wireless card to work with Linux. My previous experience along those lines involved a good deal of frustration and expletives, but I was hopeful that things would have improved in the meantime.
Ubuntu has a good reputation for making things easy, so I try their newest release, Edgy I scanned their Wiki documentation for a long time and eventually decided on a D-Link WDA-1320 because it “just works” according to user reports. The OS installation went very smoothly as far as Linux is concerned, though the installer GUI did cough up a couple of undecipherable errors about some GNOME configuration program.
The installation completed without an opportunity to actually configure networking. I missed that from my OS X installs where the computer is online immediately post-installation. The online documentation pointed me at a GUI networking configuration program on a system administration menu. That program did indeed have wireless configuration screens, including the ability to enter a “hex” or “ASCII” password. No mention of whether the encryption method was WEP or WPA.
I entered the password, saved the changes, and things didn’t work. No shock there! This is the Linux I remember and strived to avoid this time around. Back to the documentation, I found the equivalent instructions for the command line. “ifconfig” showed both an “ath0″ and “wifi0″ interface, which was confusing. It implied that there were two distinct wireless cards in the machine, which I know isn’t true. The “iwconfig” command, required for configuring wireless options, reported that “atho” had the wireless extensions, while “wifi0″ did not. “ifdown wifi0″ merely gave an error and I still don’t understand what that interface is for.
Anyway, the basic command line instructions still didn’t work. I found another help document describing instructions for WPA, the authentication method used on my LAN. Those involved running an as yet unmentioned command, “wpa_supplicant.” That one immediately got things working. Nice! But I still had to go modify the /etc/networking/interfaces file to be sure that the settings would save after restarts of the networking interface.
To summarize, Linux wireless configuration is better than it used to be, but it still sucks compared to OS X and probably cannot be grok’d by the average user. The GUI configuration tool never tells you that it can’t do WPA, nor is it clear that you have to go run some other utility package to do WPA. The online documentation does have all the necessary information, but it isn’t organized in a hierarchical fashion to help out the new user.
Tue 14 Nov 2006
Posted by bde under
AppleNo Comments
I ordered the Core 2 Duo MacBook Pro on opening day a couple weeks back. Its release was welcome after weeks of reading those frustrating Apple rumor sites in anticipation of the CPU bump. Anyway, it’s a wonderful upgrade from my older PowerBook G4. As expected, the new machine is a lot faster, but what really surprised me was the quality of the display. The LCD is quite bright, the contrast is great, and it has a very wide viewing angle. It’s the little touches like that that set Apple apart from its competitors. I’m spoiled now and expect the software to be easy to use, but their hardware design always reminds me of BMWs. They’re fast, overengineered, and every feels solid.
I’m also digging the Magsafe AC adapters. Being something of a couch coder, I regularly manage to disconnect the magnet. Not knocking the machine over onto the floor with it is probably a good thing! Anyway, for the programmers out there, my compilation and unit tests times have been reduced by about 40%. CPU-intensive tasks are probably quite a bit faster, but the hard drive is still an effective limiter for the speed of IO-oriented tasks. Civilization 4 also plays smoothly, which is a huge improvement over the jerky performance on the Intel Mac Mini.
It says in the product guide that “You and your MacBook Pro were made for each other,” and I’m inclined to agree. I love the machine, and although it hasn’t yet betrayed any signs of becoming self-aware, I maintain vigilance.