Set/Change the default Umask…

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

Open Terminal, and then type this command, followed by the Return key:

defaults write /Library/Preferences/.GlobalPreferences NSUmask #

defaults write -g NSUmask -int #

The first sets the system default, the second sets the per-user default. The NSUmask may not be honored by software that has not been adapted for OS X. # is the umask (per umask(2)). It may, however, be in decimal instead of octal.

Speed up Sheets…

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

Open Terminal, and then type this command, followed by the Return key:

defaults write NSGlobalDomain NSWindowResizeTime time

where time is a time in seconds from, say, .001 to 2.

Disable Guest login in AFS…

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

Open Terminal, and then type this command, followed by the Return key:

defaults write /Library/Preferences/com.apple.AppleFileServer guestAccess -bool false

Turn off Dashboard…

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

Open Terminal, and then type this command, followed by the Return key:

defaults write com.apple.dashboard mcx-disabled -boolean YES

This tells the system that you no longer wish to have Dashboard available. However, the Dashboard task is actually “owned” by the Dock, so to make your changes take effect, you need to restart the Dock. The easiest way to do that is to type this command into the Terminal (and press Return when done):

killall Dock

After the Dock restarts, hit F12 and you’ll see…nothing at all. If you run Activity Monitor, you also won’t find any Dashboard widgets in the list of tasks, even if you had several open when you ran the above command. Dashboard has been eliminated from your system, and won’t return until you tell it to do so. You can do just that by opening Terminal again, and typing this command:

defaults write com.apple.dashboard mcx-disabled -boolean NO

Once again, you’ll have to use the killall Dock command to make the changes take effect. Once you do, though, you’ll find that Dashboard is back as usual—and any widgets you had opened on the Dashboard will still be open.

Transparent terminal windows…

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

To change future Terminal windows’ transparency (0=invisible, 1=opaque) — in a shell, type this (on one line, change the 0.85 as preferred) then return:

defaults write com.apple.terminal TerminalOpaqueness ‘0.85’

Change the screenshots file format…

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

To change the file type that OS X outputs when using the command + shift + 3 or command + shift + 4 (with or without the spacebar after) in Tiger launch Terminal, and depending on what file type you want outputted, type the appropriate line below followed by return:

defaults write com.apple.screencapture type pdf
defaults write com.apple.screencapture type png
defaults write com.apple.screencapture type jpg
defaults write com.apple.screencapture type tif

Quit Terminal. One caveat: You must restart your computer for the change to take effect right away. To revert to the default png format, type:

defaults write com.apple.screencapture type png

as shown above, or delete the com.apple.screencapture plist file in your user preferences folder (again, you need to restart). You can test out different formats, just remember to restart your computer when you are done or after each test.

Quit X11 without warning dialog…

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

To quit X11 without presenting warning dialog type the following in Terminal application:

defaults write com.apple.x11 no_quit_alert true

See man page for Xquartz for more details.

Customize those tooltips…

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

Tooltips are those ‘helpful’ yellow tags containing messages that sometimes appear when the mouse pointer hovers over controls in many programs. For various reasons, I sometimes find aspects of their implementation to be unsatisfactory. Fortunately, it turns out to be possible to tweak tooltip characteristics (at least in Cocoa apps) to some extent, by adding various properties to the .GlobalPreferences.plist file, or an individual program’s .plist file.

Some of the available properties (their functions are more or less self-explanatory) include:

defaults write -g NSInitialToolTipDelay -int 10000 (time in ms)
defaults write -g NSToolTipAutoWrappingDisabled -bool true (or false)
defaults write -g NSToolTipsFont -string fontname (substitute fontname)
defaults write -g NSToolTipsFontSize -int 10 (or some other font size)

Note that this will only affect programs launched after the change is made.

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

OR

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

123... 62636465PreviousNext