I use Mac OS X while logged in as a non-admin user. The problem with this is that the Software Update notification only appears if I am logged in as a user with administrative rights. In a real multi-user environment this makes sense, because the ordinary user should not be confused with things he's not responsible for.
But what about the situation with the typical single user machine, where the owner uses a non-admin account for normal work? (And everybody should do so!) In this case, the user is the administrator, although he or she is using a non-admin account. In this very common case, the user should get the software update notifications so he/she can react to them. However, even if the Check for Updates option is selected in the Software Update panel of System Preferences, there will be no notifications. You can argue if this is a bug or not, but it's how it works.
To solve this problem, I wrote a little AppleScript (in fact, it's embedded into a launchd plist file, so you only have to care about one file) that checks once per day if there are any software updates available. If there are any, they are displayed in a nice looking Growl notification, if Growl is installed (highly recommended!). Otherwise, they show up in a standard system dialog. Here's the code (note that the latest version can be found in this post on my blog):
Save the above code as de.anderson.sven.updateCheck.plist into your user's Library/LaunchAgents folder (create this folder if necessary). Then logout and login, or enter the following command in the Terminal, to activate the code:
I'm a very keyboard-based person; I use a keyboard shortcut whenever I can. David Pogue tells of KIAFTMA -- the Keyboard Is Always Faster Than the Mouse Association. So the fact that the Eject key is restricted to the optical drive frustrates me.
To solve the problem, I created an AppleScript to make this easy for me. It calls on the disk powers of System Events and Finder; that way, you can eject any disk (except volumes over intranets like a home network) with a keystroke or two. Here is the code I used:
tell application "System Events" -- I don't target the Finder
set diskNames to every disk -- gets the list
set diskCount to count disks -- this is important for list 'triage'
if diskCount = 0 then -- if an empty list
else if diskCount = 1 then -- if one item to eject
tell application "Finder" to eject (item 1 of diskNames) -- gets the first - and only - item of diskNames; Sys Events cannot eject disks; I could have added a line before
else if diskCount > 1 then -- if 2 or more items to eject
set disksToEject to choose from list diskNames with prompt "Select a disk to eject:" OK button name "Eject" with multiple selections allowed
if disksToEject is not false then -- if you didn't cancel; this avoids the system and you confusion
tell application "Finder"
repeat with theDisk in disksToEject -- every disk you chose
eject theDisk -- duh!
-- a whole lot of "end blocks"
(* Ejector by KOMPILEsoft *)
[robg adds: I tried testing this one, but I can't get it to work on my Mac. It works fine on the author's Mac, though, so I'm publishing it under the assumption it's something about my machine. Please post your experiences.]
[robg says: The following hint is presented as it was submitted. As noted in the comments by the hint's author, the introduction is misleading -- your Mac can do real surround sound, assuming the source has an AC3 soundtrack. However, what the author then goes on to describe explains how to convert certain AAC-surround-encoded files to AC3 mode for true surround playback.
I've chosen to leave the hint online, as the hint (and moreso, the comments) contain a wealth of useful information. Just take the intro to the hint with a grain of salt, as it's not the whole truth. I have also modified the title of the hint to more accurately reflect what it's about.]
Your Mac can not do real surround sound from its built-in optical audio port; in fact, not even your Apple TV can. "But Wait!" you say, "Yes it can, Apple even advertise surround sound as a feature of the Apple TV!" or "I can play a DVD and I'm hearing surround sound."
Well, the truth lies somewhere in between these two extremes. First, the Apple TV. Apple supply media to the Apple TV with one of two different options for the soundtrack. It sometimes uses a stereo soundtrack that uses Dolby ProLogic to do surround sound. This isn't "true" surround sound, it's surround information matrix-encoded into a regular two-channel audio stream, and done extremely cleverly.
Other times, and more often on the HD content, it is actually a real 5.1 surround soundtrack, but it's in AAC format. Your surround receiver probably can't decode AAC, and at any rate, the Apple TV won't send it as AAC, it decodes it, mixes it back up as a stereo soundtrack (using Dolby ProLogic) and outputs that. Either way, you're hearing Dolby ProLogic, not Dolby Digital.
Now, for the Mac. Under a certain set of circumstances, your Mac can output a surround stream from the optical output that a surround receiver can decode as proper surround -- this is if the media file you're using already contains an AC3 encoded soundtrack. AC3 is the codec that Dolby Digital uses, so if you've already got a Dolby Digital soundtrack, and your optical port is configured properly (as a digital passthrough), then you may get the AC3 stream output through the optical port, and your surround receiver decodes it. You will have real surround sound from this setup.
If you're watching media that uses, for example, an AAC-encoded multi-channel soundtrack (most of the Apple HD trailers are like this) then it will be like the Apple TV situation above -- your Mac can't send the AAC stream out the audio port, as it's only a two-channel device, so QuickTime player (or VLC or...) mixes it down to stereo and outputs this. If you're lucky, it'll be Dolby ProLogic; if you're not, it will be plain old 2.0 stereo.
Well, after a decent amount of research and tweaking, there is a solution to this problem. I wish you the best of luck getting this to work on an Apple TV, though. It works perfectly on my Mac mini, and the only downside is the manual configuration that needs to be performed.
This is going to be pretty heavy going, and it gets quite technical. If you're looking for a quick fix, you're not going to find it here; at the moment there is no easy solution. What solution there is, we can thank the author of AC3Jack (Jesse Chappell), and the authors of Jack OS X (Stephane Letz, Johnny Petrantoni and Dan Nigrin).
Sometimes I will try to find a program using Spotlight with the wrong input method selected (yes, I can't touch type). An easy way to solve this is to log in as an administrator, and put the app's name, in your often-used language, into the app's Spotlight comments box (press Command-I with the app selected to see the comments box).
Type the app's name as if you were typing in English. So for Mail, a Japanese language user would enter まいl ; a Greek language user would enter μαιλ, etc.
I like to be able to lock my computer with a password, however, I don't like to have the screensaver require a password every time it is turned on. I have found the Lock Screen from the Keychain menu item to be buggy, and I don't like the extra clutter in my menu bar for just the one function.
Hunting around, I couldn't find anything that did quite what I wanted to, so I wrote this AppleScript to allow you to lock the screen. Then, when you come back from that locked session, it returns to normal screensaver functionality. Simply paste this code into Script Editor and save it as a Stay Open application.
Here's a quick and painless way to regain some drive space. When iTunes downloads a new firmware for your iPod or iPhone, the older ones do not get deleted. Since they are quite big (for the iPhone, at least -- about 250MB each for my 2G iPhone), you can easily free up more than 1GB of drive space by deleting the older ones (which you usually won't need anyway).
Just check the file names for the version numbers, and delete the older ones. If you're unsure, you can delete all of them, as iTunes will then re-download the newest one only when it's needed (i.e. a restore of an iPhone).
I'm fairly new to the OS X world, and noticed that I kept forgetting to empty my trash. That's because, with Windows, I got used to using Shift-Delete, which deletes immediately. I figured that it's better to hold on to those files a few more days before throwing them out, though, so I found my self in need of a script to do this.
I started to look around and found two scripts here on this site:
Although these are very useful scripts, I wanted a script that deleted on the basis of time (like the first one), but does not need to run (the first one needs a cron job) when it's not needed (it's fast, but still..). The limitation of not running unnecessarily rules out these two applications as well:
I recently found myself wanting to securely delete a non-encrypted copy of my home directory. No big deal, I thought: I moved the copy to the trash and chose Finder » Secure Empty Trash. After that, I left my MacBook running and returned after a while ... only to find 96,000 files still left. I watched the progress for a bit, and counted roughly one file per second. I did the math and found ... too long!
So I chose the following route: I deleted the file in the Finder, emptied the trash the usual way, and then erased empty disk space with Disk Utility. This did the trick in half an hour.
I chose the fastest method in Disk Utility, i. e. overwriting only once. But frankly, except for the most paranoid this should be safe enough. (Wright, Kleiman and Sundhar have thoroughly debunked the myth about having to overwrite files several times).
It might not even be that the Finder is really inefficient in what it does, but that its default is possibly overwriting seven or 35 times. So changing that default (hidden prefs, anyone?) could then actually make the Finder faster for that purpose than Disk Utility.
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.