Arrow keys broken for console applications in OS X 10.6.3

I was just trying to configure some project using the curses based ccmake tool. I noticed that I cannot do that, since the arrow keys on my keyboard stopped responding when running ccmake. Turns out, Apple broke curses in OS X 10.6.3. Workaround is to copy the ncurses dylib from a 10.6.2 system, which I don’t have at hand right now. Funny enough, the keys are also broken when using xterm instead of the standard terminal, so there is definitely something very broken in ncurses right now.

XCode cannot compare SVN directories

I am missing one feature in XCode: it can’t compare whole directories under version control. Only single files can be compared. For example, I have a directory named “Classes”. It’s info dialog does not show the version control tab:
However, if I choose some source file, I get the SCM tab and can compare my local version with the head version in the repository:

Setting PATH and other variables on OS X

Since OS X is a UNIX like many others, I usually put my environment variable settings like PATH in ~/.profile. However, for Cocoa based apps, that are not run from a terminal, this will not help. Luckily, there is a documented procedure for setting environment variables for Cocoa applications. In short, you just have to edit a plist. If it already exists on your system, just type the following in a terminal:

open ~/.MacOSX/environment.plist
If the file does not yet exist, just run the Property List Editor (e.g. via spotlight), and create that folder and that file.

Syncing iPod Touch and iPhone with Linux

Ok, so I just tried out the new libimobiledevice. Installation was a breeze, using the provided OpenSUSE repository. A first run of ideviceinfo returned successfully detailed information about the attached iPod Touch. I also upgraded libgpod4. But Amarok 2.3 did not show a thing. Mounting of the iPod needed to be done manually using “ifuse ~/my-ipod-dir”. Supposedly, this happens automatically with Gnome, usin gvfs. But since I am using KDE, this is at the moment a no-go. Ok, so Amarok fails at this point in time. What about gtkpod? It works, although it throws some mysterious error message (“Eweiterte Informationen werden nicht verwendet” — wtf?), and that program is dog-slow. I though iTunes is bad, but this program is really, really slow as a snail. But here a proof of concept that I was able to sync to albums to the device:


What I did not yet try is syncing contacts, notes and bookmarks. With gtkpod, you need to specify a program to do that. No idea which one that is supposed to be. Keeping my MobileMe contacts in sync with my Linux desktop would be nice, though. Also, syncing from within Amarok is mandatory for me, but does not work currently. So let’s wait and hope the situation gets better with time. So far I will continue to sync my device with OS X.

Extremely slow SMB performance over WiFi using OS X

I have an OpenSUSE machine running a Samba server to provide files to my network. Now when I use the MacBook Pro to access those files, this happens awfully slow, with 80-200 KiB per second. I never figured out why, since rsync and sftp work very fast (for WiFi at least), at speeds of around 1.2 MiB per second. Today I googled for it, and it turns out that OS X delays ACK packages. I have no clue why it does that and what good this does, but you can disable it by running:

sudo sysctl -w net.inet.tcp.delayed_ack=0
After that, my SMB transfers jumped to 1 MiB per second, minimum. You can presumably make this change permanent by adding “net.inet.tcp.delayed_ack=0” to the file /etc/sysctl.conf. This will then be applied during system startup.
Update: Here is a nice explanation why the performance of OS X suffers sometimes, when using delayed ACK, and also why it might be useful in some cases.