With FileVault turned on and logged in as that user, Spotlight would not find all file matches in my search. I have two computers that hold sensitive medical information, so FileVault is a necessity if I want to use Macs.
Symptom: Files located in the Documents folder, or any other standard folder that should be getting indexed by Spotlight, are not found in a typical search. It doesn't seem to matter if you search for exact file names or for text inside the documents. I found the error with Word files, but upon further research, it also affected PDFs and GIF files, and probably others.
It seems to occur for files that were created prior to activating FileVault. Modifying files in some way will fix that particular file and allow Spotlight to index and find it. However, doing that to all your files may not make sense. In this case, you should reindex just your FileVault Home folder. Do not reindex the entire drive because this will not fix the error.
I reindexed my FileVault home folder by dragging the Home folder icon into the Privacy box of the Privacy tab of the Spotlight System Preferences panel. Once it shows up in the Privacy box, select it and hit the minus button to remove it. This will trigger the reindexing; once it finishes, Spotlight should have indexed all your files properly and return proper search results. This was tested on a Tiger and Leopard system suffering from the same error and it worked in both cases.
[robg adds: I don't use FileVault, but would be interested in knowing if others have seen this issue as well -- please comment.]
Somehow my FileVault image became corrupted, and I could not login. The following steps helped me get things working again.
First, login as the root user -- you'll need to enable root (Pre-10.5, 10.5). On your hard drive, find this file: /Users » username » username.sparseimage; it might instead be found in /Users » .username %raquo; .username.sparseimage, where username is the short username of the user with the corrupted image.
Make a copy of this fiel for back up purposes, in case something goes wrong. Of course you can try to mount it, repair permissions, etc., but I was not able to do this.
Next, reboot your machine from the DiskWarrior CD. In the DiskWarrior window (in the pop-up list), you should find the user's FileVault image; choose Rebuild on that image. After diagnostics, you should look at report. In my case, it saw all of the folder structure, but no files inside the folders. So I rebooted again, logged in as root, and then ran DataRescue II.
I switched to Expert mode and enabled 'Show Virtual (.dmg files) devices,' then selected my user.sparseimage file. I ran 'ThoroughScan' (Quick Scan gave no results). After quite some time (it takes about three to five minutes per GB), I saw a report showing many found files. I was extremely happy to see all my files (.doc, .xls, pictures, movies, etc). From the list, select files you need then choose Recover, and voila!
As the Data Rescue II is a bit costly, all things (except recovery) can be performed with a demo copy. If you are satisfied with the results in the report, you can then decide to purchase the program.
One more thing: DiskWarrior 4 is not fully compatible with Leopard. If you don't have a DiskWarrior boot disk, run all above steps on a Tiger system (with a copy of the sparseimage). Hope this helps someone!
[robg adds: We also have this older hint with some different things to try.]
I have found that having an installer DVD with me at all times can be very useful. I don't like to actually carry the DVD with me, so I made a 10GB partition on my boot disk (MacBook Pro). I restored the Leopard DVD to this partition. Now all I have to do to boot from the 'Install DVD' is to use the Option key when I boot.
That's not the tip, however; this is. I may want to launch an application other than the ones found in the Utilities menu. Since Terminal is there, I tried to use Terminal to launch (using the open command) other applications. open, however, is not on the Install DVD, but it will still work if used from another partition. For example (assuming system is my regular boot volume):
But what if the regular boot partition is shot? The answer is to copy the open command from the regular boot partition to the installer partition:
cp /usr/bin/open /Volumes/installer/usr/bin/.
Now I can use the open command from Terminal when booted from the installer partition. When DiskWarrior comes out, and the other commercial disk repair tools, I will copy them into /Volumes/installer/Applications, and be able to launch them when booted from the installer partition. Note that this may work in Tiger, but I haven't tried.
The new Mosaic feature screen saver in 10.5 is amazing, and I wanted to have a screen capture of it. Of course, when you try to screen capture, it exits the screen saver. The way around this is to press Command-Shift first, then hit the Test button in the Screen Saver panel of the Destkop & Screen Saver System Preferences panel.
Then wait for the shot you want (still holding Command and Shift), then press 3. For some reason, this doesn't end the screen saver until you let go of Command-Shift, so you can press 3 as many times as you want.
Logitech's drivers have been implicated in failures to install Leopard, and certainly as a result of reading about those issues, I have no intention of installing them again on my Leopard systems. (I did a clean install, so the blue screen problem didn't actually hit me.)
However, I can't type on the standard (latest) Apple desktop keyboards, and much prefer my Unicomp buckling-springs one. But Apple's keyboard layouts don't actually match PC keyboards very well. So although I do *have* a Logitech mouse, I was only installing the drivers in order to get at the Logitech keyboard layouts.
You see, the Logitech keyboard and mouse drivers are only necessary to drive the special function keys that festoon Logitech equipment; but just to get the normal typing keys mapped correctly, you only need the basic layouts. It turns out you can just install those keyboard layouts, and quite easily.
If you're comfortable in Terminal, this single command will do everything you need to do in one shot (assuming you've downloaded the drivers):
For the command-line averse, keep reading for a much longer way of doing it through the Finder -- but one that doesn't require Terminal at all. By the way, this hint will work just fine on earlier versions of Mac OS X; it's just that on Leopard it's necessary to avoid installing the Logitech software; at least until Logitech updates their driver software for 10.5.
For an alternative that only caters for UK English users (like myself), you can go here and install the UK keyboard layouts supplied there. That's the posting that gave me enough clues to do the above with the Logitech layouts. As a result, I've not actually tried the UK English layouts on that posting, but if they work for you, that would be even simpler.
Below is a table of symbols used in OS X menus to represent special and modifier keys; read on for how to create them in OS X, and for use in HTML and Javascript.
Symbol
Name
Hex
Dec
⇧
Shift
21E7
8679
⌃
Control
2303
8963
⌥
Option
2325
8997
⌘
Command
2318
8984
⌦
Delete Right
2326
8998
⌫
Delete Left
232B
9003
⎋
Escape
238B
9099
⏏
Eject
23CF
9167
↩
Return
21A9
8167
←
Left Arrow
2190
8592
↑
Up Arrow
2191
8593
→
Right Arrow
2192
8594
↓
Down Arrow
2193
8595
⇞
Page Up
21DE
8670
⇟
Page Down
21DF
8671
↖
Home
2196
8598
↘
End
2198
8600
⇥
Tab
21E5
8677
⇭
NumLock
21ED
8685
⌧
Clear
2327
8999
⌅
Enter
2305
8965
Apple Symbol
F8FF
63743
Note that some of the glyphs may not render on other platforms if a Unicode font is not installed, but they should work on any Mac.
As reported in many places, including Macworld, there's a new OS X malware in the wild, first reported by Intego, who named it OSX.RSPlug.A (where do they get these names?).
I spent some time this morning looking at this malware, and wrote this article explaining how to find out if you've been infected, and how to remove the programs if you have. If you want all the details, you can read the article. If you just want to know how to remove the malware, here's the simple process:
In the Finder, navigate to /Library -> Internet Plug-Ins, and delete the file named plugins.settings. Empty the trash. This deletes the tool that sets the rogue DNS Server information.
In Terminal, type sudo crontab -r and provide your admin password when asked. This deletes the root cron job that checks the DNS Server settings. You can prove it worked by typing sudo crontab -l; you should see the message crontab: no crontab for root.
Open your Network System Preferences panel, go to the DNS Server box, and copy the entries you can see to a Stickies note, TextEdit document, or memorize them. Now retype those same values in the box, then click Apply.
Reboot your Mac.
The only people who should be infected today are those who have broken the number one rule of internet computing: don't download and install programs (especially those that are (a) package installers that (b) request your admin password) from untrusted sources. However, because this particular trick could be used on any sort of potentially popular site, I thought I'd share the simple how-to, as well as the links above for more details.
As OS X grows in popularity, I expect that this type of thing will become more commonplace.
Just stumbled upon this one ... some time ago, I was attempting to write an AppleScript to choose the Save As PDF... option in the Print dialog box of Safari. After searching all of the scripting sites, I worked out a solution, but it was a kludge that involved System Events and "click at" coordinates.
I was playing around with the Keyboard and Mouse Preferences pane, and decided to try adding an Application keyboard shortcut for Safari. I just typed in Save as PDF... (no quotes, and type the ellipses by hitting option-semicolon) -- and it worked! I made the shortcut Command-Option-Control-P. So now to save a web page as a PDF, I can type Command-P and then Command-Option-Control-P to bring up the Save box to save the PDF. No more having to use the mouse/trackpad to select this.
[robg adds: This works in both 10.5 for sure, and almost but not quite in 10.4 -- you can see the shortcuts in the menu, but they only work if you first activate the menu -- at least, I think that's what's happening. If you have it working in 10.4, please comment. This is an amazingly useful tip, as you can do this for any of the entries in that menu -- I set Control-Command-M to Mail PDF, for instance. I set the shortcuts up for All Applications, since those menu choices are the same in every app, and now I can print and mail PDFs without touching the mouse.]
This isn't exactly a hint, but just a heads up. I'm buying some new MacBook Pros online, but I didn't want them to have Leopard installed. I called the Apple Sales line to find out what the situation was.
The Rep said that any machines that ship before November third will have Tiger installed on them (with Leopard in the box). After that, all machines will have 10.5 preinstalled. So if you want a new Mac with Tiger, order right now!
The following AppleScript will move all windows which are offscreen to the main screen. This is useful when you have disconnected an external display, and the windows you had open on that screen (or screens) are now unreachable.
Copy and paste this code into Script Editor:
-- Example list of processes to ignore: {"xGestures"} or {"xGestures", "OtherApp", ...}
property processesToIgnore : {}
-- Get the size of the Display(s), only useful if there is one display
-- otherwise it will grab the total size of both displays
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
The definitely works in 10.4, and it may also work on OS 10.3. You can find a link to the original source in this blog entry.
[robg adds: You'll need to have the Enable Access for Assistive Devices box checked in Universal Access. The above-linked blog entry contains info on how to exclude certain apps from the script -- for use with programs that hide windows offscreen. Also, if there are updates to the script, they'll be found there, not here. I have not tested this one.]