kerneljack’s diary

some thoughts and comments on my day to day experiences

Archive for August 7th, 2003

My Mac OSX Love-Hate relationship

7th August 2003

I’ve been playing around a lot with Mac OSX recently and I must say I really love the system. OSX does a lot of things quite differently and that is why most people simply try to use it like Windows and hate it. I tried very hard to understand what Apple tried to do here and I must say I appreciate quite a few things: application bundles, the dock, system defaults, etc. The idea that I can put my whole java app in a directory of its own (including all dependent classes), write a few simple XML files, put images etc into the same directory, set a special ‘bundle’ bit, and that whole directory is now a deployable app is neat!

I must admit, saying it that way it doesn’t sound that different from just putting the java app into a directory and being done with it, but Apple have taken this a bit further than that using special features like the bundle bit and by assuming from the outset that *all* apps will be deployed like this instead of just a few that you develop. This allows you to have multiple versions of the same app in different bundles with different libraries inside them for example (as far as I understand it).

However, customizing features of the OS is not always easy. I needed to control how my app was deployed, so that users could not change the system settings for example and at first I was quite baffled how to do it. Moving the app from one location to another proved futile. OSX always knew where the app was located regardles of which directory I put it in or what I called it :-) I later discovered that if I dig deeper into the bundle and edit the Info.plist xml file and change the BundleName, it will finally no longer run. However, this was not the solution for me since I did need to run it myself sometimes. Eventually after sometime of poking around trying to understand the system and reading hints on the excellent MacOS X Hints website, I discovered that I could simply remove privileges for the user so that he/she could no longer run System Preferences. Simple enough.

Much harder were figuring out how to remove items from the Apple menu bar as I did not want to use one since I was deploying an older app that had never used menus before and many other exotic things like replacing the Finder upon login with my own app. OS X seems to store a lot of things in databases like the NetInfo database and the ‘defaults’ database which it carries over due to it’s NeXT and OpenStep inheritance. This makes it quite convenient to change things, but only once you know where they are! Not unlike the days when I used to memorize Windows registry keys :-)
Weather is extremely hot nowadays, usually around 30-35. The tube is horrible, just horrible, it’s baking hot in there. It’s not unusual for me to come out of it dripping with sweat. Good thing the Mayor has issued a challenge to anyone who comes up with a workable air conditioning system for the tube … Here’s hoping :)
My parents are coming round in about 2 weeks time, and we are both very happy to be seeing them after such a long time. We haven’t made any travel plans as such, I guess we’ll take each day as it comes …

Posted in operating systems | No Comments »