Archive for ‘OSX’ Category
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
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.
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’
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.
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)
Note that this will only affect programs launched after the change is made.
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.