Setting NSUmask in Leopard is done differently than in previous OS X releases (older hints on NSUmask). In 10.5, NSUmask is gone. To set a default umask (for both shell and GUI apps), edit /etc/launchd.conf and add this line:
where 077 is the new default umask. If nothing is there, the default is 022. Note, the /etc/launchd.conf file umask "trick" should work in Tiger too, but I didn't test it.
Note that 10.4 uses "User Private Groups" (see this document for more), but still sets the umask at 022 (this results in new files/folders having a permission of 055 rwxr-xr-x). In Leopard, the default umask is still set to 022, but no longer uses User Private Groups. This means that all users are a member of the Staff group (GID 20), and files are set to r-- for Staff by default. If you want to lock down the files on the Mac so only the creator can access the files, you need to set the default umask to a stricter number (077 for example). In Tiger, if you set the umask to 027 (NSUmask 023) you could not change the time zone using System Preferences.
If you used Migration Assistant, or upgraded from a previous OS X release, the Appearance System Preferences panel settings are retained. As a result, you may not have noticed that the minimum for anti-aliasing is now 4px, down from 8px in 10.4. Fresh installs of Leopard have 4px set as default.
A simple way to see what those files in your Trash are before consigning them to the great digital beyond. Quick Look works on trashed files and folders, so you don't have to drag items out of the Trash to double-check 'em.
(This is nice because otherwise you have to drag items out of the trash before opening them, a hallmark of the Mac for quite longer than I can remember.)
[robg adds: Actually, an older hint here pointed out you can drag them onto an already-running application icon in the Dock to open them.]
I was happy to see this hint about Quick Look support for examining the contents of zip files. However, since I do a lot of my work back and forth with *nix users, most of my compressed archives are gzipped or bzipped tarballs.
I was directed to the free BetterZip Quick Look Generator. This Quick Look Generator will examine the contents of ZIP, TAR, GZip, BZip2, ARJ, LZH, ISO, CHM, CAB, CPIO, RAR, 7-Zip, DEB, RPM, StuffIt's SIT, DiskDoubler, BinHex, and MacBinary files. And as noted, it's free!
[robg adds: While this is mentioned in the comments to the referenced hint, given that this plug-in really handles most types of compressed files, I felt it was a unique enough Quick Look plug-in to merit a hint of its own. This plug-in is apparently based on features in macitbetter's $19.95 BetterZip, which allows you to extract single files from archives, search within archives, create them via drag and drop, and much more -- I'd not heard of it before, but it's now on my Pick of the Week to-be-looked-at list (and yes, PotW will return, once the rush of Leopard hints slows down a bit!).]
Folder actions in Leopard are triggered by the application Folder Action Dispatcher, which basically checks for modifications in a folder at a specified interval. Unfortunately, the default time interval in Leopard is 180 seconds, i.e. three minutes, which may be way too long sometimes. However, Folder Action Dispatcher is a scriptable app and it allows user to change the checking interval. Open Script Editor in /Applications/AppleScript, and type the following command on one line:
tell application "Folder Action Dispatcher" to set polling interval to nnn
Replace nnn with the desired polling interval, in seconds. Now click the Run button in the toolbar, and voila!
[robg adds: On the queue site, a comment notes that Script Editor may ask where the app is -- it resides in /System/Library/CoreServices. You can avoid this by specifying the full path in the above command. It's also noted that there's a new AppleScript command to force a folder to be checked: tell application "/System/Library/CoreServices/Folder Actions Dispatcher.app" to tick.]
In Leopard, many man pages (the documentation for Mac OS X's UNIX commands) are compressed with gzip. This is a very good idea but, if you upgraded to Leopard from Tiger, the old man pages are left in place by the installer (this is a bug).
So many man pages are there in two versions: the old uncompressed one from Tiger, and the new compressed one from Leopard. The problem is that when man searches for a given page, it finds the uncompressed one first and displays it, thus showing you outdated information. To solve the problem, the old man pages must be removed. I made a shell script that removes everything in /usr/share/man that is not installed by Leopard (I made the script by actually installing Leopard on a blank disk and comparing with my installed system). Here's the command to build the script:
This command creates a shell script (in the directory from which it was run) containing rm commands for all man pages that are not in the Leopard clean install. You can then execute it by typing sudo sh rm-old-man.sh. If you want to try it, here's the script that I generated on my system [23KB download], which I think you can safely execute on any Leopard system. However, back up first -- you have been warned.
[robg adds: I haven't tested this one, nor can I confirm the issue, as my machines were all clean installs.]
This hint is for all those OS X developers out there. I've been bothered for a while that OS X didn't export thread affinity scheduling to user-space. That is, the functionality for a programmer to tell the system that a particular thread should run on a particular processor core was not available.
With Leopard, Apple has released a Thread Affinity API to provide thread affinity hints to the kernel scheduler for improving data locality in caches, among other uses. While it is still not a full implementation like sched_setaffinity() is in Linux, it should make parallel programming a little bit more effective and portable.
When I was screen sharing today, using Finder, I found I could not get it to show me the full 23" screen from the remote computer on my 21" monitor. It worked fine before, but today it was messed up. No matter which mode I chose it was larger than my window.
All I had to do was delete com.apple.ARDAgent.plist from my root Library preferences folder and all is well!
[robg adds: I don't have this file (in either Preferences folder), even though I use the Finder's screen sharing feature regularly. I'm guessing that it will only be present if you've used the full Apple Remote Desktop package.]
If you've tried to edit the ownership of your files in Leopard's Finder, you may have seen in the Get Info window that many of your files and folders belong to a group called "unknown," and that when you try to fix them, the Finder crashes. This is because in older versions of Mac OS X, users belonged to their own private groups with the same ID number as the user (e.g., 501/501). But in Leopard, users now have a primary group membership of staff (20). Unfortunately, if you updated your system to Leopard using the Archive/Install or Upgrade method, your existing users were left with their old membership values, and Leopard doesn't quite love them.
Fixing the problem requires several steps, including editing your user accounts' hidden options, fixing group ownership of your home folder, and sending some obscure commands to directory services in Terminal via the dscl command. Whew! To make things simpler, I've written a simple bash script that makes all the necessary changes. And here it is:
Save the script somewhere, and make it executable (chmod a+x scriptname), then run it to fix the problem.
[robg adds: As a reader on the queue review site noted, Apple has a different solution: create a group with the same group ID as your user ID, and make that new group your primary group. I'm not sure that this problem affects all Upgrade users, either -- my MacBook Pro was upgraded from 10.4 to 10.5, but it doesn't have this Finder crash on Get Info edit problem.]