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

10.5: How to set NSUmask in Leopard System 10.5
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:
umask 077
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.
  Post a comment  •  Comments (21)  
  • Currently 2.20 / 5
  You rated: 2 / 5 (5 votes cast)
 
[28,887 views] Email Article To a Friend View Printable Version
10.5: Allow a lower text smoothing minimum System 10.5
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.
  Post a comment  •  Comments (9)  
  • Currently 2.33 / 5
  You rated: 1 / 5 (6 votes cast)
 
[6,141 views] Email Article To a Friend View Printable Version
10.5: Quick Look works on objects in the Trash System 10.5
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.]
  Post a comment  •  Comments (0)  
  • Currently 2.00 / 5
  You rated: 2 / 5 (5 votes cast)
 
[6,155 views] Email Article To a Friend View Printable Version
10.5: Resolution independence and screenshot tool issues System 10.5
I'm not sure whether or not this happens in Tiger, but it seems that if you mess with resolution independence (the AppleDisplayScaleFactor value), then OS X's built-in screenshot tool stops working.

The solution is to open up the .GlobalPreferences.plist file in ~/Library/Preferences and delete the AppleDisplayScaleFactor string, save the file, and log out and back in.
  Post a comment  •  Comments (3)  
  • Currently 3.00 / 5
  You rated: 5 / 5 (4 votes cast)
 
[7,437 views] Email Article To a Friend View Printable Version
10.5: Quick Look inside variety of compressed archives System 10.5
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!).]
  Post a comment  •  Comments (9)  
  • Currently 2.75 / 5
  You rated: 4 / 5 (4 votes cast)
 
[8,499 views] Email Article To a Friend View Printable Version
10.5: Change the polling interval for folder actions System 10.5
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.]
  Post a comment  •  Comments (3)  
  • Currently 3.33 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (3 votes cast)
 
[10,500 views] Email Article To a Friend View Printable Version
10.5: View the new 'man' pages on upgraded systems System 10.5
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.]
  Post a comment  •  Comments (27)  
  • Currently 3.60 / 5
  You rated: 4 / 5 (5 votes cast)
 
[12,389 views] Email Article To a Friend View Printable Version
10.5: New thread affinity API for OS X developers System 10.5
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.

Details on the API can be found here.

[robg adds: Clearly outside the realm of my skill set, but perhaps useful to a few of our readers...]
  Post a comment  •  Comments (0)  
  • Currently 3.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (2 votes cast)
 
[7,933 views] Email Article To a Friend View Printable Version
10.5: Fix a non-scaling screen sharing issue System 10.5
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.]
  Post a comment  •  Comments (0)  
  • Currently 3.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (3 votes cast)
 
[5,632 views] Email Article To a Friend View Printable Version
10.5: Repair a user/group Finder crashing issue System 10.5
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:
#!/bin/bash
#
# Leopard User Fix by Thinkyhead
#
# Fixes the broken group membership in Leopard after an upgrade
#

if [ `whoami` == "root" ]; then
 echo "[ERROR] `basename $0` must be executed as an admin user (no sudo)."
 exit 1
fi

GID_IS_UID=`sudo dscl . read /Users/$USER | grep PrimaryGroupID | grep "$UID"`
GID_IS_STAFF=`sudo dscl . read /Users/$USER | grep PrimaryGroupID | grep 20`

if [ -z $GID_IS_UID ]; then
 echo "[ERROR] It looks like your account is already fixed!"
  if [ -z "$GID_IS_STAFF" ]; then
   echo "[ERROR] However, you are not a member of group 'staff' which is bad!"
  fi

 echo -n "Would you like to proceed anyway? (y/N):"; read PROCEED
 if [ -z $REPAIR ] || [ "$PROCEED" = "n" ] || [ "$PROCEED" = "N" ]; then
  exit 0
 fi
fi

#
# 1. Change User's primary group to "staff" (20):
#
	sudo dscl . changei /Users/$USER PrimaryGroupID 1 20

#
# 2. Make sure the user is in the "staff" group in Directory Services:
#

USER_IS_IN_STAFF=`sudo dscl . read /Groups/staff | grep GroupMembership | grep "$USER"`

if [ -z $USER_IS_IN_STAFF ]; then
	sudo dscl . append /Groups/staff GroupMembership $USER
fi

#
# 3. Fix group permissions on all items in the user's home folder:
#
	sudo chgrp -R staff $HOME

#
# ...or more slowly, but more accurately:
#
#	sudo chgrp staff $HOME
#	sudo find $HOME -group $UID -exec chgrp staff "{}" ;
#

#
# 4. Delete the group that's no longer in use:
#
	sudo dscl . delete /Groups/$USER >/dev/null 2>&1

#
# 5. Repair Permissions
#

echo -n "Would you like to repair permissions? (Y/n):"; read REPAIR
if [ -z $REPAIR ] || [ "$REPAIR" = "y" ] || [ "$REPAIR" = "Y" ]; then
  sudo diskutil repairPermissions /
fi

#
# 6. Reboot for safety.
#

echo -n "Logging out is recommended, but reboot is more thorough.nWould you like to reboot? (Y/n):"; read REBOOT
if [ -z $REBOOT ] || [ "$REBOOT" = "y" ] || [ "$REBOOT" = "Y" ]; then
  reboot
fi

exit 0
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.]
  Post a comment  •  Comments (12)  
  • Currently 3.43 / 5
  You rated: 4 / 5 (7 votes cast)
 
[46,885 views] Email Article To a Friend View Printable Version