OS X has long supported disk quotas to limit how much drive space each user is allowed. Way back in 2003, we ran this hint which explained how to set up and use disk quotas. Back then, the process seemed a bit scary to me, given the complexity of some of the Terminal commands.
Fast-forward five years, though, and things have gotten much simpler. While reading some messages on a mailing list, I found a pointer to Eric Crist's write-up on HFS+ disk quotas, which makes things look much simpler. While working through the instructions, though, I had an issue early on -- the repquota command listed in the third step failed to run. I managed to get it working by taking one command from our prior hint; below is an executive summary version of Eric's instructions, with my fix to get repquota working:
Create a root shell session in Terminal with sudo -s, providing your admin password when asked.
Create an empty quota options file with touch /.quota.ops.user.
Run quotacheck -a to generate a list of drive space used by user. This is the step I had to add.
Run repquota -a to list the drive space used by each user. The previous command creates the list, and this command displays it. I don't know why this command alone didn't work on my system, but it didn't.
Enable quotas by typing quotaon /. (You can turn them off again with quotaoff /.)
Set quota limits for a given use by typing edquota -u username. This will put you in a vi editing session, where you can set both hard (cannot be exceeded) and soft (can be exceeded for a certain period of time) limits on drive space and inodes (files).
Eric's writeup goes into greater detail, including an explanation on how to change the default one week grace period on soft limits.
I've created a simple three-line startup item that silences the Mac OS X boot chime, colloquially known as the "bong" sound, on Intel-based Macs. PowerPC-based Macs use another method for changing the startup chime's volume, so this tip won't work for them.
So why not just run sudo nvram SystemAudioVolume=" " and be done with it? Because of my normal volume settings, my MacBook keeps resetting the chime volume automagically. Until a simpler solution is found (and honestly, three lines is pretty simple), this should work fine. TinkerTool System can silence the startup chime, but it is shareware. StartupSound.Prefpane can do this, too, but DebongIntel is a simpler solution if all you want is to silence the chime. You can also modify the script to set the volume to a non-silent level.
The solution involves making a directory, then two files, then modifying the permissions slightly.
When you use optical audio on your Mac, OS X locks the volume level to the highest setting, forcing you to adjust the volume level with your receiver. This "feature" is both annoying and unneeded. To get around this lock, you can simply install a free utility called Soundflower, which includes Soundflowerbed available in the link below.
After installing Soundflower, launch Soundflowerbed. This application runs as a menu extra, allowing you to quickly change your audio settings. Simply make Soundflower (2ch) your default output, and within Soundflowerbed, set the 2ch to output to your built-in output. Now you can change your volume with your keyboard or Apple Remote, instead of using your receiver's remote.
Note: you have to adjust the volume and select Built-in Output on Soundflowerbed before you will get output; this is probably a simple bug with the audio settings, and it takes a small change to take effect. Also, Soundflower needs a reboot before it will work.
Here's an interesting Dock modification, though to be honest, I'm not sure exactly when it might prove useful. In Terminal, enter these two commands:
$ defaults write com.apple.dock static-only -bool TRUE
$ killall Dock
As soon as you kill the Dock, when it respawns you'll notice that only your running applications are listed -- in other words, any program you've added to the Dock won't be shown unless it's running. You can obviously accomplish the same end result by simply dragging all your static applications out of the Dock while nothing other than the Finder is running; so that's why I'm not sure how useful this command really is.
The only potential use I can see for it is if you've got a really crowded Dock, and you wanted to temporarily simplify it, you can use this command -- because when you reverse the preferences setting by repeating the above command with FALSE at the end, all your static icons will come back, so you don't have to manually re-add them. I should add that's how it worked for me, but proceed at your own risk -- if you try it, there's a chance you may end up adding back your static items by hand.
So are there other uses for this Dock alteration that I'm just not seeing?
I recently had a problem where the keys on my MacBook Pro keyboard did not work. The modifier keys and arrow keys worked, but the letters did not. Using an external keyboard worked fine.
It turned out that the problem arose from accidentally enabling mouse keys. It seems I had somehow pressed the Option key five times in a row. To fix, press the Option key five times in a row again, or go to the Universal Access System Preferences panel and disable Mouse Keys. You might also want to disable the check box to enable Mouse Keys by pressing Option five times.
I hate switching off the power on a hung system. As a last resort before doing that, when logging out or even Force Quit won't work, I've had some success with this method. Invoke Spotlight with Command-Space. Even if you don't see the search box appear, keep following these steps. Type Terminal and hit Return. With a bit of luck, you'll see a Terminal window open.
Log into Terminal as an administrator, for example: ssh firstname.lastname@example.org (replace admin with the short name of an administrator account, and mycomputername.local with your computer's Bonjour name (see the Sharing preference pane).
Enter the admin password when prompted. If you get a message that the system can't verify the identity of the computer and asking you if you want to proceed, type yes. Once logged in, you can try any Terminal command and see if it works. Usually, I just type sudo reboot and enter the admin password when prompted.
It's worth a try when it seems that nothing but a cold, hard, power-off restart will work.
There have been a number of reports that the Leopard Finder silently ignores your wish to eject disks and disk images, no matter if you click the Eject button in the Finder's sidebar, drag the disk to the Trash, or right-click and choose Eject. The only simple work around was using the hard disk utility.
I had the same problem with my MacBook Pro for the last couple of month -- and accidentally found a solution looking at the recent version of Onyx. In Onyx, you have the option to remove the Eject Disk menu item from the File menu of the Finder. It turned out that at some point in the past I had removed that item, and then forgot about doing so. Restoring the missing menu solved the above problem.
Of course, I do not know if this is of any help for other people with the same disk eject problem.
If you prefer being able to focus on one application at a time, you may find this hint useful -- it sets the Dock to automatically hide every application other than the one you're switching into. So when you click on Mail, for instance, the effect is as though you activated Mail and then chose Mail -> Hide Others (or pressed Command-Option-H).
To enable this switching mode, open Terminal and type these commands:
$ defaults write com.apple.dock single-app -bool TRUE
$ killall Dock
From now on, clicking on an application in the Dock will hide all other open apps while switching to the selected application. You will not see this behavior if you use Command-Tab to switch, or click directly on another application's windows. To disable the feature, repeat the above commands, but replace TRUE with FALSE. (Alternatively, you can delete the entry entirely with defaults delete com.apple.dock single-app.) Remember to restart the Dock as well.
For an easier method of implementing this feature, see this hint.
Spector is a package that takes periodic screen captures of your system. It then saves these as hidden files on your computer somewhere, and can be set up to email them to someone at set intervals. To check if you have Spector on your machine, type top into the Terminal (or load up the Activity Monitor). You're looking for a process called DriverSPD. If that process appears, someone has installed Spector on your computer.
To remove the Spector process (you need to be an admin user to do so), just go into /Library/StartupItems/ and delete LiloDS, DriverSPD, SystemStart, SystemStartState, and StartupParameters.plist. Log out and log back in, and DriverSPD should no longer appear in Activity Monitor. You'll also want to remove the snapshots/keylog files that Spector saves on your computer. In fact, if someone has installed this program on your computer, and you don't want them to know you found it, you may just want to delete certain snapshots, etc. Anyways, here's how you do it...
If you move the Dock from the bottom to the right side of your desktop, you may find that the icons on the right side of your Desktop become partially hidden underneath the Dock. This is both ugly and makes it more difficult to click on those icons (such as your hard drive's icon). What you want to happen, of course, is for the desktop icons to move over towards the left in order to make space for the Dock.
For some reason, Finder doesn't reset the icon grid on the desktop when the Dock is moved to the side of the screen. A quick Google search on this issue revealed nothing more helpful than the suggestion to set the Dock to automatically hide. But there is an easy way to get the Finder to move the desktop icons out from under the Dock.
Click on the Desktop, select Show View Options from the View menu, and slide the Grid Spacing slider around. As soon as you do this, the grid will be reset to respect the position of the Dock, and will move your desktop icons out from underneath the Dock. You can then put the slider back into the same position you had it before, and close the View Options palette.