Terminal

The Ultimate Mac Screenshot Guide

I've noticed a lot of recent articles around the web about taking screenshots on a Mac. There's just the odd tip here and there, so I thought I'd do a complete guide. If you are familiar with taking screenshots, you might want to scroll down to the bottom, where there are some more advanced tips.

Keyboard Shortcuts
The quickest way to take a screenshot is to use a keyboard shortcut. Annoyingly, these aren't particularly intuitive. There are two main ones:

Command-Shift-3 - Take a screenshot of the entire screen.
Command-Shift-4 - Allows you to click and drag around the area you want a shot of.

Each of these will save a file to the desktop named Picture 1.png, or a higher number if that file already exists.

Now there are a few extra things you can do. If you press Space after pressing Command-Shift-4, you will notice that the cursor changes to a picture of a camera. You can now just click on a window, icon, widget or almost any other interface element to take a screenshot of it. You can also add Control into the keyboard shortcut to put the image in the clipboard instead of saving it to the desktop. For example, pressing Command-Control-Shift-3 would allow you to then paste the image into another document.

The Grab Application
Grab Icon
If you can never remember keyboard shortcuts, the Grab application is for you. It is located in Applications/Utilities and it has many more options for screenshots than the keyboard shortcuts do. The two main advantages (in my opinion) are timed screenshots and being able to change the pointer type.

You can create a timed screenshot by going to the Capture menu, or by pressing Command-Shift-Z. Using this, you can achieve screenshots that are supposedly “impossible”. One example is the login window.

To change the pointer type, go to the Preferences. See the image below for the different options.
Grab Preferences

Disable Shadow
If you use the Command-Shift-4 Space method to take a screenshot of an entire window, you will find that the shadow is in the screenshot. This was added in Leopard because without the shadow, windows don't actually have a border if they have no scrollbars. However, if you prefer no shadows, you can disable them with a Terminal command. Simply open up Terminal (located in Applications/Utilities), paste in the following line and hit return.

defaults write com.apple.screencapture disable-shadow -bool true

Afterwards you will need to log out and in again for changes to take effect. To enable shadows again, simply repeat the command but with false at the end. The two images below show a before and after shot.

ShadowNo Shadow

Change Image Format
The default image format for screenshots is png, which gives a nice, high quality picture. However you can change this if you want. As before, use the following Terminal command:

defaults write com.apple.screencapture type png

Simply replace png with your file format of choice. The available options are jpg, tiff and pdf. Changing to jpg gives a lower quality but smaller file. Some people prefer this for quick snaps, but others dislike the slightly blurry results it gives. As before, log out and in again for changes to take effect.

Advanced Screenshot Applications
If widgets are your thing, Screenshot Plus will probably be the method of choice for you. It's free, and allows you to do everything that you can achieve with keyboard shortcuts. It also allows you to view a preview image, before saving it to the desktop or importing it into Preview.

If you really want to go all out on your screenshots, you might want to consider buying an application like Snapz Pro. It allows you to do all of the things above, as well as record movies of your screen.

Finally, if you want to get screenshots of long webpages that don't fit on the screen, Paparazzi! is your solution. It gives allows you to set the size of the image, set a delay, choose the file name and choose the file format. Of course, if you want a PDF of the web page, that functionality is already built into Mac OS X.

skitch logo
UPDATE: Many people in the comments have pointed out that I forgot Skitch. After playing around with a it a bit this morning, I have to say I agree, it’s probably the best screenshot application available at the moment. For those interested, there’s a great 3 minute introduction video available.

Also, the MacTipper Blog pointed out one more thing I forgot. Using another Terminal command, you can change the default save location to somewhere other than the Desktop. The command is as follows:

defaults write com.apple.screencapture location /Full/Path/To/Folder

For full instructions, check out the MacTipper Blog.

|

Terminal Commands for Hidden Settings in Leopard

Back in March I did a tip listing 15 Terminal Commands for Hidden Mac OS X Settings. Since Leopard has been released, there are a whole load of new ones so I thought I'd do another list.

In general, these will only work with Leopard. I have slipped in a few that will work with Tiger, but you should check out the old list for commands that will definitely work.

If you don't already know, here are some quick instructions of how to use them: You'll find Terminal in the Utilities folder within the Applications folder. To carry out any of the following commands you will need to copy/paste or type in the line of text then hit enter. Most of the commands change settings that can't be done through the application or system preferences.

For the most part, applications will need restarting before changes take place. For the Dock and the Finder, it isn't obvious how to do this. The easiest way is to type a second command into the Terminal afterwards. Type "killall Dock" followed by return for all the Spaces, Stacks and Dock commands. "killall Finder" followed by return for all the Finder related ones.

Spaces

defaults write com.apple.dock workspaces-edge-delay -float 0.5
Changes the delay when dragging windows off the edge of the screen to other spaces. Default value is 0.75.

defaults write com.apple.dock workspaces-wrap-arrows -boolean NO
Disables the wrap-around when using Control-Arrow keys to changes Spaces. To enable again, repeat with YES at the end.
Spaces


Stacks
defaults write com.apple.dock persistent-others -array-add '{ "tile-data" = { "list-type" = 1; }; "tile-type" = "recents-tile"; }'
Creates a Recent Applications stack in your Dock, that you can change to display other recent items. To remove it, use the command defaults delete com.apple.dock persistent-others but be warned, this will remove all your stacks.

Recent Items Stack


defaults write com.apple.dock mouse-over-hilte-stack -boolean YES
Adds a Mouse Over gradient to items in your stacks. To disable, repeat with NO at the end.

Dock
defaults write com.apple.dock no-glass -boolean YES
Change to 2D Dock. To change back to 3D, prepeat with NO at the end.

defaults write com.apple.dock tilesize -int 256
Allows you to increase the size of the Dock past the maximum allowed by the slider in System Preferences. Don't go larger than 256. Use the slider in System Preferences to shrink the Dock down again.

defaults write com.apple.dock largesize -int 512
Allows you to increase the Dock magnification past the maximum allowed by the slider in System Preferences. Don't go larger than 512. Use the slider in System Preferences to shrink the Dock down again.


defaults write com.apple.dock enable-spring-load-actions-on-all-items -boolean YES
Makes all items in the Dock spring loaded. For example, hold a file over an application and it will open or come to the front so you can drop the file onto a specific window. Repeat with NO to reverse.

Finder
defaults write com.apple.finder FXListViewStripes -bool FALSE
Removes the stripes in list view. Repeat the command with TRUE to reverse.

/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -kill -r -domain local -domain system -domain user
Resets the "Open With" menu, clearing duplicates. The command is different from the one in Tiger.

defaults write com.apple.finder _FXShowPosixPathInTitle -bool YES
Changes the title of a window to its full path. Repeat with NO to reverse.

Window title path


Spotlight
sudo chmod 0 /System/Library/CoreServices/Spotlight.app
Disables the Spotlight icon. Type "killall Spotlight" for changes to take effect. To re-enable it, type 755 instead of 0.

Time Machine
sudo defaults write /System/Library/LaunchDaemons/com.apple.backupd-auto StartInterval -int 7200
Changes Time Machine's backup interval. Requires an administrator password. Default value is 3600 (seconds).

iCal
defaults write com.apple.iCal IncludeDebugMenu YES
Enables the Debug menu in iCal, just like the Safari one. Repeat with NO at the end to disable.

Safari
defaults write com.apple.Safari DebugConfirmTossingUnsubmittedFormText NO
Disables the warning given when closing a window with text entered into a form that you haven't submitted. To bring back the warning, repeat the command with YES.

Check out this article for more Safari 3 tips.

Menubar
Changing the menubar will require an administrator password and you will need to restart the Mac for changes to take effect.

sudo defaults write /System/Library/LaunchDaemons/com.apple.WindowServer 'EnvironmentVariables' -dict 'CI_NO_BACKGROUND_IMAGE' 1
Remove translucency in menubar, turns it white.

sudo defaults write /System/Library/LaunchDaemons/com.apple.WindowServer 'EnvironmentVariables' -dict 'CI_NO_BACKGROUND_IMAGE' 0
Removes translucency in menubar, turns it grey.

sudo defaults delete /System/Library/LaunchDaemons/com.apple.WindowServer 'EnvironmentVariables'
Reverts back to default translucent menubar.

All Applications
defaults write -g PMPrintingExpandedStateForPrint -bool TRUE
Applications use the expanded Print dialog by default. Similar to the expanded Save dialog in earlier OS versions. Repeat with FALSE to reverse.

|

Get to grips with the "Open With" menu

When you double-click a file it will open in the default application, which is fine for most situations. Often, each file format corresponds to a single application. Word documents open in Microsoft Word, MP3s open in iTunes and movies open in Quicktime Player. But there are times when you might want a file to open in a different application. For example, you might want a image to open in Photoshop rather than Preview, or a Word document in TextEdit instead of Microsoft Word. In this situation, you have a few options.

Firstly, if the application is in the Dock, you can simply drag the file onto its icon in the Dock. Alternatively you can open up the application first, and choose "Open" form the File Menu. A third method is to use the "Open With" menu. You will find this by right-clicking (Control-clicking) on the file and looking near the top of the contextual menu. Within the Open With submenu you will find every application that can open the file, as well as an "Other" option.

Open With Menu


When you use the Open With menu, it is a "this time only" thing. Next time you double-click on the file, it will open with the default application again. To change the default application, bring up the menu as before, but hold down the Option key before choosing the application. The menu should change to "Always Open With".

When you use the Always Open With menu, it is a "this file only" thing. To apply a new default application to all files of that format, you can use the Get Info window located in the File Menu. In the Open With section, set the new application and click the "Change All" button.

To reset all of your files to open with the original default application, you need to delete a certain file. Go to your user folder, and navigate into the Library folder then into the Preferences folder. Find the com.apple.LaunchServices.plist file, and drag it to the Trash. Alternatively, drag it to the Desktop if you think you might change your mind and want to put it back later.

Over time, you may find that the Open With menu gets cluttered with duplicates, older versions or applications you thought you deleted long ago. To get rid of these, you need to use Terminal. Open up Terminal (from Applications/Utilities) and paste the following line:

/System/Library/Frameworks/ApplicationServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -kill -r -domain local -domain system -domain user

Press return and your Open With menu should have been cleaned up to only include the most current applications.
|

Tips for Safari 3

Safari
The Safari 3 public beta has been out for a while now, and will be included with Leopard when it comes out. If you haven't tried it out yet, you can download it for free from the Apple site. The following tips include things that will be useful to the average user as well as some more interesting tricks for more experienced users.

Merge Windows
Safari 3 now allows you to drag and drop tabs. You can drag a tab off the bar to create a new window or drag it onto an existing window to add it. You can also use this to rearrange the order of your tabs. If you have lots of open windows each with different numbers of tabs, there is an easier way to get them all into one instead of dragging and dropping. In the Window menu you will find the "Merge All Windows" command. This will instantly combine all your open windows into one tabbed window.

Enable Web Inspector
The Web Inspector allows you to easily see how the source code creates the web page. You can inspect various elements of the web page and view their style, metrics and properties. If you select an element in the inspector window, it will briefly be outlined in red on the web page.
Web Inspector

To enable the Web Inspector, open up Terminal (located in Applications/Utilities), type the following line and press return:

defaults write com.apple.Safari WebKitDeveloperExtras -bool true

Now quit and re-open Safari. Open a web page and right-click (Control-click) anywhere. You should see a new "Inspect Element" item in the list.

Pie Chart Loader
Normally Safari indicates how far a page has loaded using the address bar as a progress bar. The box gradually fills with colour from left to right. If you want, you can easily change this to the pie chart type indicator that is used in Mail. Again, open up Terminal (in Applications/Utilities), type the following command and press return:

defaults write com.apple.Safari DebugUsePieProgressIndicator -bool true

To switch back to the old progress bar, simply repeat the above command with false instead of true.

Bookmark all tabs
This new feature obsoletes the tip I wrote last month about bookmarking all tabs in Safari 2. Doing this is now much simpler - you just need togo to the Bookmarks menu. Here you should find an item that says something like "Add bookmark for these 4 tabs...". The default settings creates a bookmark called "Saved Tabs" in the bookmarks bar. This is actually a folder of your tabs, but it has been set to automatically open all the pages in tabs when clicked.
Bookmark All Tabs

Others
There are loads of other new features in Safari 3 that are well known or don't really require any explanation. For example, the find command now dims the page and highlights the words you searched for, web history now indexes the text content of the page for easier searching, you can reopen the last closed window or the windows from your last session and all text fields are resizable.
|

5 Login Window Tips

For all of these tips you will need know the password to an administrator account. You can check whether an account is an administrator in the Accounts section of System Preferences.

1. Add a message to the login window
You can add a string of text above the list of users in the login window. To do this, start by opening up Terminal. This is located in the Utilities folder, inside the Applications folder. Once it has loaded, paste in the following line and press return:

sudo defaults write /Library/Preferences/com.apple.loginwindow LoginwindowText "Hello There"

Replace "Hello There" with your text. To remove the text, type the following line:

sudo defaults write /Library/Preferences/com.apple.loginwindow LoginwindowText ""

2. Hide accounts
If you find yourself with an overly long list of users in the login window or you just want to get rid of that annoying scroll bar down the side, you can stop accounts appearing in the login window.

Start by go to the Accounts pane in System Preferences, and find the "short name" of each user you want to hide. Once you have these, open up Terminal and enter the following:

sudo defaults write /Library/Preferences/com.apple.loginwindow HiddenUsersList -array-add shortname1 shortname2 shortname3

Replace shortname1 2 and 3 with the short names of the user accounts you wish to hide. You can hide as many as you like, just separate each with a space.

To make a hidden name appear again, type the command with no names in it, therefore resetting the list of hidden users.

sudo defaults write /Library/Preferences/com.apple.loginwindow HiddenUsersList -array-add

Notice that doing this adds an extra option to your login window - "Other..." When you select this, you will be presented with text boxes to enter a username and password.

If you aren't running OS X 10.4, this doesn't work. Another option is to replace the list of users with username and password text boxes. Go to the Accounts pane in System Preferences and click on Login Options. There you will find an option to display the login window as name and password fields. This isn't as pretty, but saves time if you have lots of users, and is also more secure.

3. Change the Apple logo
You can replace the large Apple logo that appears at the top of the login window with any tiff image that is 90x90 pixels. In the Finder, choose Go to Folder from the Go menu or press Command-Shift-G. In the dialog box that appears, type the following line:

/System/Library/CoreServices/SecurityAgent.app/Contents/Resources/

Apple Logo
A folder called Resources should appear. Here you will find an image called applelogo.tif. You will need to create a copy of this file, just in case you ever want to revert back to it. The easiest way to do this is to hold the Option key and drag it to a safe place (like your Documents folder). Now, rename you new image "applelogo.tif" and drag it to the Resources folder to replace the old file. You will be asked to type in an administrator password.

To change back to the Apple Logo, just drag the copy that you made back to the Resources folder.

4. Get useful system stats
The name of you Mac is displayed in the login window below the words "Mac OS X". Since Mac OS X 10.4.3, you can click on the name of your Mac to show different statistics about your machine. Each time you click, it will cycle through different bits of information that are particularly useful when troubleshooting problems.

The order of the statistics are as follows:

One click: Your OS X version number (e.g. Version 10.4.9)
Two clicks: Your OS X build number (e.g. Build 7M271)
Three clicks: Your mac's serial number (e.g. WN1511LHKNW)
Four clicks: Your mac's IP address (e.g. 196.254.0.1)
Five clicks: The status of any networked account
Six clicks: The date and time (e.g. Saturday, January 20 2007 4:02:31 AM GMT)
Seven clicks: Back to where you started, the name of your computer.

So you click a few times and set the information line to your favourite thing, but next time you log in, it has changed back to the name of your mac. To change the bit of information that appears first, you need to do a bit of tinkering in the Terminal (Applications/Utilities). Open Terminal and type the following command:

sudo defaults write /Library/Preferences/com.apple.loginwindow AdminHostInfo HostName

Depending on which piece of information you want displayed, replace HostName with one of the following:

SystemVersion
SystemBuild
SerialNumber
IPAddress
DSStatus
Time

After doing this, hit return, and the next time you view your login window the information you chose will be displayed. To change it back to normal, simply repeat the command with HostName at the end.

5. Change the background image
There are ways to change the background image by replacing the Aqua Blue image, but that is slightly crude. A better way to do it is using the Terminal. Type the following command and press return:

sudo defaults write /Library/Preferences/com.apple.loginwindow DesktopPicture /Users/Shared/mynewbackground.jpg

Aqua Blue
The last part, /Users/Shared/mynewbackground.jpg is the location of the image you want to use. You don't have to type it out. Just paste the command as far as DesktopPicture and put a space after it. Then find your image in the Finder, and drag it onto the Terminal window. The address to your image should just appear. As far as I can tell, you have to place the image in a place that all users have access to (the shared folder is a good place).

To change back to the normal Aqua Blue image, type the following command and press return:

sudo defaults write /Library/Preferences/com.apple.loginwindow DesktopPicture /Library/Desktop\ Pictures/Aqua\ Blue.jpg

|

Reset a Lost OS X Account Password

Over the past few weeks, lots of people have been contacting Mac OS X Tips asking how to reset a forgotten Mac OS X user account password. Depending on the circumstances, this task could take 5 minutes or could even be completely impossible. Here is a run through of the different ways you can reset an account password depending on the type of account, whether FileVault is enabled and whether you have the Mac OS X Install Disc.

If you still know the Administrator Password
If you still know the password to an administrator account, it is very simple to reset any standard or managed user's password. While logged in as the administrator, open up System Preferences and click on the Accounts section. All the accounts on the computer should be listed down the left hand side. Under each account name it should say Admin, Standard or Managed. If the lock at the bottom of the window appears locked, click on it to allow changes to the preferences.

Accounts
The next step is to select the user whose password you want to change and click on the Reset Password button. Enter the new password and click Reset Password. If you have created multiple Administrator accounts, you can use this method to reset their passwords too, as long as you know the password for the original administrator account.


Resetting an Administrator Password
Obviously, if you don't have access to an administrator account, you can't carry out any of the above steps. If you have forgotten the Administrator password or you can't log into your Mac at all, you will need to use the Mac OS X Install Disc.

Enter the Mac OS X Install Disc that is the closest version to that running on the Mac. For example, if you are running Mac OS X 10.4 Tiger, you should enter the Tiger install disk, not any earlier ones. Restart the computer, and hold the C key as it starts up. This might take longer than usual, and you can release the C key as soon as the Apple logo appears on the screen. When the window appears, choose your language and click the right arrow.
Reset Password

The next step depends on what version of Mac OS X you are using. For Tiger (10.4), choose Reset Password from the Utilities menu. For earlier versions, choose Reset Password from the Installer menu.

Choose your Hard Drive from the top and then choose the Account from the drop down menu. Be careful not to select System Administrator, as this is actually the root user, not the administrator account on your Mac. Now enter the new password, click Save, quit the Installer and restart the computer.

Note that there are a few issues with this method. Firstly, it does not reset your keychain password. You will have to do this separately. Secondly, do not attempt this if you have FileVault enabled. To reset an FileVault protected account, you need the master password.

Resetting a FIleVault Protected User's Password
If you have enabled FileVault to encrypt your Account, you need to know the master password that you set when you enabled it. This is the password that the administrator should know that allows you to reset any password on the computer. If you have forgotten the master password, unfortunately your data is lost forever.

If you know the master password, start by attempting to log into your account. When you get the password wrong three times, you will be able to click "Forgot Password". Now you will have to enter the master password and then a new login password for your account.

If you have lost the Mac OS X install Disc
If you have lost the install disc, don't try and use one from an earlier version as this might permanently block you out of your account. You really have two options: Firstly, you could buy a new copy of Mac OS X (try eBay). Secondly, there is a way of resetting an administrator password without the disc if you are running Mac OS X 10.4 Tiger. Note: Do NOT do this with a FileVault protected account, or your data will be lost forever.

First, note the short name of the account. This is the same as the name of its home folder, but not necessarily the name that appears in the login window. Restart your computer, and while it is starting up, hold Command-S. This will start up your Mac in Single User Mode. Once it has started up, you will need to enter three lines of code. Enter sh /etc/rc and press return. Then enter passwd yourusername and hit return. Now you will have to enter a new password twice. What you type won't appear on screen, but it is working. Once you have done this, type reboot and hit return.

This is the same as the Install Disc method in that it doesn't reset your Keychain password. You will have to do this separately.
|

Reduce Preview's PDF zoom after Spotlight

If you have ever used Spotlight to search for a phrase within a PDF document, you may have encountered the annoyingly high level zoom in Preview.

When you click on the PDF in the Spotlight results, it opens up in Preview with the search term highlighted throughout the document. This is pretty useful, however the PDF is actually zoomed in 280 percent. This means you can read the word you searched for pretty easily, but you can't see anything else.

Spotlight Preferences

Luckily, by changing one line in the Preview preferences, you can change the zoom level to something less extreme. The easiest way to do this is using the Terminal.

First, quit Preview if it is running and open up Terminal from the Utilities folder in the Applications folder. Type the following line and press return:
defaults write com.apple.Preview Preview -dict-add PVPDFSpotlightSelectionSize 10

The 10 at the end corresponds to a 100% zoom level. By default, this number is set to 28, or 280% zoom. If you want some zoom, but not quite as much, try a number like 15 for 150% zoom.

If you don't want to use the Terminal, or you are curious to see what the command actually does, you can open up the preference file in Property List Editor (which you will only have if you have installed the Developer Tools from the Mac OS X install Disk). Go to your user folder and navigate to Library/Preferences and open up com.apple.Preview.plist using Property List Editor.

Preview Preferences

Use the expansion Triangles to navigate to Root/Preview/PVPDFSpotlightSelectionSize. Here you can see the number is 28 (or 10 if you have already changed it in the Terminal).

|

Speed Up Dialog Boxes

In Mac OS X many dialog boxes slide out of a window's title bar and are attached to that window rather than being on their own. These dialog boxes are know as "sheets" and can be anything from Open/Save dialogs to the Customise Toolbar settings. They are attached to a certain window to show that they are associated with that particular file or application. If you can't remember seeing this before, open up a TextEdit file and choose Save As.

The sliding animation may be pretty, but it can waste a fair amount of time if you are opening and closing sheets all day. You can speed this up and make your Mac feel much snappier by using a simple Terminal command to reduce the amount of time taken to display the animation.

Sheet Animation


Launch the Terminal (located in Application/Utilities) and type the following command:
defaults write NSGlobalDomain NSWindowResizeTime 0.001

The number at the end is the length of the animation in seconds. With it set to 0.001, sheets appear pretty much instantly. The default is 0.2, so type the command with 0.2 at the end to return your sheet animation to normal.

For fun you can try higher values. This allows you to see just how detailed the animation is. Type the command with 2 at the end and load up TextEdit. Resize the window to as small as possible before selecting Save As from the File menu. You'll see the sheet jump up out of the window then gently fall into place.

|

Playing with Half Minimized Windows

One of the comments on the Terminal Commands tip pointed out something I have never heard of before. Although it is entirely useless, (a lot of the stuff on this site is) I thought it was a nice trick:

They mentioned the killall Dock thing... if you hold shift and collapse a window it goes slowly into the dock. if you do a killall Dock command in the terminal while it's collapsing, the window freezes in it's squished state, while still allowing you to scroll in it and click links (although the links will be in their original location).
SleepingInsomniac | Homepage | 03.21.07 - 4:42 am | #



This is great fun, and also a little weird. As mentioned, you will need to press Shift while clicking minimize to slow things down and give you enough time to run the command. Have Terminal open with "killall Dock" ready typed so you just have to press enter. When the Dock relaunches, your currently minimizing window gets stuck half way, but is still treated like a normal window. Drag it around, scroll up and down, browse web pages. It's not perfect however - as SleepingInsomniac notes, the links on web pages are still where they were before you minimized, making things a bit confusing.

Check out the image below to get an idea of what it looks like.
Half Minimize

To get your windows back to normal you just need to close (Command-W) and reopen them.

Thanks to SleepingInsomniac for this!
|

Top 15 Terminal Commands for Hidden Mac OS X Settings

There is a huge amount of hidden settings for Mac OS X and its applications that aren't accessible from preferences dialog boxes or the System Preferences. Applications such as Tinkertool and Mac Pilot allow you to access some of these, but the real flexibility is from the Terminal. From here it is possible to edit any preferences file for any application on your Mac.

You'll find the Terminal in the Utilities folder within the Applications folder. To carry out any of the following commands you will need to copy/paste or type in the line of text then hit enter. For the most part, applications will need restarting before changes take place. For most applications you can just quit and open them again, and for the Finder you can use the Force Quit dialog, just log out and log in again or type "killall Finder" into the terminal after the command.

Feel free to add any of your favourites in the comments.

1. defaults write com.apple.Dock showhidden -bool YES
Makes hidden applications' dock icons translucent. NO to reverse.

Translucent dock icons hidden applications


2. defaults write com.apple.iTunes invertStoreLinks -bool YES
Normally the arrows next to artists and albums in your iTunes library search the iTunes store when you click them. This command changes them so that clicking will search your iTunes library instead. Put NO at the end to reverse.


3. defaults write com.apple.dashboard devmode YES
This allows you to drag widgets out of Dashboard onto the desktop. Requires the dock to be relaunched to take effect, so type "killall Dock" and press enter. Now, if you click and hold onto a widget in the dashboard and press F12 to return to the desktop, the widget won't disappear with the rest. Put NO at the end to reverse.

Dashboard Widget on Desktop


4. defaults write com.apple.mail PreferPlainText -bool TRUE
Forces all mail to be displayed as plain text. Replace TRUE with FALSE to reverse.

5. defaults write -g NSNavPanelExpandedStateForSaveMode -bool TRUE
Sets expanded save dialogs as default (showing column/list view of folders rather than a drop down menu). Replace TRUE with FALSE to reverse.

6. /System/Library/Frameworks/ScreenSaver.framework/Resources/ ScreenSaverEngine.app/Contents/MacOS/ScreenSaverEngine -background
Displays the currently chosen screen saver to be shown as the desktop background. Press Control-C or Command-. to stop. More details here.

7. defaults write /Library/Preferences/com.apple.loginwindow AdminHostInfo SystemVersion
Displays useful system stats in the login window. More details here. Replace "SystemVersion" with one of the following for different stats:
SystemBuild
SerialNumber
IPAddress
DSStatus
Time
HostName

8. sudo defaults write /Library/Preferences/com.apple.loginwindow HiddenUsersList -array-add shortname1 shortname2 shortname3
To remove accounts from the login window type this command with the short name of each account you wish to remove. More details here.

9. com.apple.frameworks.diskimages skip-verify TRUE
Skip disk image verification. Potentially risky, use with disk images from trusted sources. Replace TRUE with FALSE to reverse.

10. defaults write "Apple Global Domain" AppleScrollBarVariant DoubleBothPuts double scroll arrows at both ends of scroll bar. Use Appearance pane in system preferences to reset.

Horizontal Scroll-bar


11. defaults write com.apple.CrashReporter DialogType none
Disables the unexpectedly quit dialog that normally appears when an application crashes. Replace "none" with "prompt" to enable again.


12. defaults write com.apple.Safari WebKitHistoryItemLimit 2000 and/or
defaults write com.apple.Safari WebKitHistoryAgeInDaysLimit 30
Sets the history limit in Safari to a certain number of items and and/or a certain age.

13. defaults write com.apple.finder AppleShowAllFiles TRUE
Shows hidden files in the finder. Replace TRUE with FALSE to hide hidden files again

14. defaults write com.apple.safari IncludeDebugMenu 1
Enables the debug menu in Safari. Type again but with 0 instead of 1 at the end to disable.

15. defaults write com.apple.dashboard mcx-disabled -boolean YES
Deactivates Dashboard. Requires the dock to be relaunched to take effect, so type "killall Dock" and press enter. Replace YES with NO to enable again.


Picture 2A business software can be easily run on a mac operating system. You can avail a proper distance learning through the use of ip phones. Getting yourself enrolled in certifications like 220-601, will help you gain extra knowledge. You will be aware of the usefulness of a backup of your system. It's time you started thinking on the numbers 646-002.

|

Customising the Terminal

This tip is quite a geeky one, but nothing in it is too tricky at all. It has no real serious purpose, but it will make your Terminal windows look pretty and help you get familiar with Terminal's settings if you aren't already.

Terminal Inspector
Many Terminal users will already know how to change the colour and transparency of Terminal windows. The most basic method is to choose the Terminal menu, select Window Settings (or press Command-I). This brings up the Terminal Inspector. Choose color from the drop down menu, and you will be presented with all the customisation options.

There are some predefined colour schemes, such as the popular green on black, or you can make your own. It is also possible to set an image as the background, and choose the transparency of the window.

It is also possible to create colour schemes using different methods, such as the one outlined in this Macworld Article.

To set a colour scheme as the default, click the button at the bottom of the Terminal Inspector.

But what if you want multiple colour schemes, or you want to send one to someone else? Luckily you can save these settings simply by saving the terminal window.

Choose all your colours and settings as above, then click the File menu and choose Save As. Navigate to Library/Application Support/Terminal. If you don't have a Terminal folder in Application Support, create one. Save the file here with a name like "colour-scheme1.term".

Now, a Terminal window with the saved settings can be opened by choosing File --> Library --> colour-scheme1. To save one of these files as the default, go to the Terminal preferences and select "Open a saved .term file when Terminal starts" then select your chosen file.

Terminal Preferences

Here are a few ready made colour schemes for you to download.

Terminal Colour Schemes


As an extra quirk, you can make Terminal choose a random colour scheme using a handy applescript created by Daniel Jalkut. It can create some pretty horrible combinations, but it does contain and algorithm to make sure the contrast of the text on the background is high enough.

|

Google Notifier's Hidden Features

If you are using Gmail and choose not to receive your email in mail.app using POP, chances are you are using the free Google Notifier (formerly Gmail Notifier). This is a menu bar item that alerts you when new mail arrives and in its latest version, adds Google Calendar functionality.

Google Notifier Menu Bar

One of the greatest benefits of this piece of software is its simplicity - just put in your Google ID and password and everything works. At times this makes the notifier look somewhat limited, however this couldn't be further from the truth.

The first hidden feature is to customise the number of messages shown in the notifier menu. By default, the menu shows the last four unread messages received (or the last three received and an additional "View More" submenu). To change this, pull down the notifier menu and hold Command and Option while clicking on preferences. This brings up a hidden settings editor where you can easily edit the notifier preferences file.


In the "Key" field, enter "MaxMessagesOnMainMenu" and in the "Value" field enter the number of messages you want on the main menu. Click Set, and then quit and reload Google Notifier. Now when you click on the notifier menu bar item, you will see the number of messages that you set. To return to the default setting, repeat the prcoess, putting 4 in the value field instead of the number you entered last time.

Picture 4

The second trick can be done in much the same way. If you only want the notifier to fetch mail with a certain label, you can create a filter. As before, click on the notifier menu and Command-Option-Click on preferences. This time, in the key field enter "Label" and in the value field enter the name of the label you want to receive. To receive all mail, leave this field blank. And again as before, quit and reload the notifier for changes to take effect.

When you set these preferences, you are actually editing Google Notifier's preference file (Library/Preferences/com.google.GmailNotifier). If you want, you can load up this file with Property List Editor or TextEdit and changes things yourself (be careful!) or you can achieve the same effect using the Terminal (Applications/Utilities). For example the previous trick could be done by typing the following into the Terminal:
defaults write com.google.GmailNotifier Label -string "YOURLABELHERE"

Finally you can extend Google notifier using plugins. I found the following on the Official Google Blog:

The Gmail Notifier supports plugins written in AppleScript, or full-blown Cocoa Bundles in Objective-C. Details about the Objective-C plugin API can be found inside the Gmail Notifier application bundle in the required header file, GGPluginProtocol.h (control+click Gmail Notifier.app -> Show Package Contents -> Contents -> Headers).

AppleScript plugins are written by simply implementing a handler like:

on NewMessagesReceived(messages, fullCount)
-- Your code goes here...
end NewMessagesReceived

To install, simply copy the script (plugin) to Library/Application Support/Gmail Notifier (create the directory if it doesn't exist), and restart the Gmail Notifier. An example of a great plugin for the Gmail Notifier for MacOS X is the Gmail+Growl plugin, which sends Growl notifications when new mail arrives.

|

Get useful system stats in the Mac OS X login window

When you start up your mac and the login window pops up, you have a big shiny apple logo and the words Mac OS X. Below these words you usually see the name of your mac, whatever that may be. For most people that isn't very useful, as you have to have a lot of the same models knocking around to get confused between computers, and luckily since Mac OS X 10.4.3, this line has been made much more informative.

Since this version, you can click on the name of your mac to show different statistics about your machine. Each time you click, it will cycle through different bits of information that are particularly useful when troubleshooting problems.

The order of the statistics are as follows:

One click: Your OS X version number (e.g. Version 10.4.7)
Two clicks: Your OS X build number (e.g. Build 7M271)
Three clicks: Your mac's serial number (e.g. WN1511LHKNW)
Four clicks: Your mac's IP address (e.g. 196.254.0.1)
Five clicks: The status of any networked account
Six clicks: The date and time (e.g. Saturday, January 20 2007 4:02:31 AM GMT)
Seven clicks: Back to where you started, the name of your computer.

So you click a few times and set the information line to your favourite thing, but next time you log in, it has changed back to the name of your mac. To change the bit of information that appears first, you need to do a bit of tinkering in the Terminal (Applications/Utilities). Open Terminal and type the following command:

defaults write /Library/Preferences/com.apple.loginwindow AdminHostInfo info_name

Depending on which piece of information you want displayed, replace info_name with one of the following:

SystemVersion
SystemBuild
SerialNumber
IPAddress
DSStatus
Time

After doing this, hit return, and the next time you view your login window the information you chose will be displayed.
|

Hide Accounts in the Login Window

In OS X it is easy to create as many user accounts as you need. It's definitely useful being able to have an account for each family member, or an account just for troubleshooting. However, this also leads to an extremely long list on the login window, and an annoying scroll bar down the side.

If you are running Tiger, hiding user accounts that you rarely use is simple. Firstly, go to the Accounts pane in System Preferences, and find the "short name" of each user you want to hide. Once you have these, open up Terminal (Applications/Utilities) and enter the following:
sudo defaults write /Library/Preferences/com.apple.loginwindow HiddenUsersList -array-add shortname1 shortname2 shortname3

Obviously shortname1 2 and 3 will be replaced with the short names of the user accounts you wish to hide. You can hide as many as you like, just separate each with a space.

To make a hidden name appear again, type the command with no names in it, therefore resetting the list of hidden users.
sudo defaults write /Library/Preferences/com.apple.loginwindow HiddenUsersList -array-add

Notice that doing this adds an extra option to your login window - "Other..." When you select this, you will be presented with text boxes to enter a username and password.

If you aren't running OS X 10.4, another option is to completely get rid of this list of users. Go to the Accounts pane in System Preferences, and click on Login Options. There you will find an option to display the login window as name and password fields. This isn't as pretty, but saves time if you have lots of users, and is also more secure.
|

Set a Screen Saver as the Desktop Background

Here's a quick fun tip that I found over at macresearch.org.
  • Make sure you have a cool screen saver set (macresearch suggests the RSS visualizer)
  • Open Terminal (found in Applications/Utilities)
  • Type the following:
    /System/Library/Frameworks/ScreenSaver.framework/Resources/
    ScreenSaverEngine.app/Contents/MacOS/ScreenSaverEngine -background
  • Look at your Desktop.
  • To stop the whole thing and return your desktop to normal press Control-C (or Command-.)


There are a few things to look out for with this: Depending on which screen saver you are running and what mac you are running it on, this make take up a large CPU load. Also, your normal background will be shown when pressing F9 or F10 to activate exposé. Finally, if your screen saver starts (from a hot corner or by inactivity for a certain time) it will cancel the screen saver on your desktop.
|

Hidden Unix Games

These hidden files are accessable from any unix based operating system, including linux and Mac OS X. To see a list of what there is to offer type -

ls /usr/share/emacs/21.2/lisp/play
into a terminal window (terminal is located in Applications/Utilities)

To play the games, open a new terminal window and type “emacs” and hit return. Once in emacs, press Esc then x to get to the prompt. Now you can type any of the files in the list to play them.

My favourites are:
snake, tetris and pong, the old classics.
doctor, a shrink in your mac (he/she isnt that helpful, unless you threaten to commit suicide)
life, one of the first screen savers.
dunnet, an old text based game where you can explore
zone, makes the text on your screen go crazy

Have fun!
|