One of the most common questions I get from users is why can’t I choose a folder when I use File -> Save (As) and I have to tell them ‘click the little blue button with the black triangle.’ This expands the sheet (collapsed by default) to allow the user to choose a specific folder.
You can use this Terminal command to set this value (for all users):
defaults write /Library/Preferences/.GlobalPreferences NSNavPanelExpandedStateForSaveMode -string 1
defaults write ~/Library/Preferences/.GlobalPreferences NSNavPanelExpandedStateForSaveMode -string 1
for the currently logged in user.
Before we can use xhost and xauth across machines, we need to configure the display server to accept incoming network connections. The nolisten_tcp setting controls this. It must be set to false in order to accept connections. This can easily be accomplished through the Mac OS X user defaults system. Use defaults write to change a setting:
defaults write com.apple.x11 nolisten_tcp -boolean false
Remember, false enables incoming connections, true disables connections. Use the boolean values instead of their numeric counterparts.
Alternatively, you can use the X11 Preferences dialog to perform this task, as shown in Figure 3, but you will need to exit and then restart X11 in order for any changes to take effect.
For security reasons, checking “Allow connections” requires that you also check “Authenticate connections”. The authenticate checkbox corresponds to the no_auth flag, which can be set or cleared using defaults write:
defaults write com.apple.x11 no_auth -boolean false
To configure a Mac OS X user account so that .DS_Store files are not created when interacting with a remote file server using the Finder, follow the steps below.
1. Open the Terminal.
If you want to prevent .DS_Store file creation for other users on the same computer, log in to each user account and perform the steps above—or distribute a copy of your newly modified com.apple.desktopservices.plist file to the ~/Library/Preferences folder of other target users.
If you’d like one of your Dashboard widgets to be available all the time, instead of only when you have activated Dashboard via F12, then activate the Dashboard dvelopment mode. Open the Terminal and type:
defaults write com.apple.dashboard devmode YES
and press Return. Then logout and log back in again. Now debugging mode is activated. To get a widget off of the Dashboard and onto your desktop, just do the following:
1. Activate Dashboard by pressing F12 (or whatever key you’ve assigned to Dashboard).
You can do the same thing in reverse to drag the widget back onto the Dashboard. Also of interest: while a widget is frontmost, you can press Command-R to reload it. (This may be necessary if a widget is buggy and gets messed up somehow.) There’s even a nifty Core Image-based twirl effect to accompany the reload.
To get PDF’s from the web to open in Preview instead of Safari (like they used to) type in Terminal (with Safari off):
defaults write com.apple.Safari WebKitOmitPDFSupport -bool YES
There are actually a few tricks you may do with minimizing windows in OS X. In system preferences you can select either ‘genie’ or ’scale’ effect. But there is another one, called ’suck’. This one can’t be enabled via system preferences, but it can be via the terminal.
So open your terminal and type the following line:
defaults write com.apple.dock mineffect suck
Now close the terminal, log out and log back in, and voila – your windows … errr… well … ’suck’.
To return to ‘genie’ or ’scale’ simply go to the system preferences and select either, it will instantly change to the selected one.
Did you know that you can have Mac OS X run a script whenever you log in to your computer? You can if you create a “login hook.” A login hook tells Mac OS X to execute a certain script when a user logs in. Unlike Startup Items that open when a user logs in, a login hook is a script that executes as root. This advanced article shows you how to set up a login hook.
With a login hook:
* The script specified as a login hook must be executable.
How to set up a login hook
Mac OS X 10.3, 10.4, or later
Note that with Mac OS X 10.3.x and 10.4.2 or later, you can use the alternative method at the bottom of this document instead, if you wish. For Mac OS X 10.4 and 10.4.1, you should always use the following steps:
1. Open Terminal (Applications/Utilities).
sudo defaults write com.apple.loginwindow LoginHook /path/to/script
(where /path/to/script is the full path to the script that you want to execute when a user logs in—it doesn’t have to be in the user’s Home directory).
This modifies the /var/root/Library/Preferences/com.apple.loginwindow file.
3. Type your password at the prompt, then press Return.
In OS X it is easy to create as many user accounts as you need. It’s definitely useful being able to have an account for each family member, or an account just for troubleshooting. However, this also leads to an extremely long list on the login window, and an annoying scroll bar down the side.
If you are running Tiger, hiding user accounts that you rarely use is simple. Firstly, go to the Accounts pane in System Preferences, and find the “short name” of each user you want to hide. Once you have these, open up Terminal (Applications/Utilities) and enter the following:
sudo defaults write /Library/Preferences/com.apple.loginwindow HiddenUsersList -array-add shortname1 shortname2 shortname3
Obviously shortname1, 2 and 3 will be replaced with the short names of the user accounts you wish to hide. You can hide as many as you like, just separate each with a space.
To make a hidden name appear again, type the command with no names in it, therefore resetting the list of hidden users.
sudo defaults write /Library/Preferences/com.apple.loginwindow HiddenUsersList -array-add
Notice that doing this adds an extra option to your login window – “Other…” When you select this, you will be presented with text boxes to enter a username and password.
By modifying this small setting, you can make the Dock show which applications are hidden by displaying them as a semi-transparent icon. To do this, open up the Terminal (Applications/Utilities) and type the following:
defaults write com.apple.Dock showhidden -bool yes
For this change to take place, you have to relaunch the Dock, using Activity Monitor. Do this by loading up Activity Monitor (Applications/Utilities) and typing dock into the search field. Quit the process named dock.
To cancel this change, and return the icons to normal, repeat the above command in the terminal, but replace yes with no.
You can make Finder quit-able by issuing the following command in Terminal window:
defaults write com.apple.finder QuitMenuItem 1
You’ll need to option-click and hold on the Finder’s Dock icon, and then relaunch the Finder to see your changes take effect. The new Finder process will have a Quit menu option which allows you to quit Finder whenever you don’t need it (this even saves a few Mb’s of RAM).