Archive for the 'Mac' Category

Spotlight Icon Missing from the Menu Bar after Upgrading to Leopard 0

After upgrading to the Mac OS X Leopard (10.5.8), I’ve noticed the Spotlight icon has gone missing from my menu bar (see attached picture). After poking around the system, I found that some directories are with invalid permissions. I have no idea as how this happened, maybe it occurred during the upgrade process?

Anyway, I run the Disk Utility ( Applications -> Utilities ), select the startup disk (the disk where you have OS X installed) and then click on Repair Disk Permissions. It found quite a few errors and then fixed them accordingly. After the repairing process and reboot the OS X – guess what, the Spotlight icon appeared once again on the menu bar and functioning correctly. It seems that those incorrect permissions somehow prevent Spotlight to appear and function properly. I guess it’s always a good idea to run a Repair Disk Permissions whenever you upgrade the system anyway.


Adding A “Recent Applications” Stack to the Dock In OS X 0

Just found this useful little tweak to add a stack (similar to the default Download one) which contains a list of recent open applications for a quick and easy access. Very handy if you happen to use certain regular applications and/or documents.

Type the following command in the Terminal:

defaults write persistent-others -array-add '{ "tile-data" = { "list-type" = 1; }; "tile-type" = "recents-tile"; }'

then after that, type the following command:

killall Dock

to restart the Dock and then you will see a new icon, similar to the Download Stack, being added next to the Trash icon. You can also choose this new Stack to show information between “Recent Applications“, “Recent Documents“, “Recent Servers“, “Favorite Volumes” and “Favorite Items“.

Open New Finder Window from the Current Location 0

A pretty handy tip I picked up from the Mac OS X Hints. If you tend to open multiple Finder windows for organising/moving folder/files on the Mac OS X. This script helps to reduce the time after you open a new instance of Finder (ctrl + N) and navigate through endless sub-directories to reach the folder you want.

In more details, this Applescript gets the location of the front-most Finder window and opens a second instance of Finder with the same path and view. If there is no Finder windows at the present when this script is executed, it launches a new Finder window at the system root directory (or any other pre-defined target path).

tell application "Finder"
get the exists of the front Finder window
if the (exists of the front Finder window) is true then
set newWindow to target of front window
set oldView to current view of front window
make new Finder window to newWindow
set current view of front window to oldView
end try
make new Finder window to alias ":"
set the current view of the front Finder window to column view
end try
end if
end tell

Copy above script and paste it to the new project window opened via the ‘Script’ (Applications/AppleScript/), then choose ‘application’ as the ‘File Format’ and then save/compile the project with a meaningful name such as ‘CloneFinder’. Once that is done, drag ‘n drop the newly compiled on to the Finder tool-bar for quick access!!

How To Install Tomcat on Mac OS X 0

Was in a Taverna ( workshop the other day and one of the exercises requires Tomcat to be installed, so I set out to find the quickest, as well as the easiest, way of installing Tomcat on my PowerBook. It turned out to be pretty straight-forward after a bit of Googling, and here is how:

Step 1

Download the latest *Core* binary distributions of Tomcat from (currently in 6.0.13 as of writing).
p.s. Do not download the Windows service installer.

Step 2

Unzip the downloaded binary file into an empty folder of your choice and rename that folder from “apache-tomcat-x-x-xx” to something simpler, e.g. “Tomcat”.

Step 3

Move that folder to a directory of your choice (preferably the “Library” directory under the Root, i.e. ~/Library/) and there you go the Tomcat is installed.

To test and see if your Tomcat installation is successful, start your Terminal and move to the “bin” folder within Tomcat directory (e.g. ~/Library/Tomcat/bin/) and run the following shell script:


and you should see something similar to the following info in your terminal:

/Library/Tomcat/bin andytseng$ ./
Using CATALINA_BASE: /Library/Tomcat
Using CATALINA_HOME: /Library/Tomcat
Using CATALINA_TMPDIR: /Library/Tomcat/temp
Using JRE_HOME: /System/Library/Frameworks/JavaVM.framework/Versions/1.5/Home

If you see the above information, then open your Web browser and type in the following into your URL:


To stop the Tomcat, issue the following command:


That’s it, simple!! 🙂

How to Remove ‘Illegal Name’ Folders/Files on Mac OS X Disk Volume (When Disk Utility Fails…) 4

This happened to me after I removed (uninstalled) Adobe Creative Suite 2. This problem has already been reported by Adobe TechNote Website under the titled ‘File system, I/O, Illegal Name errors, or system crash after you install (Photoshop CS2, Illustrator CS2, Adobe Creative Suite 2)‘.

The solution it suggests is to use the Disk Utility to repair the disk, which I have already attempted with NO luck. The error produced by the Disk Utility is as follows:

Disk Utility reports: First Aid failed.
Disk Utility stopped verifying “The name of your disk volume” because the following error was encountered:
The underlying task reported failure on exit.

and the illegal name being the ONLY error listed.

Then I found another way of removing these nasty illegally-named folders and files by the following steps:

1. Reboot the OS X and during the start-up, press and hold both 'Command' and 's' keys, this will boot your Mac into the 'single-user mode '.
2. Then you will be presented with a terminal-like environment, then type 'fsck -f'.
note: (fsck: filesystem consistency check and interactive repair)
3. When fsck finishes, type 'reboot' to restart your Mac.