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

Fix incorrectly-displayed fonts without logging out System
Occasionally (every few weeks), a user comes along to me complaining that the fonts in one of their applications has become "garbled" or "corrupted." Safari seems to be the subject of most complaints, but I have also seen this occurring in Firefox, and I'm pretty sure I've seen it before in other applications as well. The symptom is simply that an incorrect font is used for the display of text. For example, Cursive being used instead of Times. In sections of text where the style changes to bold and/or italics, the font may or may not switch to the correct one. If a symbol font happens to be the incorrectly-displayed one, it looks sort of like hieroglyphics -- hence the description of "garbled" or "corrupted" text sometimes seen on various forums.

Note: I don't think "corrupted font" is an accurate characterization of the problem. The fonts themselves don't appear to be corrupted; rather, the system is using the wrong font to display some text. The following solution worked for me, without requiring a reboot or logout. It can be done as the user experiencing the problem (ie: no admin access is required).
  1. Quit the application experiencing the problem.
  2. Remove the contents of this directory: /Library » Caches » » nnn -- where nnn is the UID number of the user experiencing the problem.
  3. Kill the process called ATSServer. This should probably be done as soon as possible after step 2. The system appears to automatically restart ATSServer after a few seconds.
Now try starting the application again. Hopefully the text will now be displaying in the correct font. If not, try repeating steps two and three above as close together (in time) as possible. These steps could be done either with Finder and Activity Monitor (respectively), or entirely on the command line.

For a more permanent fix, I've seen suggestions that adding a logout or shutdown hook (removing the user's folder in /Library » Caches », or killing ATSServer) might help. But if the thing that causes the corruption happens randomly at any moment, as opposed to cumulative problems building up over time, then such a hook wouldn't do anything to solve repeat ocurrences (but I haven't actually tried it myself).
  Post a comment  •  Comments (11)  
  • Currently 2.20 / 5
  You rated: 2 / 5 (5 votes cast)
[17,199 views]  View Printable Version
Set a volume level below the system-set minimum System
If you want to set the volume below the minimum volume control level, but still have it audible, do the following. Turn the volume down to 0 bars (absolutely down) manually, but don't hit the Mute key. Then press the Mute key, which OS X will interpret as "unmute" as the volume is set to zero, and voila. The sound should still be going, but very quietly.

[robg adds: This seems to work as described on my Mac Pro with external speakers. The on-screen sound icon shows zero dots on the sound scale, yet there's definitely audible music coming from the speakers. If I then hit the Mute key, the sound completely vanishes.]
  Post a comment  •  Comments (9)  
  • Currently 2.33 / 5
  You rated: 1 / 5 (3 votes cast)
[7,010 views]  View Printable Version
Set up an Apple II as an OS X terminal System
I set up an old Apple IIc as a terminal for my Mac mini; you can read the full details of the project in this post. The basic steps involved are as follows:
  • Connect the Apple II serial cable to a Serial-USB Adaptor
    • $ cd /dev
      $ ls tty.*
  • Load terminal emulation software on Apple IIc
  • Use screen to connect and run getty
    • $ screen /dev/ttys.KeySerial1
    • Ctrl-A, Shift-: and then exec ::: /usr/libexec/getty std.1200
Ideally one should configure getty to run via ttys, yet something (USB controller?) hangs on the two different Mac Minis I've tried this on, mucking things up. However, a benifit of using screen is the ability to cut-and-paste between machines.

[robg adds: Definitely not your normal OS X hint, and there are obviously many easier solutions. Still, putting an old Apple ][ to work like this is pretty cool.]
  Post a comment  •  Comments (5)  
  • Currently 3.50 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (4 votes cast)
[12,392 views]  View Printable Version
Choose an audio input device based on sound levels System
I frequently record Keynote presentations I give using my Mac (using ProfCast). Typically I use a wireless lapel mic and have my sound preferences pane set to record from Line In. However, on occasion I forget to turn on my mic, or the battery is dead, and so I get nothing but silence. In these instances, I'd like to be able to use my PowerBook's internal mic as a backup, so I set about finding a method using AppleScript to accomplish this.

I eventually got something working with the help of a freeware program called AudioLeak that monitors the RMS sound level of the selected input source. Together with a little GUI scripting, I can have my Mac try to connect to Line In, but switch to the internal mic if the line is dead. Here's the final script.

I have this script embedded in a droplet, so that I drag a Keynote file onto the droplet and it runs this script along with some other stuff I want to do just before starting a presentation (i.e. check monitor resolution, hide all other apps, etc), and then launch the file in Keynote. Alternatively, you could have this script run periodically using iCal or cron or an idle handler.

In addition to AudioLeak, you'll need to have GUI scripting enabled (in System Preferences » Universal Access).

[robg adds: I haven't tested this one.]
  Post a comment  •  Comments (3)  
  • Currently 2.00 / 5
  You rated: 3 / 5 (4 votes cast)
[9,066 views]  View Printable Version
Reduce monitor resolution to ease calibration System
There have been some interesting things going on in the browser battlefield regarding color managing, as seen in these two blog posts:

Safari brings color-managed browsing to Windows
Color Spaces

The web, as it currently stands, is basically an unmanaged environment. But that might change with Safari for Windows and future versions of Firefox. Calibrating your monitor will be more and more important if this turns out to be true. So I thought I might share something that I've learned from calibrating current large LCDs.

Eyeballs are no replacement for hardware calibration, but they are free and readily available, as is Apple's ColorSync Display Calibrator. The problem is that monitors have come a long way in recent years, but Apple's software is essentially a port from OS 8 and haven't changed much since. The Apple logo and grey background were fine for 800x600 and 1024x768 days, but look pretty small on 1920x1200.

If you change the resolution to 640x480 before calibrating, you get two advantages: One, the Display Calibrator takes the entire screen; two, the image gets blurry and you don't have to squint as much in order to blend the Apple logo with the background. I found that changing the resolution led to a much better result. Just remember to choose Hide Others from the Apple menu before changing the resolution, or else you'll end up with lots of tiny windows everywhere when you get back to your native resolution.
  Post a comment  •  Comments (7)  
  • Currently 3.40 / 5
  You rated: 4 / 5 (5 votes cast)
[11,217 views]  View Printable Version
Take screenshots in many formats via the keyboard System
I've used a simple collection of apps called ScreenShotApps (30-Mar-2005 zip file on that site) and Spark to create hot keys for different types of screenshots -- PICT, PDF, JPEG, PNG, BMP, and TIFF are all a keyboard shortcut away.

After expanding the ScreenShotApps bundle, store the bundled mini-programs on your hard drive, then use Spark to assign each to a keyboard shortcut. I've chosen to use Shift-Command and the number keys. So Shift-Command-1 gets a full screen PICT, -3 is a PDF, -5 is a JPEG, etc. I use -2, -4, and -6 for selected region screenshots in those same formats. As with the built-in screenshot tool, you can add the Space Bar for object capture, or Control to capture to clipboard.

I've explained this all in more detail in this PDF.

[robg adds: taketo's native language is not English, so I've rewritten the above hint based on my understanding of the process from his original submission. I have not done any work on the PDF, however, but it's still quite easy to follow along. The ScreenShotApps site is very slow to load, but it will eventually show up. I haven't tested this myself on 10.4; it worked for the author on 10.3.]
  Post a comment  •  Comments (2)  
  • Currently 1.50 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (2 votes cast)
[7,176 views]  View Printable Version
Create identical tiled windows in most apps via AppleScript System
After experimenting with certain scripts to tile windows and reduce screen cluttering distraction, I wrote the following AppleScript and assigned it to Control-W with Quicksilver:

property maxWindowWidth : 1000
tell application "Finder"
  set screenSize to bounds of window of desktop
  set availScreenWidth to item 3 of screenSize
  set availScreenHeight to item 4 of screenSize
end tell

tell application "System Events"
  set dockProps to property list file "~/Library/Preferences/"
  set dockSide to the value of the property list item "orientation" of dockProps
  set dockTileSize to the value of the property list item "tilesize" of dockProps 
end tell

if dockSide is "bottom" then
  set availScreenHeight to availScreenHeight - (dockTileSize + 10)
end if

set sideMargin to (availScreenWidth - maxWindowWidth) / 2

tell application "System Events"
  set myFrontMost to name of first item of (processes whose frontmost is true)  
end tell

if myFrontMost is "Finder" then
  set myTopCorr to 22
  set myTopCorr to 0
end if

  tell application myFrontMost
    set allWindows to (every window where visible is true)
    set n to count of allWindows
    set windowOffset to 0
    repeat with x from 1 to n
      set windowOffset to 20 * (x - 1)
      tell window x
        set bounds to {sideMargin + windowOffset, 30 + myTopCorr + windowOffset, (availScreenWidth - sideMargin) + windowOffset, availScreenHeight - (n + 1 - x) * 20}
      end tell
      set x to x + 1
      if x is equal to (n + 1) then exit repeat
    end repeat
  end tell
end try

You can adjust the width of the resulting tiled windows by changing the value of maxWindowWidth at the top of the script.

[robg adds: If you've never moved your dock to one side of the screen or the other, the above script will fail (because the 'orientation' key won't exist in the Dock's preferences file). The fix is to move the dock to one side, then move it back, and this will work as described. I'm sure there are AppleScript solutions that could check for the key's existence before trying to extract it, but such solutions are beyond my limited AppleScript skills.]
  Post a comment  •  Comments (12)  
  • Currently 2.71 / 5
  You rated: 5 / 5 (7 votes cast)
[13,279 views]  View Printable Version
Fix a crash related to Keychain and updated programs System
I have been having issues with my keychains where the "XXX app has been updated. Do you want to allow the new version to access the same keychains?" dialog would keep coming up -- even after clicking Change All. No matter what I would do, the window would come back and end up hanging forever, forcing me to reboot.

After hours of frustration I found this article on that contained the fix. Open Terminal and type:
sudo mv /var/db/CodeEquivalenceDatabase \
That resets the database used to determine what apps can access the keychains. The problem is now gone!

[robg adds: Read the linked article at unsanity for a lot more detail about how this specific file was identified as the culprit.]
  Post a comment  •  Comments (2)  
  • Currently 2.40 / 5
  You rated: 2 / 5 (5 votes cast)
[7,993 views]  View Printable Version
Create a 'hidden at login' Admin account System
Although security on a Mac is debated heavily by both sides, I prefer to stay safe and use a standard account for my day-to-day uses, and an extra Administrator account for my, well, administrative uses. The thing that bugs me is that every time I log in, I see a this big login option, Administrator, and that easily tells someone that is physically stealing my notebook that he needs to crack the admin account, and not mine, to hack my system. I prefer to hide the admin account, but I don't really like to use the Terminal.

So, to the hint: from what I've seen, if you create an account named Administrator with a short name of Admin, the computer will automatically hide the account for you. However, this only works when the new Administrator account is the only administrator account in the system.

[robg adds: I tested this hint, and (somewhat to my surprise), it does work. Case matters, though -- make sure you capitalize the short name! In order to have the account auto-hidden, it does need (or so it seems at first) to be the only admin account. My first test failed, and that's because it was the second admin account on the machine. I then converted my standard admin account into a regular account, then created the new Administrator account. On my next login, the Administrator account wasn't listed in the login screen.

However, after logging in as the new admin, I then switched my standard account back to administrator and logged out. This time, the Administrator account stayed hidden. So it seems it has to be the only admin account when it's created, but after that, it will remain hidden if you add additional administrators.]
  Post a comment  •  Comments (26)  
  • Currently 3.25 / 5
  You rated: 2 / 5 (8 votes cast)
[59,695 views]  View Printable Version
Possibly speed copies via Terminal System
I was in a hurry trying to back up my iPhoto Library to an external Firewire 400 drive, and was disappointed to see that the Finder was going to take almost an hour to back up all 11GB of pictures I had. I went into Activity Monitor to see just how slowly the Finder was going, and found it was copying at 8MB/sec, with the Finder taking 60% of my PowerBook G4's CPU. So I canceled the copy, opened up, and executed the following command:
cp -r ~/Pictures/iPhoto Library/ /Volumes/myexternaldrive/
Activity Monitor showed cp using only 20% CPU, and maxing out my drives at 23MB/sec! What would have taken an eternity in the Finder took only 15 minutes, thanks to Terminal.

NOTE: If you need to copy files with resource forks, install the Developer Tools and use CpMac (in /Developer » Tools) instead of cp.

[robg adds: On a faster machine, I'm not sure there will be much difference in the speed -- I did a quick test on the Mac Pro (using a 3.22GB folder with a few thousand files spread through 160 folders), and both methods took about the same amount of time. In addition to the resource fork issue, note that cp won't copy OS X alias files; it just throws an error message during the copy.

ditto (included with OS X), however, seems to copy them just fine, and handles resource forks automatically. So I tested again with ditto instead of cp. Whereas the time gap with cp wasn't really measurable, ditto was about 15 seconds quicker than the Finder on my 3.2GB test copy. So if I were copying a huge folder, I'd probably try ditto, as it could save a few minutes of copying time.]
  Post a comment  •  Comments (15)  
  • Currently 3.25 / 5
  You rated: 5 / 5 (4 votes cast)
[21,476 views]  View Printable Version