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

10.5: View syntax-highlighted source code in Quick Look System 10.5
There's a new free Quick Look plug-in (Plug-in [338KB] | Source [469KB]) which allows one to display source code with color syntax highlighting. It uses the Highlight package, which means it supports a ton of languages.

This page will help you add more supported file types to the plug-in.

[robg adds: Given how new Quick Look is, and how very useful it is, I've chosen to run hints on various plug-ins that add functionality to Quick Look. My requirements for a plug-in to be "hintable" are that they must be free, and ideally (as with this one) also open source. I don't anticipate we'll have a ton of such hints; there are only so many file types to be Quick Looked, after all.]
  Post a comment  •  Comments (13)  
  • Currently 2.60 / 5
  You rated: 4 / 5 (5 votes cast)
[8,672 views]  View Printable Version
10.5: Run Time Machine on a single drive System 10.5
Contrary to popular belief, Time Machine does not require a second physical drive (or network drive) to store its backup files. It seems to be quite happy backing up to a secondary partition on the primary hard drive.

Use Disk Utility to create a dedicated HFS+ partition for Time Machine that is as large or larger than the partition(s) you want to back up (Disk Utility in 10.5 allows live resizing of the active system partition - yay!). After the partition has been created, use the Time Machine preferences pane to select it as the backup destination.

When you select the backup partition, you will receive a warning about how backing up to the same physical disk is not a safe as backing up to a second physical drive, but you are allowed to click through and do it anyway.

As warned, using a secondary partition as your backup does not provide the same hardware redundancy as using an external drive; however, for laptop users especially, the convenience of being able to store a "previous versions" backup on the internal drive might outweigh the risk. (If you do backup to the internal drive using Time Machine, make sure to keep a clone backup image on an external drive for disaster recovery.)

[robg adds: This previous hint explained another way to use a partitioned drive for Time Machine -- in this case, on a second drive with a separate bootable partition on it.]
  Post a comment  •  Comments (1)  
  • Currently 1.50 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (2 votes cast)
[10,469 views]  View Printable Version
10.5: Switch Spaces using the number keys System 10.5
If you activate Spaces, you can jump to a specific space by pressing the number of the space you want to go to. For example, activate Spaces by pressing F8, then hit 4 to jump to space number four (and exit Spaces). It also works with the numeric keypad.
  Post a comment  •  Comments (0)  
  • Currently 1.50 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (2 votes cast)
[4,147 views]  View Printable Version
10.5: Add useful toolbar buttons to Screen Sharing System 10.5
In Mac OS X 10.5's Screen Sharing app (the Share Screen button when viewing a Mac in the SHARED section of the Finder's sidebar), you can enable toolbar buttons that will put you in full-screen mode (like Apple Remote Desktop) or allow you to "curtain" (hide the screen of) the remote Mac. You'll need to have the Property List Editor installed, which is part of the Developer Tools included with Leopard. To add the toolbar buttons, you should:
  1. Make sure that you've used the screen sharing feature in Leopard at least once to ensure that a prefs file is created. Quit it if it is running already.
  2. At the command line (in or an xterm) enter the following, all on one line:
    open -a "Property List" ~/Library/Preferences/
  3. In the property list editor which should then open, navigate the tree to Root » NSToolbar Configuration ControlToolbar » TB Item Identifiers.
  4. Select one of the children of the TB Item Itentifiers node, and press Add Sibling. I selected the Scale child, which places the toolbar button after the scale/don't scale toolbar button already in the toolbar.
  5. Set the Class of your new entry to String from the pop-up (which it may default to), and the Value to FullScreen.
  6. Press Add Sibling again, set the Class to String, and the Value to Curtain.
  7. Save your changes, and open a new Screen Sharing session.
Start a sharing session and make sure the toolbar is visible (View » Show Toolbar, or click the button at the top right of the screen. You'll see your new Full Screen button in the toolbar. Click it, and you will be switched into a full screen mode very much like the one in Apple Remote Desktop; click the "X" icon in the toolbar to exit full screen mode.

The Curtain button will hide the display on the actual Mac you're sharing, replacing it with a large lock icon and some text you specify.

[robg adds: Hints user bdog noted in a comment on our queue site notes that there are four additional buttons you can add to the toolbar (all of Class String): Quality, Capture, Control, and Share. Quality adds a slider that lets you vary the image quality (and hence speed of the shared screen); Capture takes a local screenshot of the remote Mac, Control toggles the mode from "you control everything" to "you observe everything," and Share lets you toggle whether the other machine's mouse and keyboard are active while you're in sharing mode. These are all features of the full Apple Remote Desktop program, I believe.

In my testing, they worked reasonably well, but not perfectly. For instance, the first time I used Curtain mode, the remote Mac locked with a solid blue screen. After I restarted it, though, Curtain mode worked, but the text display exhibited a bug -- I entered "Controlled by robg..." and the onscreen display read "Controlled by robg....lockedByString." But in general, all these features work well, and they add welcomed functionality to screen sharing.

Finally, you can still use the Customize Toolbar option within Screen Sharing and you won't lose these new buttons -- as long as you don't drag them off, obviously, or drag in the default toolbar choice.]
  Post a comment  •  Comments (33)  
  • Currently 3.13 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (8 votes cast)
[42,802 views]  View Printable Version
10.5: Activate Spaces in Exposť mode with one keypress System 10.5
As described in this hint, you can use Spaces and Exposť together at the same time -- just press F8 followed by F9. But how can you bind both operations to a single key? Use a tiny AppleScript with GUI Scripting turned on (Enable Access for Assistive Devices in the Universal Access System Preferences panel), and Quicksilver triggers to assign it to a key. In my setup, I've assigned Spaces to F7, Exposť to F8, and Spaceposť to F11; it works like a charm. Here is the Spaceposť script in all of it's glory:
tell application "System Events"
  key code 98 -- F7 - Spaces
  key code 100 -- F8 - Expose All Windows
end tell
Here are the key codes for all the function keys:
  • F1: 122
  • F2: 120
  • F3: 99
  • F4: 118
  • F5: 96
  • F6: 97
  • F7: 98
  • F8: 100
  • F9: 101
  • F10: 109
  • F11: 103
[robg adds: I haven't tested this one...]
  Post a comment  •  Comments (7)  
  • Currently 2.50 / 5
  You rated: 4 / 5 (6 votes cast)
[14,435 views]  View Printable Version
10.5: Toggle Quick Look's view mode via the keyboard System 10.5
If you select a number of files in the Finder and activate Quick Look (by pressing the Space Bar), you can then see either one file at a time (the default), or by clicking the Index Sheet button, see small versions of all selected files at once.

But did you know you can get to the Index Sheet without touching the mouse? Just press Command-Return while viewing one file, and you'll see all files; press the combo again, and you'll return to single file mode (and yes, adding Shift to the mix will do it all in slow motion).
  Post a comment  •  Comments (5)  
  • Currently 3.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (2 votes cast)
[6,074 views]  View Printable Version
10.5: Move Time Machine backup to another drive System 10.5
I couldn't find this documented anywhere, so I thought it might be worth mentioning that you can move a Time Machine database from one disk to another using Disk Utility. Using the Restore feature in Disk Utility, you can "restore" the Time Machine disk to another disk and retain the history of changes. This could be useful if you've outgrown your Time Machine backup drive, and want to migrate your existing backups to a new, larger drive. You should turn Time Machine off before doing starting this process, of course.

Be aware that the disks will have the same name and information, so it might confuse Time Machine. For example, after I activated Time Machine on the newly-created disk, I plugged in the old disk, and it showed up as a Time Machine drive, but the backup failed. It's probably best to avoid having both of them plugged in. At the very least, rename one of them.

Perhaps more importantly, Carbon Copy Cloner 2.3 doesn't work correctly for cloning a Time Machine drive (I don't know about 3.x), as it doesn't copy hard links but rather, copies what the links point to. This results in a lot of copies of your system when the Time Machine database has been around for a while.
  Post a comment  •  Comments (23)  
  • Currently 3.89 / 5
  You rated: 2 / 5 (19 votes cast)
[149,582 views]  View Printable Version
10.5: Bluetooth keyboard pairing via System Preferences System 10.5
The new Bluetooth System Preferences in Leopard are much more useful for showing the status of favorites and connecting them easily, particularly when re-pairing devices that are used with multiple computers. However, if you connect two keyboards at once (USB or Bluetooth), there's a problem with re-pairing the Apple Wireless Keyboard when you try to connect via the Actions (gear icon) drop-down menu: Bluetooth Prefs should generate a passkey, but doesn't always do it.

It turns out that the prompt to manually enter a passkey is actually active but not visible. Make sure your keyboard is on and discoverable (blinking green light), and type an easily remembered passkey (1234) and hit Enter. Then the prompt to match the passkey will pop up. Enter this on the other keyboard and hit Enter. The keyboard will then connect.
  Post a comment  •  Comments (2)  
  • Currently 3.14 / 5
  You rated: 5 / 5 (7 votes cast)
[14,433 views]  View Printable Version
10.5: Use the built-in firewall to block web sharing System 10.5
Leopard's built-in firewall is great, but as soon as you use web sharing (eg, for local testing), it is added to the allow list of the firewall (under "Set access for specific services and applications").

But it's easy to change that, and to block any incoming connection to your local web server from outside your Mac:
  1. In the Finder (Go » Go to Folder...), go to folder /usr/sbin and locate the file httpd
  2. Open System Preferences » Security » Firewall), and select the "Set access for specific services and applications" option.
  3. Click on the "+" button at the bottom of the list, then drag the file httpd from /usr/sbin in the Finder to the Open dialog, then click Add (Validate).
  4. In the list of services, locate httpd, then select "Block incoming connections" in the popup menu.
Note: you may wish to do the same for mysqld, located in /usr/local/mysql/bin. This way, you can use your local web server and MySQL from your Mac, but nobody can connect from the outside.

[robg adds: A commenter on the queue site notes that you can make these changes in the Apache and MySQL config files instead. In Apache's config file (/etc/apache2/httpd.conf), change Listen 80 to Listen For MySQL, find the my.cnf file (usually in usually in /etc or /usr/local/etc), and look for the [mysqld] section of the file. Add either bind-address= or the more-restrictive skip-networking option to this file. Apparently skip-networking will still allow local connections via Unix socket, not TCP. The difference with this method is that you don't even need to use the built-in firewall.]
  Post a comment  •  Comments (4)  
  • Currently 1.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (2 votes cast)
[11,758 views]  View Printable Version
10.5: Restore a missing Character Palette System 10.5
For some unknown reason, the international data caches can get corrupted and prevent Character Palette and Keyboard Viewer from appearing on the Input tab of the International System Preferences pane. This also breaks the Special Characters entry in the Edit menu of many applications, including the Finder, Safari, and Text Edit.

If this happens to you, go to System/Library/Caches folder and trash the following files (don't worry, they will be re-created when you restart your Mac):
You will be asked for an administrator ID and password, as you're deleting system-owned files. If you don't have an administrator ID and password, ask the system manager in your office. After you authorize the action, the files will be trashed. Now restart your Mac.

Open System Preferences, open the International pane, and click the Input menu. You will find that the Character Palette and Keyboard Viewer items are once again present with their chechboxes. Click the two checkboxes. Be sure to also check Show The Keyboard Menu In The Menu Bar at the bottom of the pane. Exit System Preferences.

The Edit » Special Characters menu item in applications that have this item will also now work as expected, and will open the Character Palette when selected.
  Post a comment  •  Comments (3)  
  • Currently 3.67 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (3 votes cast)
[20,566 views]  View Printable Version