Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Get desktop icons out from under the Dock System
If you move the Dock from the bottom to the right side of your desktop, you may find that the icons on the right side of your Desktop become partially hidden underneath the Dock. This is both ugly and makes it more difficult to click on those icons (such as your hard drive's icon). What you want to happen, of course, is for the desktop icons to move over towards the left in order to make space for the Dock.

For some reason, Finder doesn't reset the icon grid on the desktop when the Dock is moved to the side of the screen. A quick Google search on this issue revealed nothing more helpful than the suggestion to set the Dock to automatically hide. But there is an easy way to get the Finder to move the desktop icons out from under the Dock.

Click on the Desktop, select Show View Options from the View menu, and slide the Grid Spacing slider around. As soon as you do this, the grid will be reset to respect the position of the Dock, and will move your desktop icons out from underneath the Dock. You can then put the slider back into the same position you had it before, and close the View Options palette.
  Post a comment  •  Comments (8)  
  • Currently 2.60 / 5
  You rated: 4 / 5 (10 votes cast)
 
[12,926 views] Email Article To a Friend View Printable Version
Temporarily prevent screen dimming System
If you are running your laptop on the battery, and want to temporarily prevent the screen from dimming after a short period of inactivity, you can use the 'Disable Screensaver' hot corner (set in the Desktop & Screen Saver System Preferences panel) to also prevent the screen from dimming.

In my tests, the screen would dim after 60 seconds of inactivity when display sleep was set to five minutes.

You can also permanently turn off screen dimming by opening the Energy Saver System Preferences panel. Select Settings for Battery, click the Options tab, and uncheck 'Automatically reduce the brightness of the display before display sleep.'
  Post a comment  •  Comments (1)  
  • Currently 1.33 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (6 votes cast)
 
[6,279 views] Email Article To a Friend View Printable Version
Create a text clipping containing the '@' character System
I needed to create a text clipping that contained the "@" character, but couldn't, because MacOS creates dragged text containing an "@" character as an email link. See for yourself: Select the following text -- xxxx+yyyy -- then drag it to your Desktop. This creates a text clipping file named xxxx+yyyy.textClipping. Now select the following text -- xxxx@yyyy -- and drag it to your Desktop, and notice that the file is named xxxx@yyyy.mailloc, and its icon says MAILTO. If you drag and drop this text into a program, it will get pasted as mailto:xxxx@yyyy.mailloc.

The solution requires editing the xxxx+yyyy.textClipping clipping file. This requires several steps:
  1. Extract the contents of its resource fork into a temporary file (using a receipe from this hint)
  2. Edit the temporary file
  3. Write the temporary file back into the resource fork.
Read on for the details...
read more (199 words)   Post a comment  •  Comments (8)  
  • Currently 1.43 / 5
  You rated: 1 / 5 (7 votes cast)
 
[9,784 views] Email Article To a Friend View Printable Version
A heads-up on pairing remotes to Macs System
I just bought a new aluminum MacBook, and discovered that I couldn't get an IR remote control to pair with the notebook. This is optional, but it prevents other remotes from controlling your Mac.

If you go to the Security System Preferences panel, you'll find a Pair/Unpair button. Clicking on Pair brings up a message instructing you to press and hold the Menu and Next buttons on the remote until a "paired" icon appears.

I tried this several times with no luck. Finally, I found that you have to be running an admin account for this to work -- there is no indication that you can't pair from a non-administrator account. As a matter of fact, the panel is disabled until you click the lock and enter an admin account and password. But even after unlocking, you still can't pair from a standard account.

So if you have trouble pairing a new remote, make sure you log into an admin account first.
  Post a comment  •  Comments (3)  
  • Currently 1.57 / 5
  You rated: 3 / 5 (7 votes cast)
 
[8,367 views] Email Article To a Friend View Printable Version
One way to see a frozen window's contents System
Sometimes after switching from one application to another, and then trying to return to the first, I'll find that it won't come forward -- because the first application is doing a long calculation, or something else that makes it freeze. I want to see the current window state for the frozen application, but I can't do it until the program has finished doing whatever it's doing.

For those times when I just can't wait, I think I found the solution: Exposé. Just press F9 (or whatever key you've assigned to All Windows), or move your mouse to the All Windows screen corner, if you've set that up. Then just click on the frozen window, and it should come to the foreground (though it won't update until the long calculation is done).
  Post a comment  •  Comments (1)  
  • Currently 1.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (5 votes cast)
 
[6,804 views] Email Article To a Friend View Printable Version
Keep apps alive without losing environment variables System
Other hints, such as this one, describe how to keep an application alive using launchd. problem with this technique is that applications (re-)started this way inherit launchd's environment, not the user's, and so don't include any environment variables defined in ~/.MacOSX/environment.plist

If that's a problem for you (it is for me), then you can include those variables by launching the application indirectly, from a script which parses the environment.plist before invoking the application. Save the script below to a file called LaunchWithToplevelEnvironment.sh (or whatever you like) in ~/Library/LaunchAgents, then make that script executable (chmod a+x script_name):
#! /bin/sh -
#
# Launch a program (given as the first argument) in an environment
# which includes the variables defined in ~/.MacOSX/environment.plist.
#
# Usage:
#   LaunchWithUserEnvironment.sh <program> arg? ...
#
# Norman Gray <http://nxg.me.uk>

if test $# -eq 0; then
   echo "$0: no args" >&2
   exit 1
fi

tmpfile=${TMPDIR:-/tmp}/nxg.LaunchWithToplevelEnvironment.tmp

cat <<EOD | /usr/bin/xsltproc --novalid - $HOME/.MacOSX/environment.plist > $tmpfile
<?xml version='1.0' encoding='UTF-8'?>
<stylesheet xmlns='http://www.w3.org/1999/XSL/Transform' version='1.0'>
 <output method='text' encoding='UTF-8' version='1.0'/>
 <template match='/'>
   <apply-templates select='plist/dict/key'/>
   <text>
</text>
 </template>
 <template match='key'>
   <text>export </text>
   <value-of select='.'/>
   <text>=</text>
   <value-of select='following::string[1]'/>
   <text>
</text>
 </template>
</stylesheet>
EOD

. $tmpfile
rm -f $tmpfile

# exec the program, including any provided arguments
exec "$@"

# shouldn't get here
exit 1
# end of script
You use it by creating or amending the KeepAlive launchd plist file so that it has a two-argument ProgramArguments element: Remember to adjust the paths and filenames as appropriate.

[robg adds: I haven't tested this one.]
  Post a comment  •  Comments (2)  
  • Currently 1.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (5 votes cast)
 
[8,657 views] Email Article To a Friend View Printable Version
Toggle AirPort on and off using keyboard shortcuts System
This is the simplest way I've found to toggle the AirPort card on and off without using third party applications or too many buttons. Hopefully others will appreciate this function as I do. Note: This function is tailored to a MacBook, as the F5 and F6 keys have no predetermined function on these machines. Other machines may need the shortcut keys to be edited.
  1. Create two keyboard shortcuts. Go to the Apple menu » System Preferences » Keyboard & Mouse » Keyboard Shortcuts tab. Click the plus sign at the bottom of the window, and select All Applications from the pop-up menu in the next dialog. In the Menu Title box, type Turn AirPort On with that exact case and spelling. Set the Keyboard Shortcut to F5, then click Add. Click the plus sign again, leave the pop-up menu set to All Applications, and in the Menu Title box, type Turn AirPort Off with the shortcut key also set to F5 -- only one of these functions will be displayed at a time.
  2. In the Keyboard Navigation section of the same window, change the 'Move focus to status menus in the menu bar' to F6 (and check the box to enable this shortcut, if it's not yet enabled).
  3. Make sure the AirPort icon is in your menu bar. Then hold down the Command key and drag the AirPort Menu bar icon as far to the left as possible. This insures that it is the first to be selected when you move focus to the menu bar.
  4. Finally, restart your system.
After your Mac reboots, press F6 to move focus to the menu bar, and F5 to toggle AirPort on or off, depending on its current state.
  Post a comment  •  Comments (5)  
  • Currently 2.27 / 5
  You rated: 2 / 5 (11 votes cast)
 
[26,358 views] Email Article To a Friend View Printable Version
Automate print to PDF using AppleScript and Pages System
There are times that it would be nice to automate the creation of PDF files. For example, one might want a workflow to open a file, change some paragraphs, and print to PDF. This would seem a simple thing, but I haven't found a way to script the Print to PDF functionality. However, the Pages app in the iWork suite will do it for you.

As an example, the following AppleScript will use {ages to print to PDF: Some interesting things to note about the above code. First, the file test3.pdf will be created as a PDF. It seems Pages figures out what you want, and you get a PDF. test2.rtf and test4.txt will be created as RTF and pure text files, which is also useful. However, the file test1.rtf never gets created -- instead, you get a Pages document named test1.rtf.pages. It seems Pages takes the first save as saving the document, then runs the subsequent saves in the proper format. Even if you use the as "rtf" construct in the AppleScript, Pages still saves the file as a Pages document. The workaround here is to have a template document which you open, then do the save into another file:
tell application "Pages"
    open file "test6.pages"
    set product to front document
    set first paragraph of product to "Fee, fii, foo, fum!"
    save product in "test6.pdf"
end tell
Of course, all of the above examples save the files at the root directory level -- full AppleScript paths would be needed to put the files where you want. This method is a valuable way to automate the creation of PDF files with the combination of Pages and AppleScript.
  Post a comment  •  Comments (8)  
  • Currently 2.20 / 5
  You rated: 4 / 5 (10 votes cast)
 
[23,470 views] Email Article To a Friend View Printable Version
Keyboard shortcuts and the ellipsis character System
When adding a keyboard shortcut to System Preferences (for a menu item for a given application), you sometimes need to add an ellipsis (…) at the end of a menu item's name. A previous hint mentions the need to use the Character Palette to generate this character (or press Option-; on a US keyboard).

Today, I was assigning a keyboard shortcut to an application's menu item, and I kind of forgot to enter the actual ellipsis character, and instead typed three periods. Interestingly, the shortcut worked. I don't know when this was changed (I have written a couple of articles in the past few years about keyboard shortcuts, and always found the need to type the ellipsis character), but it is certainly recent. This saves time and makes it much easier to enter a keyboard shortcut.

While I'm on the subject, I also noticed that the shortcut was active immediately; I didn't need to quit and relaunch the application I set it for. This, too, is a recent change.

[robg adds: The immediate activation of new keyboard shortcuts is a 10.5 addition; I'm not sure about when the ellipsis behavior changed.]
read more (1 words)   Post a comment  •  Comments (10)  
  • Currently 1.60 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (5 votes cast)
 
[39,366 views] Email Article To a Friend View Printable Version
A detailed look at File Vault and data protection System
There's a certain amount of spookiness that goes on regarding Apple's FileVault encryption. As everyone knows, it's very difficult to get into anything that's encrypted without the proper keys. But let's assume for a minute that you already have the key via, say, a court order for a suspect in a law enforcement action. Even with the key, however, there's still a lot of ambiguity about just how well the suspect's data (and in particular, deleted data) may be protected.

I've written a brief titled FileVault Imaging: Apple's Dirty Little Secrets that explains exactly how you can mount a FileVault volume (with the key, of course) to obtain the raw disk image. I will also illustrate how deleted data can be preserved inside a FileVault, and how a free space wipe does nothing to purge deleted data from inside one. The protection offered by an encrypted volume seems to aggravate other security issues, possibly making deleted data less secure.

[robg adds: The referenced brief is not about breaking into FileVault volumes, but about how data is stored and managed within those volumes -- in particular, deleted data. The section on the free space wipe was the most interesting to me -- this feature basically doesn't work as intended if you're using FileVault. I haven't tried to confirm that finding for myself, but the provided example seems fairly clear-cut in its proof.]
  Post a comment  •  Comments (7)  
  • Currently 1.33 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (6 votes cast)
 
[13,096 views] Email Article To a Friend View Printable Version