launchd in 10.5 introduces a couple of new flags to the launchd config plists, specifically KeepAlive (bool or dict) and SuccessfulExit (bool, as child of KeepAlive dict). Using these flags, you can tell launchd to launch an application and automatically restart it if it crashes, but NOT if it exits cleanly. This previous hint showed a somewhat different approach to accomplish the same thing.
Using my company's flight management software as an example, you would end up with the following LaunchAgent .plist file, which I put in my home Library/LaunchAgents folder:
I made the inital file using Lingon, and then edited it using Propertylist editor to add the KeepAlive dict/SuccessfulExit key set. The program arguments string needs to be the path to the actual executable inside the app bundle, not just to the .app (assuming it is a bundle app) as shown.
After installing Leopard, my iMac would no longer auto sleep. It worked flawlessly in Tiger. I searched google and found many others having similar problems. I found many different fixes, such as removing the PowerManagement plist file, unplugging all devices, and not running certain widgets or programs. However, no matter what I did, it would not auto sleep. It would stay asleep if I manually put it to sleep.
I called Apple and was on the phone with them for about two hours before they said it is probably a hardware problem, thanks for calling. After all that hassle, I decided to see if AppleScript could put it to sleep, and it did. Once I found that out, I just wrote a python program that keeps track of how long the screen saver is running. Using that, it determines if the system has been unused for the period the user set in system preferences for machine sleep.
I put this in cron to run once a minute and it has been working very reliably. Note: I didn't make it robust enough to find the screensaver preferences file. I hard-coded it to mine, so if anyone wants to try it, you would need to update the numbers at the end of the saverFile value.
As of version 10.5.1, you may be able to connect to an SMB network drive, but you may not be able to browse the contents of any shared folders on the drive. Here's how you can force Finder to display the folder contents.
Connect to your network drive using the normal methods -- either Command-K or the Connect to Server option on the Go Menu. Once Finder has connected to the drive, open Terminal and type the following command:
sudo smbclient -L NETWORK_DRIVE_NAME
Replace NETWORK_DRIVE_NAME with the Windows name for your network drive. Next restart the Finder by typing sudo killall Finder. Wait for Finder to restart -- this should only take a moment -- and then run the above command again.
Open a Finder window, and click the name/IP address of your network drive. You should now be able to browse the contents of your drive.
[robg adds: I can't confirm either the problem or the solution.]
If you have the Print dialog already open in some Apple applications (e.g. Safari, Mail, TextEdit), pressing Command-P will open Print and Fax preferences in System Preferences.
It seems to work inconsistently among Apple's programs. For example, it works in Safari and Mail, but in iCal, you have to hit Continue and then cancel the print dialog for the System Preferences to appear. In Preview, it seems that doing Command-P when the print dialog is already open sends the current document to the printer. So this behavior is inconsistent among Apple apps, and doesn't work in the non-Apple apps I've tried (Word, etc.).
Grab a window's title bar and then use Command-Tab to switch to an application which you know resides in another space -- hey presto! The clicked window is transported to the new space for you as soon as you release Command-Tab.
If, like me, you keep Safari in one space and iTunes in another, this is handy for when you're watching a movie in iTunes and want to watch while surfing. Just grab the movie window and switch to Safari and you're done. It just works, as I expected it would when I had the idea to try. The grabbed window even retains focus, so it's just a more intuitive way to switch spaces without having to reach all the way across the keyboard to hit Control and the arrow keys or numbers.
Spaces can be very useful, but there are some behaviours that can irritate or confuse. For example, if you switch to an application that has inactive windows in another space, you are taken to the space with an inactive window. This is usually helpful, but in some cases, especially if you use multiple spaces with one or two dev apps running in each, and need to go to the web via Safari to look something up, or open a Finder window to browse the local filesystem, it is not exactly what you want.
Fortunately, these two apps have New Window commands in their Dock menus. So, if you are in a space with Coda and a separate Terminal window or two, and need to open a Finder or Safari window but don't want to move spaces, simply choose the New Window command from the Dock menu of the appropriate app, and a new active window opens in the current space.
It's possible other apps have this command also (for example, TextMate does, but it opens the new window as inactive in the current space), so check out the Dock menus of your apps and see if this can help you enjoy Spaces even more.
I hate how stacks only allow you to drag one file at a time out of them, so I decided to combine some earlier hints into a solution. By combining the overlay icons discussed here with this AppleScript, I've created an overlay icon for the Downloads folder [84KB download] that actually performs a helpful function: it empties the stack if you select it!
To add the ability to sort by date modified as well as by name, open Terminal, cd to the correct folder and then, assuming you haven't changed the name of the AppleScript, just type this:
touch -mt 202001010101.01 " Downloads .app"
[robg adds: I haven't tested this one -- note that this is different than this hint, which uses an Automator action to clear a stack. (The comments to that hint explain how to use the Automator action to similar effect as shown here.)]
When viewing an Open or Save dialog in column view mode, try a control-click on the column separator at the bottom of a column to get the choices of Right Size this Column, Right Size All Columns Individually, or Right Size All Columns Equally. Each does what you would expect.
[robg adds: Very oddly, you won't find this contextual menu in the Finder, only in the Open/Save dialogs.]
I've been frustrated with Apple's treatment of text clippings; they seem neglected. For example, you can't select and copy the text when you view them in Finder. And with the release of 10.5, I was dismayed to see that Quick Look could not view text clippings either.
However, I stumbled across a plug-in for doing just that! All the credit goes to the original developer. It also supports picture clippings, though I haven't tested that.
[robg adds: A short history of copying from text clippings: Until 10.3, you couldn't do this at all. When 10.3 came out, you could copy from clippings -- but only the entire clipping. In 10.4, you could actually select some text from a clipping and copy it, even though you couldn't see exactly what was selected on-screen. In 10.5, though, we're back to the 10.3 behavior: Command-C will only copy the entire clipping, even if you first make an invisible selection.]
I've been having some problems getting Time Machine to work properly, and I've grown tired of opening the Time Machine System Preferences pane just to see if Time Machine executed when it was supposed to. Using GeekTool -- which runs well on Leopard -- I'm now able to get a regular status report effortlessly, which has eased my mind considerably since I now know Time Machine is working properly.
Create a new shell entry in GeekTool, and enter the following command: