Homepage, Blog >
Articles >
Mac Tricks
Terminology
- Option key: Mac speak for "Alt"
- Command key: The Apple key, used for menu commands.
- Aqua: The name of the Mac OS X GUI. Meaning: You can usually
substitute "GUI" for "Aqua", sometimes also used to differentiate
X11-based programs from true Mac OS X programs.
- Cocoa: An object-oriented API for writing Mac OS X programs, inherited from the NeXT operating system.
- Carbon: A procedural API, inherited from the old Mac OS.
- Universal Binaries: Applications (see below under "File System")
can contain binaries for both the PowerPC processor architecture and
hte Intel processor architecture. Applying File -> Get Info to an
application shows it as "Kind: Application", followed by whether the
application is Universal, Intel-only or PowerPC-only.
- Rosetta: A just-in-time compiler that translates PowerPC programs
to Intel code. Thus, most of the older Mac OS X programs still work,
even if they are not Universal.
File System
- Change the location of your home directory or shell:
- In application "NetInfo Manager" change the properties of /users/<your-login>: "home" or "shell"
- Applications: Mac applications are just directories whose name
ends with ".app", in the Finder, you can use the context menu to look
inside such a folder. Advantages of this mechanism: Applications can be
so-called "fat binaries" and contain code for multiple processor
architectures and they are easy to install and uninstall: You just copy
them wherever you want to use them and thrash them for deinstallation.
More Information
- File system layout: Inspired by the Unix /usr/bin etc., but a bit easier to understand
- http://www.westwind.com/reference/OS-X/where-files.html
- Hidden files: Under the Finder (but not under the shell) much of Mac OS X's Unix personality is hidden.
- http://www.westwind.com/reference/OS-X/invisibles.html
Shell
- Use an Option click to position the cursor in the terminal, e.g. when you are using emacs over ssh.
- Terminal -> Window Settings -> Emulation -> Option click to position cursor
- Open files with Mac applications: A nice side effect is that, if
you are using ssh-agent, the applications will inherit its access
rights.
- open . # open the current directory with the finder
- open -a textedit myfile.txt
- open -a textedit # just open the program
GUI Tricks
- Drag and Drop and Option-Tab: You can use Option-Tab during D&D, in order to easily transfer data between programs
- Drag and Drop files on Mail.app: Creates a new email message whose attachment is the file.
Enabling Hidden Features in Apple's Programs
Apple's apps store their preferences quite cleverly in a tree that can
be accessed from the command line. Thus, the following hacks are
possible.
iTunes
- iTunes: Making the arrows transport you to your library and not to the store. Option-Click will still take you to the store.
- In the terminal type: "defaults write com.apple.iTunes invertStoreLinks -bool YES"
- Safari: Enable the debug menu (which has some nifty stuff in it)
- Type: "defaults write com.apple.Safari IncludeDebugMenu 1"
- Terminal: Enable focus-follows-mouse
- Type: "defaults write com.apple.Terminal FocusFollowsMouse -string YES"
- X11: Enable focus-follows-mouse
- Type: "defaults write com.apple.x11 wm_ffm true"
Other Sources of Information
Document History
- 2006-06-05: First version of this document
Axel
Rauschmayer