Mac OS X – Tips & Tricks

MacLogoThis page is intended to be a collection of unordered, unclassified Mac OS X useful details that I encountered while using Macs. It’ll probably grow in time, since I doubt that new tricks will ever be in short supply. :-)

If you encounter something interesting, please let me know and I’ll add it to the list.

Setting the PATH for graphical applications

Setting a custom PATH for all graphical applications is possible by adding a PATH entry in $HOME/.MacOSX/environment.plist. By default this file is not present and needs to be created.


Running shell scripts from Finder

Clicking on shell scripts in Finder does not run them, but most probably open them for edit.

Setting the execute flag and changing the extension to *.command informs the Finder to run the script in a Terminal window. On script completion the terminal window needs to be manually closed.

A similar effect can be obtained by manually setting the property Open With: for the given script.


Shell path helper

The shell path is set in /etc/profile by calling /usr/libexec/path_helper, a program that uses the files in /etc/paths.d to compose the shell PATH. So for extending the path, individual packages do not need to edit a file, but just add a file in the /etc/paths.d folder. Elegant.