| Get paid up to $40 to write a tip! |
Reset a lost OS X account password in single user mode
Remember, only use this if you have lost the Mac OS X install DVD. Also, don't do this if you have FileVault enabled in your account, and note that this will not change your keychain password.
First, we need to restart in Single User mode. To do this hold down Command-S while the computer is starting up. A command line prompt should appear on the screen instead of the login window or your normal desktop.
At the prompt, type
mount -uw / then
return. Next, type
launchctl load
/System/Library/LaunchDaemons/com.apple.DirectoryServices.plist
then return. You will need to type these exactly the same, so write them down beforehand.
The next step requires you to know the short username of the account. If you don't know this, type
ls
/Users followed by return, and look for it in
the list that appears.
Next, type
dscl . -delete /Users/username
AuthenticationAuthority followed by return. Make
sure you replace username with the short
username of the account.
The final command to type is
passwd
username followed by return. As before, replace
username with the short username of the
account.
The rest is self-explanatory. Type the new password, followed by return. When prompted, retype the password.
Finally, type
reboot and hit return! Your
password should be reset.
Let Stacks keep your Dock tidy
Just as desktops get cluttered because they're handy, and an easy place to put and find things, the Mac OS X Dock gets easily cluttered with every application that you might want to launch at the click of a button. A cluttered dock means it may take so long to find the (tiny) icon you're looking for that you may as well have opened your application folder and searched through. But come to mention it, the Applications folder gets rather cluttered too. You can move things around, but so many programs assume that Safari and other standard applications will be sitting right there in the Applications folder. Is there a better way to group applications sensibly, without using any special software?
With Leopard's new Stacks feature, I believe there is.
2. Then create theme-based folders for every other application you want close at hand. A stack is just a folder dragged onto the Dock, so we'll create the folders first. Create folders somewhere, like your Applications folder or Documents folder. I have folders for 'Utilities', 'Internet', 'Media', and document creation.
3. Fill these folders with aliases of the appropriate applications. Do this by holding the Command and Option keys as you drag a file from the Applications folder to put an alias/shortcut of that file in the destination folder, instead of moving or copying it.
4. When you have filled your theme-based folders, drag them onto the end of the Dock near the Downloads Stack and Trash (but not IN the Trash!) In the past you would have had a bunch of identical folder icons there, but now the Stack takes on a conglomeration of icons from the contents of each folder.
5. Click once on a stack and it opens out quickly. Click once and you launch the application. Click the wrong stack by mistake? Just click the one you want without having to click the first one closed. It's one more click than having everything in the Dock separately, but since icons are grouped more logically and icons can be bigger, it's actually miles more efficient.
6. But what to do with the special Apple icons? Time Machine, Spaces, Dashboard and Expose all have Dock icons which are not normal applications. The good news is that you can get hold of them from the Applications folder and drop them in a Stack, then remove them from the Dock. After all, Time Machine is almost automatic, Spaces, Dashboard and Exposé can be triggered from the keyboard more conveniently anyway (with the F8-12 keys) so they're just extra clutter. But it might be nice to keep the icons around.
NB: You do lose a little functionality that the Dock icons provide in their contextual menus if you follow this method, but nothing really significant in my eyes. Control-click on the dock icons before you delete them and see if you'd really miss any of the functions there. Since 10.5.2 there's a Time Machine menu item now, which gives you back any functionality lost with the demise of the Dock icon. That seems to make more sense anyway.
Finally, you can control-click on the stacks to change the order the icons are sorted, which may be helpful, and affects the order of the conglomerate icon visible on the Dock.
David got paid $20 for this tip. If you know a good Mac tip, why not submit it to the site.
Enable Single Window Mode in Safari
If you use Safari regularly, you may notice that certain links refuse to open in the same window. If a link is set to open in a new window, normally holding down Command while clicking it will make it open in a tab instead. However, in certain places (like Gmail messages) links open in a new window no matter what you do.
defaults write com.apple.Safari
TargetedClicksCreateTabs -bool true
Press return, and quit and reopen Safari. Now all links targeted for a new window will open in tabs instead. To change back to the normal settings, use the same command but with
false at the end instead:
defaults write com.apple.Safari
TargetedClicksCreateTabs -bool false
Don't forget there are loads of other tricks for Safari 3, such as enabling the web inspector and bookmarking all open tabs.
[via TUAW]
Temporarily change Dock magnification settings
If you normally have Dock magnification turned off, holding Control and Shift while moving the mouse along it will temporarily turn on magnification. As soon as you let go of the keys, the magnification will turn back off again.
The Dock will magnify based on the settings in the Dock section of System Preferences, which you can only change when magnification is turned on. As a result you'll have to turn it on, choose your preferred magnification level and turn it back off again.
The keyboard shortcut works the other way round too. If you normally have magnification on, holding Control and Shift will temporarily turn it off.
I'm not sure how useful this feature is, but it's interesting none the less.
New features in Open and Save dialogs
In column view, there is a new contextual menu for changing the column widths. Simply right-click (or hold Control and click) on the handle at the bottom of each column, and the menu will appear. You can choose from Right Size this Column, Right Size All Columns Individually and Right Size All Columns Equally. Strangely, this menu is unique to Open and Save dialogs, and doesn't appear if you right-click the column handle in a normal Finder window. In that case, you have to use the old method.
There are also a couple of new keyboard shortcuts for Open and Save dialogs. Command-I will open up the Get Info window on the selected item, and Command-R will show the item in the Finder. However for some reason, these don't seem to work all the time in Save dialogs.
Install hidden screen savers in Leopard
To find these hidden screen savers, go to Macintosh HD, and navigate to /System/Library/Compositions. In here there are almost 90 Quartz Composition files. They aren't specifically made to be screen savers (it's actually a collection of iChat effects, slideshow transitions, image effects and iTunes visualizers) but some of them work just fine. When you find one you like, open up System Preferences and go to the Screen Saver section. Now just drag the file you have chosen onto the screen saver preview on the right. I have found that the following files work best:
Defocus.qtz
Fall.qtz
Floor.qtz
Grid.qtz
Image Hose.qtz
Kaleidescope.qtz
Moving Shapes.qtz
Stix.qtz
Travelator.qtz
Wall.qtz
Admittedly, Floor is pretty boring, and Stix is actually an iTunes visualizer, but they work none the less. Many of them allow you to change the options in from in System Preferences. For example, you have to choose an image for Kaleidoscope, or it will just display a blank screen.
There are even more compositions available in the Developer Tools. You can install the Developer Tools from the Mac OS X install disk. If you don't have the Developer Tools installed, it means you probably don't need them. It's overkill to install 2.5 GB of tools you will never use, just for a few screen savers. Instead, you can just install the examples. On the install disk, go to /Optional Installs/Xcode Tools/Packages and install DevExamples.pkg.
Take a look in /Developer/Examples/Quartz Composer/Compositions/Graphic Animations. Some of my personal favourites, "Scanner" and "Static" are in here. There are also two purpose built screen savers included with the Developer Tools, located in /Developer/Examples/Quartz Composer/Compositions/Screen Savers. "Retro" takes a picture of your current screen, gives it a sepia tone and bounces it up and down. "Security" takes pictures using your iSight and displays them in a grid. As with the other files, simply drag them to the screen saver preview in System Preferences to install them.
Move all Windows to the Main Display
Luckily, this blog post has the solution - a simple AppleScript. When run, it automatically finds all the windows that are off the edge of the screen and clusters them in the top left of the main monitor. To run it, start by opening up Script Editor (located in Applications/AppleScript) then paste in the following:
property processesToIgnore : {}
tell application "Finder"
set _b to bounds of window of desktop
set screen_width to item 3 of _b
set screen_height to item 4 of _b
end tell
tell application "System Events"
set allProcesses to application processes
set _results to ""
repeat with i from 1 to count allProcesses
set doIt to 1
repeat with z from 1 to count processesToIgnore
if process i = process (item z of processesToIgnore) then
set doIt to 0
end if
end repeat
if doIt = 1 then
tell process i
repeat with x from 1 to (count windows)
set winPos to position of window x
set _x to item 1 of winPos
set _y to item 2 of winPos
if (_x < 0 or _y < 0 or _x > screen_width or _y > screen_height) then
set position of window x to {0, 22}
end if
end repeat
end tell
end if
end repeat
end tell
Click the Compile button at the top to make sure the script is OK. If you receive an error message, check for any problems that may have occurred in the copy/paste process.
For the script to work, you will need to enable access for assistive devices. You can do this by going to the Universal Access section of System Preferences. Check the box at the bottom that says “Enable access for assistive devices”.
Now, when you click the Run button above the script, any off-screen windows will be placed in the top left of the main monitor.
One problem with this is that you may have some applications that keep windows off-screen on purpose. One example of this is Firefox, which gives you a blank square in the top left when you run the script. The first line of the script allows you to get around this by excluding specific applications from the script. For example you could change it to
property processesToIgnore : {"Firefox"}
or
property processesToIgnore : {"Firefox", "otherApp", "anotherOne"}
Now, opening up the script and clicking the "Run" button every time you disconnect your second monitor is quite time consuming. There are a couple of ways to run it much more quickly. The first is to add it to your scripts menu. If you haven't already enabled this, you can do so by navigating to Macintosh HD/Applications/AppleScript and opening up AppleScript Utility. Near the bottom of the window that appears, check the box that says "Show Script Menu in Menu Bar". To add your script to the menu, you have to save it in a specific location. Go to the Library folder inside your user folder and look for a folder called "Scripts". If it isn't there, create it. Save the script here.
An alternative way to run the script is to save it as an application. With the script open in Script Editor, go to the File menu and choose Save As. Change the File Format drop-down menu to Application and then save it. Now when you double-click the script, it will instantly run. Save it somewhere you can easily access it, like on the desktop.
Automatically Insert the Date and Time
How can I set my MacBook to insert today's date, short version or long version, into whatever I'm keyboarding in??? QuicKeys is too expensive for Mac OS X and this Mac should do that!
To install it, create a new folder in your Library folder called "Services" and drag the the WordService.service file into it. Log out then back in again to enable the service.
WordService is now accessible form the Services menu. This is under the Application menu in the top left, next to the Apple menu. You will probably have a lot of things in this menu, even if you have never installed any services before. This is because many applications will add things in that they think are useful. The new entries that WordService has addded are Insert, Format and Convert. Each of these has a submenu with multiple options. The full features are outlined at the bottom of this page.
To insert the current date or time, you want to look at the options in the Insert submenu. There are different options for inserting the short date, long date, time and combinations of these. Each one has a keyboard shortcut to speed things up.
Inserting the date and time is just one thing WordService is capable of. One of the more fun features is the Rotate13 option in the Convert menu. This allows you to "encode" the selected text with a simple substitution cypher. You can also speed up many repetitive tasks like removing double spaces and setting all caps or lowercase.
WordService works in all Cocoa applications (TextEdit, Mail, Safari etc.) and many Carbon Applications. As a result, you can use it almost everywhere. One notable place where it doesn't work is in Microsoft Word. Luckily, all of the Microsoft Office applications have their own way to insert the date and time. You'll find it under the Insert menu.
Disable Tooltips in Safari and Firefox
Most of the time you can solve this by hitting return or enter. The tooltip should disappear. If you want to completely disable them, it is a little bit trickier. Annoyingly, tooltips are applications specific, so you have to enable/disable them in every application. Some applications have a preference to do this. Frustratingly, many do not.
defaults write com.apple.Safari
WebKitShowsURLsInToolTips 0
Then press enter. You will need to quit and reload Safari for changes to take effect. Repeat with a 1 at the end instead of a 0 to reverse this. Note that tooltips are disabled by default in Safari 3. You can use this to enable them.
If you want to disable tooltips in Firefox, start by typing
about:config into the address bar.
In the list that appears, find
browser.chrome.toolbar_tips. An easy way
to find it is to start typing browser.chro
into the filter box. Once you have found the item,
double-click on it to change it from true to false. Now
when you are browsing, tooltips should be disabled.
Simply double-click again to change things back.
Make the Most of Quick Look
Index Sheet
If you select multiple files before activating Quick Look, you'll just be shown a preview of the first file. There are buttons to flick forward and backward through the different previews, but much more interesting is the Index Sheet button. Clicking this is just like using exposé, only with the previews rather than windows. The previews will shrink down to show you them all in a grid. Clicking on one of the thumbnails will expand that one.
Plugins
Quick Look works with most file formats straight away, but for those that don't work there are plugins available. There's a great list of them here. In my opinion, one of the most useful is Folder Viewer. This makes Quick Look list the contents of a folder, instead of just showing a huge folder icon.
Other ways to activate Quick Look
There are many ways of activating Quick Look. The simplest and most well known is hitting the space bar, but there is also the official keyboard shortcut, Command-Y. If you would prefer to use the mouse to invoke Quick Look, you can add a button to the Finder toolbar that does just that. With a Finder window open, choose Customize Toolbar from the View menu and drag up the Quick Look button. Quick Look is also available in the File menu and in the Contextual menu that appears when you right-click on a file.
Jump straight to slideshow mode
Some people have complained that the slideshow function in the Finder has disappeared in Leopard. Actually, it has just become a part of Quick Look. When using Quick Look on multiple images, there is a play button at the bottom to start a slideshow. However, there is an easier way to jump straight to slide show mode. Just add in the Option key to the activation methods listed above. Command-Option-Y will start a full screen slideshow, and if you hold Option when looking in the File menu you will see Quick Look has changed to Slideshow. If you have activated the toolbar icon for Quick Look, holding down option changes it to a play button that starts a slideshow when clicked.
Zooming
If you activate Quick Look on an image, there are a number of ways in which you can zoom. Hold down the Option key and you will notice that the cursor changes to a magnifying glass. Now, using the scroll wheel you can zoom in and out. Alternatively you can Option-click to zoom in. To zoom out, hold Option and Shift while clicking. For PDFs this method doesn't work for some reason. However, you can still zoom using the Command-- and Command-+ keyboard shortcuts.
Keyboard navigation with Quick Look open
While you are previewing a file with Quick Look, you can still use the keyboard to navigate to other files. In column view this is easily done with the arrow keys. In the other views, use Command-DOWN and Command-UP to go into and out of folders.
Examine Trashed Files
It is impossible to open files in the Trash without first moving them out onto the Desktop. So in the past, if you wanted to check through files before emptying the Trash, you had to get them all out first. Luckily, Quick Look works on items in the Trash, so you can quickly look through them to check if you are about to delete anything important.
Use with Time Machine
Another great place to use Quick Look is with Time Machine. Once you've found a file you want to restore, verify it with Quick Look before clicking the restore button.