Quickie: Change Time Machine interval

Here is a quick shell snippet to change the time machine backup interval on OSX. The time interval is specified in seconds. If you want to change it to 4 hours open terminal and enter:

sudo defaults write /System/Library/LaunchDaemons/com.apple.backupd-auto.plist StartInterval -int 14400

You can restore the default interval with:

sudo defaults write /System/Library/LaunchDaemons/com.apple.backupd-auto.plist StartInterval -int 3600

Prevent Time Machine Backup Resizing

If you are using Time Machine to backup your Mac onto a network share, you might have noticed, that since the Snow Leopard 10.6.3 update the sparsebundle image used by Time Machine has been resized to use the whole capacity of your network share.

I use a Qnap NAS as a central network storage for backing up mulitple Macs and therefore I want to define strict limits for the maximum size of each Time Machine backup. So after noticing the new image sizes, I tried to resize them with hdiutil:

hdiutil resize -size 500g MYBUNDLENAME.sparsebundle

Unfortunately Time Machine resizes the image size every time it runs, so it is necessary to prevent it from resizing the image.

The image size of a sparsebundle is stored in the Info.plist file inside the bundle directory, so I tried to remove write permissions to that file from the terminal:

cd /Volumes/MYSHARE/
chmod a-w MYBUNDLENAME.sparsebundle/Info.*

This wasn’t working either, because OSX seems to reset the permissions to Info.plist automatically.

The solution which is finally working for me was to login to my Qnap box via SSH and change the permissions there via chmod:

chmod a-w MYBUNDLENAME.sparsebundle/Info.*

Now, when Time Machine starts, it tries to resize the image but fails, as the Qnap server is preventing any changes to the Info.plist file. You can see this behavior in the system.log:

23.05.10 22:29:13	com.apple.backupd[378] Resizing backup disk image from 500.0 GB to 989.8 GB
23.05.10 22:29:13	com.apple.backupd[378] Could not resize backup disk image (DIHLResizeImage returned 35)

After this logging message, the rest of the backup runs fine. For me this is a nice workaround until there is an official way to limit the backup size.

Setting up the OSX terminal application

By default the terminal app in OSX is not configured the way you are used to on a Linux system. There is no color output for ls and things like page up and page down are not working via SSH. Fortunately this can be corrected with some small configuration tweaks.

The first thing is to open the prefenreces panel and set the “Pro” theme as the standard theme. I also like to activate text antialiasing. My font of choice is “Monaco 12pt.”.

To enable the page down, page up, home and end keys you need to go to the keyboard tab and set the following key actions:

Home = \033[1~
End = \033[4~
Page Up = \033[5~
Page Down = \033[6~

To activate colored output for ls with a decent color scheme that works well on a dark background, create a file .profile in your home directory with the following contents:

export CLICOLOR=1
export LSCOLORS=cxexcxdxbxfxfxbxbxcxcx

Reloading kernel extensions

Sometimes it might be useful to reload a kernel extension in OSX without rebooting your Mac. This can be done in a terminal window with the following commands:

sudo kextunload /System/Library/Extensions/NameOfExtension.kext
sudo kextload /System/Library/Extensions/NameOfExtension.kext

Replace NameOfExtension.kext with the name of the extension you want to reload.

2D Dock in Leopard

The new 3D styled Dock in Leopard is looking very stylish, but I think the 2D style which is used by the Dock when located on the left or right screen border is more functional. It is also possible to change the Dock on the lower screen Border to the 2D look. To do this you need to open the terminal and enter:

defaults write com.apple.dock no-glass -boolean YES
killall Dock

To switch back to the 3D style, you can use the following commands:

defaults write com.apple.dock no-glass -boolean NO
killall Dock

Essential Mac Tools

After working more and more with my Macbook instead of my desktop PC, I have found a couple of really nice tools for mostly all of my daily tasks. So here is a small list of tools and utilities which I basically use daily:

  • Camino – This is basically the Firefox browser as a native OSX application. It has support for drag and drop, integrates the OSX keychain and spell checker and best of all, it’s completely free. The only downside is that you can not run the Firefox plugins.
  • Textmate – Simply put: if you need a text editor there is absolutely no way around textmate. As a software developer you spend most of your time in a text editor and this is the most powerful editor I have ever worked with on any platform.
  • Vienna – A very nice feedreader. Highly customizable and open source. As long as you do not read more than 200 feeds, this is a really good application.
  • Quicksilver – To say Quicksilver is just an alternative program launcher is understatement par excellence. This is a completely new way working with OSX. It will save you a great deal of time. Also freeware.
  • AdiumX – The multi protocol chat client for OSX. It has very nice theming support and it is open source.
  • svnX – A GUI subversion client. Being used to TortoiseSVN on Windows, it is like a step back, but it is way better than using the command line tool.
  • XAMPP – Apache, MySQL, PHP and Perl preconfigured in one easy to install package. If you do web development, there is no way around this.
  • Cyberduck – A great FTP/SFTP client. Easy to use and open source.
  • iShowU – A great tool for recording screencasts. I prefer recording a screencast instead of writing long turorials. This tool is easy to use and produces great results.
  • NeoOffice – This is the native OSX port of open office. I guess I will transition to iWork once the Numbers application is really stable, but in the meantime NeoOffice is working really great.
  • Gimp - A powerful graphics application. It hase more functions and filters than an amateur will ever need.
  • WhatSize – A really small but handy utility to find out which folders on your hard drive contains the largest files. Can be very useful when cleaning up your hard drive.

Well, I guess that’s basically it. I will keep you updated when I find great new tools.

Apple introduces new iMac

new-imac.jpgEveryone has been expecting the iMac upgrade for the last couple of months and today was the day that the upgrade finally was presented at the summer Mac product press conference.

The design of the new iMac is really breathtaking. It got considerably thinner than the white model and the aluminum material marks it clearly as a model targeted at the pro market.

The internal upgrades feature a faster processor, more RAM and a bigger hard disk. But the important part for becoming an all purpose computer for work and gaming is the graphics card and I feel that Apple did not completely make their homework. The entry-level model for 1200,- EUR will come with a Radeon HD 2400 XT which is an absolutely low end graphics card that you can buy for around 60,- EUR. I mean come on Apple, you build a really great system except this graphics card which is really a bummer considering the overall price tag.

Let’s take a look at the 20″ iMac for 1500,- EUR. It will come with Intel Core2Duo 2.4GHz, 1GB RAM, 320GB harddrive and the Radeon HD 2600 Pro. Ok, this card is about twice as fast as the 2400XT and a little bit faster than the Radeon 1600 which you find in the current iMac. But when you buy this card for your PC you will find that it is still targeted towards the lower mid end market with a price tag of around 100,- EUR.

In my opinion this is really a bummer and I was definitely expecting a little bit more, let’s say something in the area of a Radeon 1950 Pro. Especially since ID software committed themselves to deliver their new titles in parallel for PCs and Mac. But hey, maybe Apple did some great things with their drivers and these cards will perform better than expected, so let’s wait for the first true reviews.