Quarter Life Crisis

The world according to Sven-S. Porst

« Sexist ShoppingMainFish and Grapes »

X.5 Tidbits

1659 words on

Some more points about Mac OS X which don’t warrant a post of their own are collected here. Nice surprises. Weird behaviours. Random observations.

PIDs

Processes with  PIDs in the 70000 range in Activity Monitor While this may seem irrelevant for everyday usage, I was happy to observe that PIDs in X.5 don’t restart from 0 again once they reached the 215 region. Rather, PIDs go on and on and on. Up to a few billion I’d guess. And that’s great for the simple reason that in previous versions it used to be really tricky to find out the order in which processes had been launched once you had cycled through the whole PID space. Now, for all realistically practicable purposes anyway, PIDs should be increasing over time, ensuring that processes with the highest PIDs are always the newest ones when displayed in Activity Monitor.

Install DVD

Icons on the X.5 install DVD To be honest I haven’t been happy with Mac OS X’s install media for a while. Not because of the installers which generally worked fine for me but because of the readmes they put on there. To achieve the readmes’ appearance with a localised file name and content, each readme actually is an application. An application with the icon of a PDF file. And while that is a working way to achieve the localised file name and content, I keep thinking that it’s a very creepy thing to do. It’s a camouflage technique which I’d expect from a virus but not from an operating system. And obviously you won’t be able to get a preview of those wannabe PDF ‘files’ using Quick Look either.

Things are also strange when it comes to the rest of the DVD. The Installer application’s name is localised while the names of the other folders on the DVD are in English. Consistency anyone? And then Apple decided to use icons of different sizes in the same folder. A feature, which the Finder did support in some earlier OS X version, by the way, but which recent Finders had dropped. And thus Apple had to use the less-than-ideal technique of using a small folder icon graphic as a custom icon for the huge folder icon. Which gives a rather ridiculous look when you select a folder in the X.5 Finder. It seems that good first impressions don’t count anymore.

Slow Opening

In recent years it has become an unwelcome trend in Apple applications that they have become so bloated and slow at launching that they cannot even open a document without needing to display a progress bar for that action. And no, it’s not the progress bar that is the issue here but the fact that opening a document, a simple document even, takes so long to make you want a progress bar. Automator gained the slow opening feature as well with X.5.

Progress window for opening a file in Automator

Looking forward to file opening progress bars for plain text files in TextEdit of X.6…

man

The Terminal application in X.5 supports the x-man-page URL type. Which means that you can make links to manual pages which launch the Terminal and display that manual page when clicked. A nice thing to have out of the box, even though I still prefer Bwana which will hopefully start supporting that URL type as well.

Ejection

In previous version of OS X, Apple took a decision for you: If you used the Finder to unmount one volume from a drive, the OS unmounted all other volumes from the same drive in the same go. While this didn’t give you maximum flexibility, it did just the right thing in well over 99% of the cases for me. Unfortunately Apple scrapped that simple feature. And unmounting volumes from multi-volume drives has become a nuisance now because you are confronted with a dialogue that asks you whether you want to unmount just this volume or all volumes on the drive.

Finder multi-volume eject dialogue

Just look at that dialogue. I gave a command that used to be hassle free. And now I get loads of text which first tell me there are multiple volumes and then asks whether I actually want to unmount the volume that I just told the machine to unmount. Argh! And that’s just the heading without reading the two paragraphs of additional information. If you actually read them, you will learn that holding the control key will suppress the stupid question and holding the option key will unmount both volumes in one go.

Of course this raises numerous questions: Why the odd title? Why not reserve the control key as an option for the people who only want to unmount one of the volumes? Why no ‘remember my decision for this volume’ check box? Why is the default button the one to eject just one volume? Why does dragging all volumes from a drive to the Trash open two of these stupid dialogues rather than just unmounting both? Why the odd position of the Cancel button? Could this have been done in a worse way?

Webunserved

Looking at X.5 reveals that it ships with Apache 2 instead of the older version that X.4 used. That’s probably an advantage. At least I seem to remember that some features like on-the-fly compression are much easier achieve with Apache 2.

However that may be, it also seems as if Apple managed to ship a buggy installer which fails to update Apache’s settings properly when upgrading a machine from X.4. As a consequence all users on the machine which were created before the upgrade will not have a working web server for their account. Instead, trying to access their account’s web pages – which are still duly advertised via Rendezvous Bonjour – will result in a 403 error. Bad.

Steffen quickly figured out that this is happening due to the error in the updater and luckily the problem is easily resolved by running the command

sudo cp /etc/httpd/users/* /etc/apache2/users/
and then restarting Web Sharing.

Show Package Contents

I may or may not write in more detail about X.5’s Finder, depending how strong my nerves are. But the bottom line remains the same as it was in all previous OS X updates: Yes, there have been facelifts and even improvements, but if you’re keen to find ugliness, inconsistencies or stalls, the Finder remains a good candidate for delivering them. Essentially it remains the old POS, just with less stalling on the network and uglier sidebars.

Anyhow, there is at least one improvement in the Finder which I quite like. Because it works around another eternal idiocy of the application. Namely the ‘Show Package Contents’ command. It’s the command you need to look into ‘bundles’, i.e. those folders which the Mac OS prefers to display as if they were files (i.e. the bad design decision which makes things easy to program and hack but which makes duplicating any non-trivial application a rather slow experience). Of course that command is handy if you want to look around inside applications and their resources without getting your hands dirty in Terminal hell.

The problem with the ‘Show Package Contents’ command was that it was only available from a contextual menu and not accessible from the usual UI. Which made using it somewhat inconvenient. But – luckily – some changes in X.5’s Finder or menu manager magically added the ability to assign a keyboard equivalent to that command. And do that in a way that makes the keyboard equivalent not just be displayed but also functional.

And thus, with a few clicks in the Keyboard preferences, I had the Finder set up to invoke ‘Show Package Contents’ for a Command-Option-Shift-O. Which is good enough for me.

Text

Nobody liked to speak about it, but a sad truth of Cocoa so far was that it wasn’t particularly good at displaying large text files. And ‘not particularly good’ is a polite way to put it. Dragging a log file which had inadvertently grown to several MB on a Cocoa based text editor could easily stall the application for an extended period of time and make it grab large amounts of memory.

X.5 greatly improves this aspect of the system. Text is displayed much more quickly now and the stalls have become much more tolerable. There is no more need to check the size of a text file before opening it in your Cocoa text editor to avoid those stalling moments of ugh it would have been quicker to learn regexps and grep for that line while waiting for your file to display…

Logging

In X.5, the computer’s known and trusted log files are playing a lesser role. Console log files have stopped to exist and system log files still seem to be written. However, the main idea seems to be for the system to run its logging through Apple’s log facility which seems to store log information in a database at /var/log/asl.db.

The log entries can be accessed through the syslog command which seems to handle all the magic that’s required when every user is only supposed to see his own log messages despite all of them being stored in the same file. The command lets you do somewhat finer filtering for contents as well and in particular you can get the contents of what would have been your console log using

syslog -F bsd -k Facility com.apple.console
In fact the ASL you can run such queries straight from the Console application as well – and more conveniently by filling out a form.

No idea what to make of this, my first impression is that the database isn’t particularly fast and can be a bit inconvenient at times as it’s harder to access than a text file. This infrastructure may make admins drool, but it’s not exactly a KISS approach. Furthermore, the Console application’s way of navigating through such log messages is abysmal. Just try locating a specific date and time in the logs. Shouldn’t that be super easy with a shiny new logging architecture?


Want more tidbits? Then look here.

November 29, 2007, 0:14

Tagged as X.5.

Comments

Comment by Matt: User icon

Ahh. So this is why syslogd goes bonkers when something writes LOTS of output to the system log (libdvdread i’m looking at you).

November 29, 2007, 6:26

Add your comment

« Sexist ShoppingMainFish and Grapes »

Comments on

Photos

Categories

Me

This page

Out & About

pinboard Links

People

Ego-Linking