2008-12-04

iPod touch MPN for first and second gen

iPod touch MPN:

First generation (rectangular antenna on back)
- 8GB MA623LL/B
- 16GB MA627LL/B
- 32GB MB376LL/A

Second generation (oval black antenna on back)
- 8GB MB528LL/A
- 16GB MB531LL/A
- 32GB MB533LL/A

This lists all iPod models, but does not have the MPNs.

2008-10-13

Re-enable X11 on Max OS X

Every now and then Apple disables the TCP ports of the X server. I don't know why, but at least two updates from Apple disabled this now.

You know TCP is disabled if you do


netstat -na|grep 6000


and you see nothing. If X11 would be listening you should see something like:


tcp4 0 0 *.6000 *.* LISTEN
tcp6 0 0 *.6000 *.* LISTEN


Also when you try to start an X11 app (like xcalc) from the terminal and you have set the DISPLAY variable to localhost:0, then you will see this if the X server is not listening on TCP (after a few seconds):


Error: Can't open display: localhost:0


To enable TCP on the Xserver type this into a terminal:


defaults write org.x.X11 nolisten_tcp 0


and then restart you X server. Now xcalc should start immediately.

2008-10-07

MacBook Pro eject key delay

I just figured that I also need to install NoEjectDelay from the same website to get rid of the eject key delay, but the key repeat still does not work for the eject key (now forward delete key).

Remap small enter key to Alt (option) on MacBook Pro

The small enter key on older MacBook Pros is completely useless. Newer MacBook Pros have an option (Alt) key there instead which makes more sense.

With KeyRemap4MacBook you can remap many keys. It has a static list of possible key remappings which you can choose from, but they seem to cover a lot of use cases, You can also remap the eject key (which si also useless) as 'Del' (forward delete), but this does not work well for me as this key still has the delay and no key repeat.

Anyway, having a second option key is great and reason enough to install this:

http://www.pqrs.org/tekezo/macosx/keyremap4macbook/index.html

Duplicates after import in iTunes

I recently repeatedly experienced duplicates in iTunes after importing directories of mp3 files. Almost all files (but not all) would be visible twice in iTunes and they would also exist as two distinct files in the iTunes library, but the files would be identical. Some files even would be visible three times.

I now found what is the cause: An m3u playlist in the directory will cause all the file in that playlist to be impoted and in addition all mp3 files in that directory are also imported, hence all files in the m3u list will appear twice.

The solution is to erase all m3u files (or all non-mp3 files) before importing directory structures.

Ishkurs Guide to Eletronic Music ...

... can be found here now:

http://techno.org/electronic-music-guide/music.swf

(The link in the older post does not work for me at least on my Mac using Safari.)

2008-09-24

PacMan Statistics



BTW: 75% of all statistics are useless! :-)

2008-06-27

2008-01-14

HowTo: PC-Style keyboard mapping on Mac OS X (german keyboard)

The keymap on a german keyboard attached to a Mac is rather different that what people expect from a standard Linux or Windows PC. This is very irritating for novices and geeks at the same time. Especially if you program a lot you miss the braces and the brackets, but most of all you miss the backslash, the pipe symbol, the tilde and the AT symbol. Apple! How dare you! The backslash on a german keyboard is Alt+Shift+7! Argh!

Anyway, these days are over. Here is how to get a pretty standard PC-Style keymap alongside the old Apple bindings if possible:

1. mkdir ~/Library/KeyBindings (if it does not exist)
2. put the following text into the file Library/KeyBindings/DefaultKeyBinding.dict
3. Log out and log in (some apps like TextEdit pick up the changes directly when you restart them)


{
"\UF729" = "moveToBeginningOfLine:"; /* pos1 */
"^\UF729" = "moveToBeginningOfDocument:"; /* crtl + pos1 */
"$\UF729" = "moveToBeginningOfLineAndModifySelection:";
"\UF72b" = "moveToEndOfLine:"; /* end */
"^\UF72B" = "moveToEndOfDocument:"; /* ctrl + end */
"$\UF72B" = "moveToEndOfLineAndModifySelection:";
"\UF72C" = "pageUp:";
"\UF72D" = "pageDown:";
"^~7" = ("insertText:", "|"); /* orig alt 7 */
"^~8" = ("insertText:", "{"); /* orig alt 8 */
"^~9" = ("insertText:", "}"); /* orig alt 9 */
"^\U00DF" = ("insertText:", "\U00BF");
"^+" = ("insertText:", "\U00B1");
"~<" = ("insertText:", "|");
"~7" = ("insertText:", "{");
"~0" = ("insertText:", "}");
"~8" = ("insertText:", "[");
"~9" = ("insertText:", "]");
"~+" = ("insertText:", "~");
"~\U00DF" = ("insertText:", "\U005C");
"~q" = ("insertText:", "@");
"^x" = "cut:";
"^c" = "copy:";
"^v" = "paste:";
}


This gives you the braces, the brackets, the backslash, the pipe symbol, the AT symbol, the tilde, Home/End on PC typical key combinations. It also gives Ctrl+X, C, V for cut/copy/paste in addition to Command+X, C, V. Most of the Apple key combinations still work after this change, so Mac users would still find their way in your system. The most noticeable change is Alt+7 for the pipe symbol which is now the opening brace.

I got all the info from this german page:

Tastaturbelegung unter Mac OS X

which provides a very useful example keymap (which I extended a bit above) and a link to this great page:

http://www.lsmason.com/articles/macosxkeybindings.html

The latter one provides virtually all the background information you need to do your own keymaps.

Happy keymapping!

Change keyboard type button missing in System Preferences

After playing with the keyboard type (I don't remember exactly what I did) I had a nasty keyboard type/mapping problem on my MacBook Pro (Max OS X Leopard 10.5.1):

From some point on the two keys (<> and ^° in my case, german keyboard) where swapped. All other keys were normal, so it was not a keymap problem. The german keymap worked well except for these two keys which were swapped. Stangely enough the button to undo this change 'Change keyboard type ...' *vanished* from the System Preferences! I could not believe this until I verified that on other Macs this button is present. I don't understand why. Apple: Never do these configure once things!

Starting the KeyboardSetupAssistant did not help at all since it would say that all known keyboard were configured. Thanks.

I found the solution in some Apple forum thread but I am replicating it here since it took me quite some time to find it although it looks quite obvious to me now:

1) Delete the file: /Library/Preferences/com.apple.keyboardtype.plist
2) Restart

After removing the file and restarting:

1. I could set the keyboard type correctly using the assistant and
2. I can now change the keyboard type again using the System Preferences

I don't know why this button was missing before ...

2008-01-03

Mac OS X 10.5.1 jnl: replay_journal: bad block list header

After a cold boot I reproducibly got into an infinite loop of the gray start screen. The boot-up sound would be played every 3 minutes continuously.

I pressed Apple-V to see what is going on and I got several messages indicating that the journalling on my root disk was corrupted:

jnl: replay_journal: bad block list header @ ...
jnl: journal_open: Error replaying the journal!
hfs: early jnl init: failed to open/create the journal (retval 0)

Booting in single user mode (Apple+S), doing an fsck -fy and an exit solved the problem temporarily. It would boot up without problems. But after a day and another cold reboot the problem was there again. My MacBook Pro would not boot and was stuck in the endless gray boot screen loop.

I think I now solved the problem by making it boot once (see above), then disabling the journal by doing

sudo diskutil disableJournal /dev/disk0s2

(This cannot be done in single user mode, you need to boot Mac OS X for this.)

Then I rebooted. No problem. Then I activated journalling using the disk utility and it works again. Rebooting cold now works fine. Let's see what the future brings.

But: Apple: Please. How hard can it be. Please make your stupid fsck program deal with such a situation instead of continuously rebooting. This is a showstopper bug for a lot of users. Filesystem checks must never assume the filesystem including any journal is OK!!! This is sounds rather obvious to me.