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:
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}'
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.]
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.]
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.
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.]
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.]
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.
[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.]
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.]
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.]
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.
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.]
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.]