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.

[2010-08-13]

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: Terminal.app for the given script.

[2010-08-13]

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.

[2010-08-13]

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: