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

Adding and removing individual login items from Terminal System
As shown in this hint, there is a way to use the defaults command-line tool to add items to the Login Items list of the Accounts or Users & Groups System Preference panel:
defaults write loginwindow AutoLaunchedApplicationDictionary -array-add '{ "Path" = "/path/to/itemname"; "Hide" = 0; }'
Unfortunately, Apple provides no easy way to use defaults to remove a given login item from the list. While you can remove all login items by deleting AutoLaunchedApplicationDictionary, that's usually not what you want to do.

Luckily, there's another way to do it that does allow removal of individual items as well as other things.

A nice work-around solution is to instead use the osascript command-line tool to do it with simple AppleScript commands:

Add an item:
osascript -e 'tell application "System Events" to make login item at end with properties {path:"/path/to/itemname", hidden:false}' 
Remove an item:
osascript -e 'tell application "System Events" to delete login item "itemname"' 
List all items:
osascript -e 'tell application "System Events" to get the name of every login item'
Enjoy!

[crarko adds: Note that the easiest way to get the path to the login item 'itemname' may be to open System Preferences » Accounts, click the 'Login Items' tab and then right-click (Ctrl+click) the name of the item. This displays a 'Reveal in Finder' submenu and you can determine the path from that.]
  Post a comment  •  Comments (4)  
  • Currently 3.00 / 5
  You rated: 1 / 5 (4 votes cast)
 
[10,821 views] Email Article To a Friend View Printable Version
A better List View in Stacks System
Enabling 'new list view' in Dock stacks allows you to manipulate the icons in a stack that is displayed in List View.

When viewing a Stack in Fan or Grid modes, you can manipulate the icons via drag-and-drop and invoke Quick Look by typing a space while hovering over the icon. However, these actions are not supported in the standard List View.

OS X 10.7 (and possibly earlier versions) supports a 'new list view' in which icons can be manipulated in the same ways as in the fan and grid views. It can be enabled via the Terminal command:

defaults write com.apple.dock use-new-list-stack -bool YES && killall Dock

Also, when the New List View is in effect, icons sizes can be changed with the Command+Plus and Command+Minus key combinations.

To return to the default list view use:

defaults write com.apple.dock use-new-list-stack -bool NO && killall Dock

[crarko adds: This worked for me in 10.6.8 as well.]
  Post a comment  •  Comments (8)  
  • Currently 3.67 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (6 votes cast)
 
[5,934 views] Email Article To a Friend View Printable Version
Use the new iBooks fonts System
When Apple updated its iBooks e-book application to 1.5, they included some nice new fonts: Ahtelas, Charter, Iowan, and Servavek. With a little work, you can extract these from the application and use them on your Mac.
  • If you haven't already, download the free iBooks app from the App Store.
  • Locate the application in the Finder. (Select iBooks in iTunes and choose 'Show in Finder' from the File-menu. It will be named 'iBooks 1.5.ipa').
  • Make a copy of the file.
  • Change the file-extension of the copy from .ipa to .zip.
  • Extract the resulting zip-file by double-clicking on it. You will get a folder named iBooks 1.5.
  • In this folder open the Payload folder to find the app 'iBooks.'
  • Right or control-click on the application to show the contextual menu and choose 'Show Package Content.'
  • A folder will open with the font files in it. (The easiest way to locate them is to search the folder on .ttf.).
There are 16 font files in total; four for each font. Install them as you would do any font.

[crarko adds: Works as described. As always with fonts, be aware of copyright restrictions when making use of them.]
  Post a comment  •  Comments (12)  
  • Currently 5.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (3 votes cast)
 
[7,252 views] Email Article To a Friend View Printable Version
Making Finder BeachBalls go away without rebooting System
Sometimes the Finder on my WiFi connected Mac will go into beachball mode because another computer on the home network is to old to respond to Airport's 'wake up' messages.

When a connectivity issue like that happens, the Finder is supposed to alert you with a 'Connections interrupted' dialog that gives you the opportunity to disconnect. However, it's a small dialog, and sometimes goes away by itself when perhaps it shouldn't.

If I miss the dialog, or click ignore, and leave that unavailable server on my desktop, any application that does a sloppy job of asking for information on mounted partitions can cause the Finder to hang.

That leaves Finder menu items such as 'Restart' or 'System Preferences' unavailable. The Apple Menu's 'Force Quit' keyboard shortcut still works, but often the unresponsive Finder will simply quit and never restart.

Fortunately, the Wi-Fi Menu on the right side of the Menu bar still works. You turn this on using the Network System Preferences pane.

Turns out that using that to turn off Wi-Fi, then waiting for a bit, and turning Wi-Fi back on clears the Finder's beachball, removes the old Mac from network visibility, and pretty much returns all functionality to normal.

There are lots of ways besides having an old Mac hooked to a network that could cause parts of a home network to become unresponsive. Toggling the Wi-Fi network connection can probably fix a lot of the problems they cause too.

If you want to see what happens to Lion's Finder when Wi-Fi becomes unresponsive, try turning off Wi-Fi from the Menu. As you try to use Apps normally, sooner, rather than later, you'll end up with a whirling beachball in the Finder, your Apps, etc.

[crarko adds: A lot of Finder related hangs are certainly due to Network errors that don't timeout in a reasonable period, based on my experience. Not all of them are, though, so this isn't a cure for all cases of the Beachball of Death, but it will handle a number of them. Note that in some cases the SystemUIServer (which handles menu extras like the Airport menu) will also hang, preventing access to the menu item. Then you're pretty much stuck with a hard reboot.]
  Post a comment  •  Comments (9)  
  • Currently 3.80 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (5 votes cast)
 
[6,773 views] Email Article To a Friend View Printable Version
Quick Look using the arrow keys in full-screen mode System
I wanted to browse through my pictures with Quick Look using the arrow keys in full-screen mode, just like when viewing pictures/movies in a window.

You may have noticed that when you make a Quick Look image full-screen and then try to use up/down arrow keys to go through your pictures it doesn't work.

Here's how to get it working:

Instead of using Quick Look on a picture in a folder of images, use Quick Look on the actual folder (i.e. highlight the folder in Finder and press space).

Now switch to full-screen mode (either by menu zoom or pressing Cmd+Option+Y). You then need to open the folder. Like opening anything else in Quick Look this is the shortcut Cmd+down arrow.

Now press the right arrow key, and you'll see the first picture in the folder.

Up and down arrows will now work and let you move through your pictures full-screen.

[crarko adds: This works, but I found to be a little touchy in the step where you open the folder by pressing Cmd+down arrow. Sometimes the Mac just drops out of full-screen mode, and other times it works as described in the hint. Note: comments indicate this also works in Snow Leopard.]
  Post a comment  •  Comments (6)  
  • Currently 4.33 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (6 votes cast)
 
[5,659 views] Email Article To a Friend View Printable Version
Change screen resolution on the command line System
At work, we run lots of tests for our product. We also reboot the headless minis after each reboot and want to with certainty that they are using the correct resolution. Our configuration management tool works best with command line applications. After searching around, I discovered that there isn't an application that could change resolution from the command line that was a native Intel binary.

I did find source to change resolutions, but it completely lacked any error checking and used APIs which were deprecated in 10.6 and absent in 10.7. I ended up writing a program that works on 10.6 and 10.7, has error checking, is released as a universal binary and is GPL code on github in hopes that others can use and help improve it.

Here is the download link for the installer package, and the source is available here.

Here's what it looks like when run:
$ screenresolution get
Display 0: 1280x800x32
$ screenresolution list
Available Modes on Display 0
  1280x800x8 	1280x800x16 	1280x800x32 	1280x800x30 
  1152x720x8 	1152x720x16 	1152x720x32 	1152x720x30 
  1024x768x8 	1024x768x16 	1024x768x32 	1024x768x30 
  1024x768x8 	1024x768x16 	1024x768x32 	1024x768x30 
  1024x640x8 	1024x640x16 	1024x640x32 	1024x640x30 
  800x600x8 	800x600x16 	800x600x32 	800x600x30 
  800x600x8 	800x600x16 	800x600x32 	800x600x30 
  800x500x8 	800x500x16 	800x500x32 	800x500x30 
  640x480x8 	640x480x16 	640x480x32 	640x480x30 
  640x480x8 	640x480x16 	640x480x32 	640x480x30 
  720x480x8 	720x480x16 	720x480x32 	720x480x30 
  720x480x8 	720x480x16 	720x480x32 	720x480x30 

$ screenresolution set 1280x800x32
Setting mode on display 0 to 1280x800x32

[crarko adds: I tested this using the installer package (in 10.7.2), and it works as illustrated above. The command is installed in /usr/local/bin by default, and required no additional fiddling to make it work. You can also build this from the available source code if you have Xcode installed.]
  Post a comment  •  Comments (8)  
  • Currently 3.86 / 5
  You rated: 2 / 5 (7 votes cast)
 
[10,596 views] Email Article To a Friend View Printable Version
If Spotlight does not find a file or a file's contents System
Sometimes Spotlight does not find a file or a file's contents when searching and re-indexing does not help with it.

The culprit was a wrong permission on the file, which was generated when saving it from one Mac to another via Go » Connect to Server. When trying to move such a file from one folder to another on the destination Mac, it always asked for the Administrator password.

It turned out that such file had permissions as 'Nobody Read and Write.' Adding the Administrator as Read and Write did not help to find it with Spotlight.

The workaround is to create a new folder, drag and drop the files or folders containing files that are not found by Spotlight, select this new folder, do File » Get Info and check Apply to enclosing items to change the permissions.

Like magic, a second later Spotlight finds such files and their contents.

What I do not know is if there is a way to automatically find and repair the permissions of such files, other than doing it manually on a one-by-one basis, or for the whole user account home folder.

[crarko adds: I can't say I've seen this particular one before, but it does seems logical that Spotlight wouldn't index a file that has no read permissions. The other question to ask is how the permissions got whacked in the first place.]
  Post a comment  •  Comments (10)  
  • Currently 3.67 / 5
  You rated: 5 / 5 (3 votes cast)
 
[15,595 views] Email Article To a Friend View Printable Version
If MobileMe suddenly stops working on the Mac System
I have 2 iMacs and an iPhone all in sync via MobileMe. Out of the blue, one of the iMacs refused to sync. It let me sign in via Preferences » MobileMe; but the Mac was no longer registered and nothing would permit me to re-register the Mac.

All of the other devices were working fine.

Here's how I got it to work again:
  • First sign out from the affected Mac.
  • Then go into Keychain Access. In the list of Keys, seek out a Key called MobileMe Password which has the Cloud icon beside it. It's probably in the Login keychain. Right Click (Ctrl+Click) on this and delete it.
  • Now sign in to MobileMe via Preferences and all will be well. Click on Account and then Advanced and Register your Mac.
  • When you've done that, select items to Sync and when prompted choose Merge -- this is vital to preserve what's on your Mac.

[crarko adds: This sounds like a damaged Keychain, or something getting scrambled with the encryption. I've typically see this with Wi-Fi keys or email passwords getting messed up in the Keychain, and the solution was the same.]
  Post a comment  •  Comments (3)  
  • Currently 5.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (1 vote cast)
 
[4,360 views] Email Article To a Friend View Printable Version
Boot to Windows partition quickly System
I wanted a quick way to boot once to Windows. Typically I reboot and hold the Option key to select an alternate startup disk. I've decided that I will upgrade the video card on my Mac Pro to an ATI 6870. Since there is currently no way to flash the card to EFI I will not be able to see the boot drive options when I boot holding down Option.

And I don't want to change the boot drive every time I want to boot to Windows. When I'm done with Windows I like to just reboot and leave knowing the rest will just happen.

I came up with this little script:
#! /bin/bash
diskutil list > /tmp/connecteddrives.txt
INPUT=/tmp/connecteddrives.txt
driveid1=$(grep Microsoft "${INPUT}" | awk '{print $8}')
echo $driveid1
sudo /usr/sbin/bless --device /dev/$driveid1 --setBoot --legacy --nextonly
rm /tmp/connecteddrives.txt
exit 0
You may need to change the awk '{print $8}' command if you have spaces in your Boot Camp volume name.

To find out if it will work simply type this into terminal:

diskutil list|grep Microsoft|awk '{print $8}'

If you get something along the lines of disk#s# it works. If not change the number 8 up or down by one till you find it. Then modify the script accordingly, make it executable and enjoy.

[crarko adds: I don't use Boot Camp, so I haven't tested this one.]
  Post a comment  •  Comments (14)  
  • Currently 3.50 / 5
  You rated: 4 / 5 (6 votes cast)
 
[6,819 views] Email Article To a Friend View Printable Version
Dashboard Doesn't Lock (Feature or Security Issue?) System
I have three external monitors hooked up to my MacBook Pro. One is connected via the Mini DisplayPort, and two are connected via the USB port using a Kensington USB to Display adapter.

When the OSX Dashboard is open, it opens on all three monitors. My computer is set to sleep after 10 minutes of inactivity, and a password is required to log back in.

I noticed that when the login box appears on the main monitor, the second and third monitor still show the OSX Dashboard! I can interact with the Dashboard (move/close widgets) even though my computer should be locked.

I was under the impression that when the computer is in the locked state, you would need a password to access any information or make any changes. For some reason, the Dashboard (on the second and third monitor) remains accessible even though the computer is 'locked.'

This would seem to be a security issue. However, it could be classified as a feature as it could be helpful to be able to leave the Dashboard up on an external monitor and allow people to use it without having to log in.

[crarko adds: I don't have a setup approximating this to test with. I would surmise that this is connected to the drivers for the USB Display Adapter, and that Kensington, Apple, or an intrepid 3rd-party developer could write a driver that would change this behavior. If someone else with this setup could confirm the behavior is repeatable, please post in the comments.]
  Post a comment  •  Comments (6)  
  • Currently 2.50 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (2 votes cast)
 
[3,745 views] Email Article To a Friend View Printable Version