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

Check filtering software if Software Update is failing System
You may have a problem were OS X's Software Update reports that your software is up to date, even when you know that is just not the case. There are hints about this on the web that discuss removing the com.apple.SoftwareUpdate.plist file for the affected user, or trying to update with a different user or new user account to resolve the issue. If that all fails, however, you may need to consider that internet filtering is the cause.

This could be done by an ISP, or by the local host that you happen to be using to connect to the net. I've found that -- assuming you can ask for changes in the filtering program -- adding swscan.apple.com and swquery.apple.com to the filter's allowed exceptions list solved the problem.
  Post a comment  •  Comments (0)  
  • Currently 1.67 / 5
  You rated: 4 / 5 (9 votes cast)
 
[6,281 views] Email Article To a Friend View Printable Version
Easily change a filename while the file is being edited System
Say you're working in Pages or TextEdit, but you want to change the filename of the document you're editing. In the past, I've done this with File » Save As, but then you wind up with two documents. Recently, I (re)discovered another cool way to rename an active file, one that leaves you with one file, and demonstrates the real-time connection between the file system and the app.

As an example, consider you're editing in TextEdit. Command-click on the title of the current window to see the pop-up menu attached to the title. From there, open the folder containing the file; this will open a Finder window showing that folder. In the opened folder, rename the file and close the window. When you go back to the TextEdit document, you'll see in the title bar that the filename now reflects the renamed file.

[robg adds: This has worked for, well, a really long time, but it's something that those new to the platform may not be aware of.]
  Post a comment  •  Comments (14)  
  • Currently 2.30 / 5
  You rated: 5 / 5 (10 votes cast)
 
[13,288 views] Email Article To a Friend View Printable Version
Enable SpeedStep support on any capable Intel CPU System
As described on Wikipedia, SpeedStep "is a trademark for a series of dynamic frequency scaling technologies (including SpeedStep, SpeedStep II, and SpeedStep III) built into some Intel microprocessors that allow the clock speed of the processor to be dynamically changed by software. This allows the processor to meet the instantaneous performance needs of the operation being performed, while minimizing power draw and heat dissipation."

Apple implements SpeedStep on certain Macs, but not all of them (and if you've built your own Mac, you may not have any SpeedStep support). Here's how to enable SpeedStep on any Mac: Use the xnu speedstep kernel extension. Just download IntelEnhancedSpeedStep.kext.1.4.5.zip, then copy IntelEnhancedSpeedStep.kext into /System/Library/Extensions. Don`t forget to repair permission (in Disk Utility) when done, then reboot your Mac.

Now we can see dynamic frequency and power changes. Also see sysctl -a | grep kern.cputhrottle from Terminal, and read the AutoThrottle wiki for more information. There you'll find the command sysctl -w kern.cputhrottle_targetload=XY. However, you can also edit the TargetCPULoad parameter in /System » Library » Extensions » IntelEnhancedSpeedStep.kext » Contents » Info.plist file.

[robg adds: I haven't tested this one, and would categorize this hint as experimental -- use at your own risk!]
  Post a comment  •  Comments (15)  
  • Currently 1.73 / 5
  You rated: 3 / 5 (11 votes cast)
 
[38,731 views] Email Article To a Friend View Printable Version
See Software Update notifications as a non-admin user System
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):
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<!--
    updateCheck - Copyright 2008 Sven Anderson sven_at_anderson.de

    This is an applescript based launch agent, that checks once per day
    for available software updates. If there are any, it announces them
    as a Growl notification or - if it is not installed - as a system
    dialog. This agent also works for users without administrative rights.

    To install it, move this file to ~/Library/LaunchAgents/ and
    re-login.

    Installing Growl is highly recommended: http://growl.info/

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

For a copy of the GNU General Public License see
   http://www.gnu.org/licenses/

-->
<dict>
    <key>Label</key>
    <string>de.anderson.sven.updateCheck</string>
    <key>LowPriorityIO</key>
    <true/>
    <key>Nice</key>
    <integer>1</integer>
    <key>ProgramArguments</key>
    <array>
        <string>osascript</string>
        <string>-e</string>
        <string>
set theList to every paragraph of (do shell script "softwareupdate -l")
set updates to ""
repeat with anItem in theList
    if anItem starts with "   * " then
        if updates is not "" then
            set updates to updates &amp; return
        end if
        set updates to updates &amp; (characters 6 thru -1 of anItem)
    end if
end repeat
if updates is not "" then
    tell application "System Events"
        set isRunning to (count of (every process whose name is "GrowlHelperApp")) &gt; 0
    end tell
    if isRunning then
        tell application "GrowlHelperApp"
            register as application "UpdateCheck" all notifications {"Update Available"} default notifications {"Update Available"} icon of application "Software Update"
            notify with name "Update Available" title "Software Update available" description updates application name "UpdateCheck" sticky yes
        end tell
    else
        tell application "Finder"
            ignoring application responses
                display dialog "Software Update available:" &amp; return &amp; updates with title "Software Update available" buttons "OK" default button 1 with icon file "System:Library:CoreServices:Software Update.app:Contents:Resources:Software Update.icns"
            end ignoring
        end tell
    end if
end if
</string>
    </array>
    <key>RunAtLoad</key>
    <true/>
    <key>StartInterval</key>
    <integer>86400</integer>
</dict>
</plist>
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:
$ launchctl load ~/Library/LaunchAgents/de.anderson.sven.updateCheck.plist
I've been using this code for over a year now without any problems, so I decided to make it available to everybody.
  Post a comment  •  Comments (20)  
  • Currently 1.88 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (8 votes cast)
 
[12,559 views] Email Article To a Friend View Printable Version
Eject nearly any disk via AppleScript System
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
    beep
  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"
        end repeat
      end tell
    end if
  end if
end tell
(* 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.]
  Post a comment  •  Comments (1)  
  • Currently 1.38 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (8 votes cast)
 
[2,605 views] Email Article To a Friend View Printable Version
How to get 5.1 audio out of AAC-surround-encoded audio System
[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).
read more (591 words)   Post a comment  •  Comments (22)  
  • Currently 2.62 / 5
  You rated: 1 / 5 (13 votes cast)
 
[86,313 views] Email Article To a Friend View Printable Version
Find apps in Spotlight even when using 'wrong' language System
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.

[robg adds: I haven't tested this one.]
  Post a comment  •  Comments (3)  
  • Currently 1.57 / 5
  You rated: 5 / 5 (7 votes cast)
 
[7,198 views] Email Article To a Friend View Printable Version
Lock screen with password on a per-use basis System
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.
--This application will require the password to wake from
--sleep and then start the screen saver. Once the screen
--saver is finished running, the password is no longer required

global screenSaverOn
on run
    -- Sets computer to require a password
    tell application "System Events"
        tell security preferences
            set require password to wake to true
        end tell
    end tell
    -- Launches the screen saver
    tell application id "com.apple.ScreenSaver.Engine" to launch
    set screenSaverOn to true
end run

-- Polls the system to see if the screen saver is running
on idle
    tell application "System Events"
        -- Polls the system to see if the screen saver is running
        set screenSaverOn to (name of processes) contains "ScreenSaverEngine"
    end tell
    if not screenSaverOn then
        -- Once screensaver is turned off, prompts user to return to not require password. Without this, someone could simply wake the screensaver, cancel the password prompt, and then wake the screensaver again to access the session.
        display dialog "Return to no password required to wake?" buttons {"No", "Yes"} default button 2 giving up after 30 --Change this number to adjust time before prompt disappears
        if the button returned of the result is "Yes" then
            tell application "System Events"
                tell security preferences
                    set require password to wake to false
                end tell
            end tell
            tell me to quit
        end if
    end if
    
    -- delays 5 seconds before next check to reduce CPU load
    return 5
end idle

-- Allows script to be quit cleanly as when scheduled shutdown or logout occurs.
on quit
    continue quit
end quit
[robg adds: I haven't tested this one.]
  Post a comment  •  Comments (28)  
  • Currently 1.89 / 5
  You rated: 4 / 5 (9 votes cast)
 
[14,250 views] Email Article To a Friend View Printable Version
Reclaim drive space by deleting iPod/iPhone firmware System
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).

The firmware files are located here:

~/Library/iTunes/iPhone Software Updates
~/Library/iTunes/iPod Software Updates

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).

No great hint, but still nice to know.
  Post a comment  •  Comments (13)  
  • Currently 2.81 / 5
  You rated: 5 / 5 (16 votes cast)
 
[34,651 views] Email Article To a Friend View Printable Version
Securely empty trash via AppleScript after 'n' days System
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: While trashtimer runs a constant process in the background, Compost does that and even costs money (and I don't like that ;) ). So I decided to write my own script.
read more (402 words)   Post a comment  •  Comments (9)  
  • Currently 1.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (6 votes cast)
 
[11,360 views] Email Article To a Friend View Printable Version