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

10.5: Edit compiled NIBs with Interface Builder System 10.5
We know compiled NIBs don't open in Interface Builder (part of Xcode). As almost all Apple programs use compiled NIBs, it's a real pain to try to tweak their interface elements with Xcode. But some non-Apple programs use regular non-compiled NIBs, so the trick it to copy the compiled keyedobjects.nib file into a regular .nib resource, and then open it with Interface Builder.

Just navigate to the Content » Resources folder of the program you want to edit then, find, select and drag and drop the keyedobjects.nib you need to edit to some other non-compiled .nib. The original compiled keyedobjects.nib will then open and allow every usual interface tweaking.

Of course, I had some concerns about this trick. But I used it to edit the Keynote 3 resources, and so far, I've haven't seen any problems -- and Keynote is as stable as before. A nice way to edit the Leopard interface, maybe?

[robg adds: I haven't tested this one.]
  Post a comment  •  Comments (7)  
  • Currently 2.78 / 5
  You rated: 2 / 5 (9 votes cast)
[44,228 views]  View Printable Version
10.5: Safer sleep during networked Time Machine backups System 10.5
The problem: You have Time Machine set up using a sparsebundle on a network drive, such as a Time Capsule or an AirPort Extreme-connected hard drive. Most of the time, everything works great. Consider this reproducible scenario, however:
  1. You are working away at home and a hourly backup starts. Time machine automagically mounts the sparsebundle.
  2. You need to leave and put your laptop to sleep, not paying attention to the fact that time machine is working.
  3. You move your laptop to work/school and wake it up.
  4. The sparsebundle is still mounted, but obviously does not work. Finder and Spotlight grow increasing stuck until you have to reboot your machine. It occurs to you that the image back home was not closed properly and that eventually, this will corrupt your backups!
  1. Install SleepWatcher (I used the MacPorts build; don't forget to specify the server variant!).
  2. Modify /opt/local/etc/rc.sleep or /etc/rc.sleep to include these two lines:
    logger -t $0 "Ejecting any mounted Time Machine images"
    hdiutil info -plist | grep /Volumes | sed 's/<string>/\"/' | sed 's/<\/string>/\"/'|xargs -I {} bash -c "if test -e \"\$0/Backups.backupdb\";  then hdiutil eject \"\$0\"; fi" {}
I am sure that someone better than I at script-fu can clean up that mess, but basically, it finds disk images that are mounted and are being used for Time Machine, and ejects them. backupd notices this automatically, and cancels the backup gracefully. The image is then safely offline before the machine disconnects from the network, as validated by console logs.
  Post a comment  •  Comments (12)  
  • Currently 2.44 / 5
  You rated: 1 / 5 (9 votes cast)
[24,032 views]  View Printable Version
10.5: A simple fix for a vanishing boot disk icon System 10.5
Under some unknown circumstances (I haven't been able to consistently duplicate the issue), it happens that the system's disk icon vanishes in Leopard. Toggling the Show Hard Disks setting in Finder's preferences has no effect, and the various repairing tricks do not solve the issue.

What happens is that the system disk (by default, named Macintosh HD) becomes marked as a hidden (invisible) file. Why? Who knows. But fortunately, it can be reverted to visibility with a simple Terminal command:
sudo chflags hidden "/Volumes/NameOfTheVolume"
To make this work, change NameOfTheVolume to the actual name of your system disk. Note that the chflags can be useful for hiding/unhiding regular files and folders, too:
$ chflags hidden "/path/to/file"
$ chflags nohidden "/path/to/file"
  Post a comment  •  Comments (2)  
  • Currently 2.29 / 5
  You rated: 1 / 5 (7 votes cast)
[9,084 views]  View Printable Version
10.5: Easily repeat accented characters System 10.5
In English, you generally do not use accented characters. But for those like me, who do not have English as our native language, accented characters are like the air we breathe. Sometimes you have to repeat accented letters to give some kind of emphasis or effect in the text. Suppose, for instance, that you would like to write something like NOOOOOO! in Portuguese; that would be NÃÃÃÃÃO!

In prior versions of OS X, you would have to type the tilde and then the letter "A" for each accented letter you want to repeat. However, at some point during the recent development of Mac OS X, something changed. Now you just type the tilde (or any other accent you want) one time, then press and hold the desired letter. To our joy, Mac OS X is smart enough to automatically repeat the accented character.

If you try that in Windows and other systems, you will find that only the first repeated letter is accented.

[robg adds: For now, I've marked this one as 10.5 only; I no longer have a 10.4 test system in the house. If this works on prior versions, please let me know.]
  Post a comment  •  Comments (9)  
  • Currently 2.67 / 5
  You rated: 5 / 5 (9 votes cast)
[10,014 views]  View Printable Version
10.5: How to pull Time Capsule data for dead drives System 10.5
My secondary hard drive died suddenly and wouldn't mount. I figured this wouldn't be a problem since I have Time Machine backing up to a Time Capsule. So I fired up Time Machine, but I can't browse to my second hard drive since it does not exist on my computer. Even if the drive was on my computer and malfunctioning, Time Machine would try to restore data to that same faulty drive. So, what to do?

Mount the disk image stored in Time Capsule (skip the verification), browse to the most recent date, and there you'll see a folder for every hard drive on your system. You can recover your data from there and put it in any available drive.
  Post a comment  •  Comments (4)  
  • Currently 1.83 / 5
  You rated: 1 / 5 (6 votes cast)
[11,559 views]  View Printable Version
10.5: Disable Spotlight during Time Machine backups System 10.5
I am using Time Machine with a Western Digital MyBook World, and had the hardest time getting it to make backups (even incremental ones of only a few megabytes) with reasonable speed. Apart from having to turn off any virus scanner, Spotlight tried to index the backup drive, which made it unbearably slow. I was not able to add the backup mount to the Privacy tab in the Spotlight System Preferences panel -- neither with the preferences pane, nor with any mdutil commands.

So I had to turn it off whenever I was doing the backup with this command:
launchctl unload /System/Library/LaunchDaemons/
After the backup had finished, I then reloaded the daemon. If you want to use Spotlight and scheduled backups, this is not really practical. So I found a blunt force method that works to me.
read more (295 words)   Post a comment  •  Comments (14)  
  • Currently 2.14 / 5
  You rated: 2 / 5 (7 votes cast)
[25,156 views]  View Printable Version
10.5: How to refine Spotlight searches in 10.5 System 10.5
I found some prior hints on the site about using boolean searches in 10.4; there are now easier ways of doing this, and a more powerful way of refining what you search for, in Leopard. In Spotlight, or just the find bar in a Finder window, you can type sun NOT set (the capitalization of NOT is important) to instantly show all matches, except those containing 'sunset.' The same can be done with OR and AND modifiers.

To extend this and do super specific searches, you can use file attributes. For example, I want to exclude movie frames from an image search, so I would type .tga NOT PixelWidth:720. There are many attributes you can use -- to find these for a specific file, use Terminal and type mdls, press the Space Bar, and then type the path to that file's location (or just drag it in from the Finder). Terminal will return a list of operators; you can use any of these in your queries, but remove the kMDItem prefix that shows in Terminal.

[robg adds: The ability to do boolean searches with Spotlight in 10.5 -- as well as the ability to search for phrases -- has greatly improved the usability of the tool in Leopard. Now if only we could add more columns to the search results, as we could in 10.4, 'find by size' would actually be useful again.]
  Post a comment  •  Comments (8)  
  • Currently 2.14 / 5
  You rated: 4 / 5 (7 votes cast)
[12,894 views]  View Printable Version
10.5: A deeper look at drop box permissions issues System 10.5
Recently, a hint posted here noted some discrepancies with the Drop Box permissions and permissions of items that are put into it. In short: sometimes a user receives a read-only copy of an item put in his/her Drop Box, and sometimes that item is read/write. Here's why.

To be able to explain what's going on, you need to know a few of the rules that Mac OS X uses for setting file permissions:
  1. The Leopard systems automatically enable access control lists (ACLs) on the startup disk. Tiger systems do not.
  2. Newly-created Leopard accounts are given the primary group of staff. This is also the case for Tiger Server and Leopard Server systems, but not for Tiger client. Tiger client uses what's called a "GID per UID" system, where a new group is created for each user. (Throughout these examples, we'll use staff as the primary group for all users, although that will be different for local accounts on a Tiger client.)
  3. POSIX permissions are "regular" UNIX permissions for owner, group, and everyone else. ACLs and POSIX permissions work together when ACLs are enabled. Mac OS X calculates the effective permissions by combining the two via this rule:

    effective access = (returned POSIX access) UNION (union of applicable ACL allow rules) TAKE AWAY (union of applicable ACL deny rules)

    In short, you can either have POSIX-only or POSIX and ACL. There's no "just ACL" model.
  4. Whenever a new file or folder is created, the default permissions are set like this: (1) the POSIX owner is set to your account, (2) the POSIX group is inherited from the folder in which the new item is created, and (3) the POSIX permissions are set via the umask, which makes the file read/write for the POSIX owner and read only for the POSIX group and everyone fields. (This is POSIX 0755 for folders and 0644 for files.) If any inheritable ACL entries exist for the folder where the new item is created, the new item will inherit them (as inheritable entries -- e.g. not explicit ones).
  5. Whenever you copy a file or folder, the permissions on the copy are set according to the following rules: (1) the POSIX owner is set to your account, (2) the POSIX group is set to that of the copy's parent folder, and (3) the POSIX permission bits themselves are preserved. Any explicit (not inherited) ACL entries are preserved from original to the copy, but inherited ACL entries from the original are discarded. The copy will inherit any inheritable ACL entries that are set on its parent folder.
  6. Whenever you move a file or folder, everything is preserved. The POSIX owner and group do not change, and the POSIX permissions remain intact. All ACL entries -- both inherited and explicit -- are preserved.
Read on for the fun part...
read more (766 words)   Post a comment  •  Comments (19)  
  • Currently 3.27 / 5
  You rated: 1 / 5 (11 votes cast)
[25,652 views]  View Printable Version
10.5: Parental Controls and authenticating proxies System 10.5
If your network is using an authenticating proxy for web access (you need to enter a "proxy password" to access the web), then you'll have trouble if you turn on Parental Controls, as the controls will prevent you from authenticating to the proxy.

The Parental Controls feature works by directing all web access for controlled users to an internal Apache web proxy (this proxy is dynamically started when a Parental Controls user logs in). Unfortunately, this proxy eats the HTTP 407 response authentication credentials, so you end up in a never-ending loop of the proxy demanding to know who you are, and the Parental Controls proxy refusing to let you tell.

Here's one possible solution. Open Terminal and run this command:
sudo chmod a-x /usr/sbin/httpd
Enter your admin password when prompted, then quit Terminal and restart your Mac. It's important to note that the above Terminal command prevents the Apache web server (httpd) from running at all. As such, this fix is only recommended if you need Parental Controls and don't need to host web sites on your Mac. It stops the Parental Controls proxy from running, but it also stops your computer from acting as a web server (because the same Apache httpd program is used to serve your web content).

System updates (i.e. 10.5.5 update) and Apple Security Updates reset parental controls, thus the commands must be re-entered.

[robg adds: I can't confirm this issue nor test the fix...]
  Post a comment  •  Comments (8)  
  • Currently 2.73 / 5
  You rated: 2 / 5 (11 votes cast)
[15,778 views]  View Printable Version
10.5: See Time Machine GUI on a headless Mac over ARD System 10.5
When attempting to access Time Machine on a headless Mac over Apple Remote Desktop, a common complaint is that the GUI (graphical user interface) does not appear, though it does function if you guess where the buttons are. This is especially problematic when running on a Mac Mini.

To force the screen to redraw, just drag any file/folder from your local desktop into the Remote Desktop window, as if you were copying the file to the remote machine. You don't have to release the icon, but the screen should redraw with the Time Machine controls now visible and functional. Not all of the visual effects work, but you can browse past archives and perform restores with ease.
  Post a comment  •  Comments (7)  
  • Currently 3.00 / 5
  You rated: 2 / 5 (12 votes cast)
[14,127 views]  View Printable Version