Get expanded open/save dialogs…

datePosted on 13:10, May 25th, 2007 by Many Ayromlou

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.

Enable network connections in X11…

datePosted on 13:09, May 25th, 2007 by Many Ayromlou

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 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 no_auth -boolean false

Stop .DS_Store files on net drives…

datePosted on 13:09, May 25th, 2007 by Many Ayromlou

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.
Note: This will affect the user’s interactions with SMB/CIFS, AFP, NFS, and WebDAV servers.

1. Open the Terminal.
2. Type:
defaults write DSDontWriteNetworkStores true
3. Press Return.
4. Restart the computer.

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 file to the ~/Library/Preferences folder of other target users.

Dashboard widgets on desktop…

datePosted on 13:08, May 25th, 2007 by Many Ayromlou

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 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).
2. Begin dragging the widget.
3. Press F12 again, before letting up on the mouse button.
4. Drop the widget wherever you want it.

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.

Get web PDF’s to open in preview…

datePosted on 13:07, May 25th, 2007 by Many Ayromlou

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 WebKitOmitPDFSupport -bool YES

Changing windows minimize effects…

datePosted on 13:06, May 25th, 2007 by Many Ayromlou

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 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.

Creating a login hook…

datePosted on 13:04, May 25th, 2007 by Many Ayromlou

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.
* The login hook will be run as root.
* In the login hook script, the variable $1 returns the short name of the user who is logging in.
* Other login actions wait until the hook has completely executed.

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).
2. In the Terminal window, type:

sudo defaults write 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/ file.

3. Type your password at the prompt, then press Return.

Hide Accounts in the Login Window…

datePosted on 13:02, May 25th, 2007 by Many Ayromlou

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/ 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/ 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.

Get yourself a smart dock…

datePosted on 13:01, May 25th, 2007 by Many Ayromlou

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 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.

Add Quit menu option to Finder…

datePosted on 13:00, May 25th, 2007 by Many Ayromlou

You can make Finder quit-able by issuing the following command in Terminal window:

defaults write 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).

123... 636465PreviousNext