Essays

Essays for October 2007

2 years ago

Sunday, October 28, 2007

Making netatalk Work on Debian with Leopard

If you’ve recently upgraded to Leopard, you might have started running into problems accessing AFP shares on Debian if you’re using netatalk with the cleartext UAM (uams_clrtxt.so).

Trying to connect to the shares results in the error

There was an error connecting to the server. Check the server name or IP address and try again.

It’s not a very helpful error, but if you do some digging, you’ll find out it’s Finder error code 5002, ‘afpBadUAM.’

It was at this point that I remembered that Debian’s netatalk doesn’t include any SSL-related authentication modules because of a licensing incompatibility (see Debian bug #191790). At the time, I wasn’t in the mood to dig into building the package manually, so I used the cleartext UAM — we’re on a secured closed network, and, though Tiger warns about sending a cleartext password every time you connected to a share, it’s more than happy to let you do so. There’s even an option to turn the warnings off.

This behavior has apparently been changed in Leopard — it appears to outrightly refuse to send cleartext passwords. This is probably a good idea, but it means you now have to build netatalk to include the DHX UAM that it doesn’t include by default.

I found two posts by Damon Timm and Durk Hellinga that describe the general process. However, as my comment on Durk’s blog says, I had some problems with circular dependencies. When you try to build the package with dpkg-buildpackage, it complains

% DEB_BUILD_OPTIONS=ssl dpkg-buildpackage
dpkg-checkbuilddeps: Unmet build dependencies: cdbs (>= 0.4.6) debhelper (>= 4.1.46) dh-buildinfo d-shlibs (>> 0.19) libdb4.2-dev libwrap0-dev libpam0g-dev libslp-dev libcupsys2-dev heimdal-dev (>= 0.7.1-3)
debuild: fatal error at line 993:
You do not appear to have all build dependencies properly met, aborting.
(Use -d flag to override.)
If you have the pbuilder package installed you can run
/usr/lib/pbuilder/pbuilder-satisfydepends as root to install the
required packages, or you can do it manually using dpkg or apt using
the error messages just above this message.

Unfortunately, libcupsys2-dev and libkrb5-dev seem to be mutually incompatible with heimdal-dev — aptitude won’t install both at the same time. I tried installing each by themselves and forcing dpkg-buildpackage to build with the -d switch, but /usr/lib/netatalk/uams_dhx.so still wouldn’t show up.

As it turns out, I wasn’t looking at the build output carefully enough. This post mentions to look for the line ‘Configure summary’, and for me it didn’t list the DHX UAM as being built. Looking at the output from the configure script, I realized I didn’t have libssl-dev installed. After installing that, everything went smoothly.

Update: A comment on Stefan Lange-Hegermann’s post describes how to re-enable cleartext passwords in Leopard.

Relatedly, Yvo van Doorn describes how to get your Linux-based AFP server to show up correctly in Leopard’s new Finder. Was Glück! I knew there had to be a Zeroconf daemon for Debian, but I had no idea what it was called, or how to make it work if I did. However, I think the XML configuration for Avahi that Yvo has in his post is suffering from some formatting problems. Here’s my version:

1
2
3
4
5
6
7
8
9
10
<?xml version="1.0" standalone=‘no’?><!–*-nxml-*–>
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">

<service-group>
  <name>%u</name>
  <service>
    <type>_afpovertcp._tcp</type>
    <port>548</port>
  </service>
</service-group>

Documentation for Avahi’s service configuration files

Usability Improvements to Interaction with Network Shares in Leopard

The frustrating and limiting way in which Finder forced you to access network shares in Tiger has long been a sore point with me. First you had to trawl through Network and its mess of ugly workgroup folders and iconless symlinks. Then you had to click ‘Connect’, wait for the authentication dialog to come up, enter the same authentication information every time, and then click ‘Connect’ again. Then you had to select a single share, and repeat the entire process if you wanted to work with multiple ones. And then, heaven help you if one of the connected shares subsequently becomes unavailable. If I was on my MacBook Pro, accessing a share on my Powermac or file server, and then left the house with the MBP, the entire operating system would be brought to a halt for minutes when the MBP was woken up, while Finder spins looking for the lost share. From a usability standpoint, it was completely awful.

The Finder in Leopard has completely solved all those problems. When shares become unavailable, the system doesn’t beachball — Finder just quietly and patiently keeps looking for the share while everything else remains responsive. Tiger left me wishing for an analog to Windows’ ability for network drives to reconnect at login. But the way Leopard has been redesigned to just reconnect to network shares automatically on demand (using the last username you used) beats mapped network drives hands down. It pleases me that Apple completely rethought the problem and introduced a far better solution.

These things all couple to allow me to work with network shares completely transparently, the way I want to. I can drag locations in network shares into the sidebar, and clicking them automatically connects to the share if unconnected. If the share is unavailable, the system doesn’t freeze looking for it. And it’s so great to be able to have our file server show up in Finder’s sidebar now! No more wading to find shares you don’t access regularly — they are instantly accessible. Bravo!

3 Comments

2 years ago

Saturday, October 27, 2007

We Are Not Sekiaku

We picked up Leopard yesterday, and after getting it installed, we tried out all of the new features. Leopard handles networking brilliantly now, the new Finder is superb, and there are tons of small, undocumented changes that make the whole experience better.

“Alex” — the new text-to-speech voice included with Leopard — though sounding pretty good (and breathing!), seems to have as much trouble pronouncing our name as everyone else. Hear for yourself:

This isn’t, however, the sort of harmless misreading that produces pronunciations like “Sakusaku.” Unfortunately, sekiaku (積悪 in Japanese) means “many sins; long-standing evils.” Rest assured: this is a coincidence.

With any luck, the first point release — Mac OS 10.5.1 — will correct this egregious error. More Leopard notes to follow.

Comments

2 years ago

Thursday, October 18, 2007

Nice Touch: Background Window Scrolling in OS X

I was beaten to the punch. I was going to write a post about how great it would be if I could scroll windows in the background in OS X. I had even created a graphic for it.

A screenshot showing OS X’s “Stickies” application and webpage behind it.

“I’d love to be able to scroll through a webpage and take notes on it in Stickies without switching applications,” I was thinking.

But then Apple took care of it:

A screenshot from Apple’s website of a new feature in Leopard. It says: 'Scroll any open window, even if it’s not active. Simply position your mouse over the target window and scroll.'

Excellent!

3 Comments

2 years ago

Wednesday, October 17, 2007

I’ve Reached My Limit: Approaches to Character Limit Cutoffs

In real life, it’s important (and polite) not to obtrusively interrupt someone when they’re in the middle of something, and, of course, this carries over to website usability as well. So, how should we enforce form field character limits without disrupting what is already a potentially demanding process? I can think of two main use cases, distinguished by the length of the form one is filling out.

When filling in a small field like the zip code field featured below, users should be cut off at the character limit. It prevents error preemptively, before the form has been submitted. In most cases, users know why they can’t go any further because of the nature of the input (i.e., a phone number, credit card VIN, or age). If it’s unclear, some explanatory text will do the trick:

Zip Code Field Done Correctly

With larger text fields> (<textarea>s) we have to be more forgiving. Users can’t keep count of characters in their head (if they even know what a ‘character’ is), and it’s relatively likely that they’ll be looking not at the A large textbox — Twitter’s ‘What are you doing?’ fieldscreen but at the keyboard, or at another window, or even at notes on their desk while typing. In this case, it’s dangerous to just stop accepting input. They may continue typing without actually accomplishing anything and not realize it until they’ve wasted time typing something they may not remember.

Thankfully, there are two real-world examples that I think demonstrate exactly how to get character limit enforcement wrong and how to do it right.

Update: Since publishing this article, Twitter has greatly improved their approach. We love it!

Twitter: “No — No Further!”

Type more than 140 letters into micro-blogging platform Twitter’s What are you doing? box, and you’ll be stopped without warning. If you’re not paying close attention to the box, you could go on typing without knowing what’s happened. If you’ve something longer than 140 characters to say, this quickly becomes frustrating. Because the field is frozen as soon as you hit the limit, any mid-sentence editing you want to do to whittle down your little tweet becomes an exercise in frustration. It can only be destructive, because you can only add or move words within the 140-character limit — any potential revision would have to be preceded by the deletion of something you’ve already typed and may not want to lose.

There is a nice numerical counter of the characters remaining, even nicer because its visibility — and, therefore, our awareness of the limit — is increased as you draw closer to zero.

Twitter character limit countdown

But unfortunately it’s not enough to allay the problem. Okay, so I can see the words running out in front of my face, but I’ve already formed what I’m going to say in my head. Making the message fit their size constraint mid-thought isn’t my primary objective; I just want to type it all out and pare it down after. I respect the brevity inherent to Twitter, but it’s not something I’m really used to yet, so let me reorganize my words if I need to.

And what if you type your tweet somewhere else and paste it in to the Twitter website? Well, if it’s over 140 characters, you’ll have to guess how many you need to delete, because there’s no telling by how many characters you’ve gone over the limit.

Pasted-in Tweet exceeds limit. But by how many characters?

And what’s more, you lose the end of the paste — what if you want to remove something that was in the middle?

How could this be handled more smoothly? Let’s see.

LinkedIn: A Polite Reminder

If you type too much in the contact form of professional networking site LinkedIn, you’ve much more leeway:

LinkedIn's polite character-overage warning.

Instead of letting you proceed no further, LinkedIn simply tells you by how many characters you’ve exceeded the limit, allow you to easily pare down your message.

Update: It would seem that, since I started preparing this blog post and took the following screenshots, the LinkedIn contact form interface has changed. It now has no character limit, but retains its small size. Regardless of this alteration — a fine one, by the way — LinkedIn’s previous approach to handling character overage is a great model.

I think Twitter’s character counter should reflect just how far you’ve typed past the limit and not impose a character limit on the text box itself, much like LinkedIn used to do.

One area where I believe both approaches succeed is the size of the input area. Both LinkedIn and Twitter feature small text boxes, tailored to the exact amount of words they should (theoretically) contain. At first it may seem like an annoyance, but it’s a fantastic way to encourage concise writing and remind users of the limits.

Acknowledgments

This post was at least partially inspired by the work of usability guru Luke Wroblewski, whose presentation Best Practices for Form Design (and upcoming book, no doubt) contain guidelines very similar to these (see slides 105 and 106 in particular).

15 Comments

2 years ago

Saturday, October 13, 2007

iKeepForgetting: Two Things iTunes Won’t Remember

Two reports on odd behavior in iTunes. For you. For Apple. For Google. For us.

iTunes Forgets View Preference Upon Clicking Altered Arrows

This is something you have probably never experienced, but it’s annoying nonetheless.

The secretly customizable arrows of iTunes.

If you reverse the default action for your iTunes arrows — that is, change one of the iTunes hidden preferences to make the arrows redirect to your library instead of the iTunes Music Store — iTunes will always go back to list view, even you’ve set it to display album artwork. I’ve taken a short video to show you what I mean.

The first time I click is the default behavior — redirection to the iTunes Music Store. Going back to my library, all is preserved. The second time, though, when the arrow’s behavior has been altered, clicking the arrow lists the entire library centered on the song I’m listening to and forgets that I had set the view to “album art” mode. It’s slightly annoying.

Of course, this is a hidden preference, so it’s completely unsupported, and I don’t imagine Apple is too eager to help me avoid their Music Store by fixing it.

The second issue, though, is one you may have run into.

iTunes Forgets Scroll Location when Leaving Library View

Are you using the “Browse” viewing mode in iTunes? You know, the one activated by this button in the lower right-hand corner:

The iTunes 'Browse' Button

It activates the display of scrollable columns of artists, albums, and maybe genres above the list of tracks — convenient if you have hundreds of unsorted genres or more than a dozen artists or albums. Unfortunately, if you’re anywhere in the middle of those scrollable lists, you’re going to lose your place if you leave the library window. I’ve made a video demonstrating this as well.

Now that just doesn’t make any sense. Has this bothered you? Have you even noticed?

3 Comments

Next Page