Pick of the Week - Nov 10 [Show all picks]
Path Finder 5 - A feature-laden Finder replacement
Submit Hint Search The Forums LinksStatsPollsFAQHeadlinesRSS
12,000 hints and counting!

10.6: A workaround for an apparent low disk space bug System 10.6
Snow Leopard only hintThere seems to be a bug in 10.6 (including 10.6.1) that I stumbled on when I ran out of disk space.

The OS popped up the usual Free up disc space and/or force quit some applications warning. After freeing up over a gigabyte of space, and clicking the Resume button, nothing happened -- the app(s) remained paused. I deleted another four gigabytes worth of files on the disk, but to no avail. The only option seemed to be to force quit the apps.

The fix is fairly simple:
  1. Free up some disk space, or close some of the memory hogging apps that aren't paused so you can save your work.
  2. Open up Activity Monitor and find the paused processe(s). Their entries will be red so they are easy to spot, and they'll say (Not Responding) beside their names.
  3. Note the process ID (PID) of the offending application(s);
  4. Open up Terminal.app, and type kill -CONT processid, where processid is the number you noted earlier, then press Return.
This will return your frozen apps to your control, ready to save and quit your work.

[robg adds: I can't confirm the out-of-disk-space-bug, but this hint discusses how to pause and resume apps from Terminal using the kill command.]
  Post a comment  •  Comments (4)  
  • Currently 4.50 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (2 votes cast)
 
[1,750 views] Email Article To a Friend View Printable Version
10.6: Create an RTF-formatted link to current Safari page Web Browsers
Snow Leopard only hintTo copy a clickable hyperlink of the currently shown website from Safari (with the website title and its URL embedded in it) to the clipboard, in order to paste it somewhere else, you would have to: Open a rich text editor, drag the link from the Safari URL bar to the text editor, Control-click on the created hyperlink, and finally, click on Copy Link. This is tedious work. Safari should have a "copy hyperlink to clipboard" button.

Because it didn't, I wrote my own Service in 10.6 to get the job done. Here's how:
  1. Open Automator and create a new Service. In the Service Receives section, set the two drop-down menus to No Input and Any Application.
  2. Find and drag the Run AppleScript action into the work area.
  3. Paste the following AppleScript into the code box in the action item:
  4. tell application "Safari"
      set theURL to URL of document 1
      set theTitle to name of document 1
      
      set startEcho to "echo "
      set echoDelimiter to "'"
      
      set html_1 to "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">
      <html>
      <head>
        <meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">
        <meta http-equiv=\"Content-Style-Type\" content=\"text/css\">
        <title>"
      set html_2 to "</title>
        <meta name=\"Generator\" content=\"Cocoa HTML Writer\">
        <meta name=\"CocoaVersion\" content=\"1038.11\">
          <style type=\"text/css\">
            p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica}
          </style>
        </head>
      <body>
      <p class=\"p1\"><a href=\""
      set html_3 to "\">"
      set html_4 to "</a></p>
      </body>
      </html>"
      
      set echoCommand to startEcho & echoDelimiter & html_1 & theTitle & html_2 & theURL & html_3 & theTitle & html_4 & echoDelimiter
      set textutilCommand to " | textutil -convert rtf -inputencoding UTF-8 -format html -stdin -stdout"
      set pbcopyCommand to " | pbcopy -Prefer rtf"
      
      set entireCommand to echoCommand & textutilCommand & pbcopyCommand
      
      do shell script entireCommand
    end tell
    This AppleScript sends a string that contains the website title and URL in html format to the terminal program textutil. textutil converts that HTML string into an RTF-formatted string and sends it to pbcopy, which copies the string to the Mac OS clipboard.
  5. Save this Service with any name you like.
  6. Open System Preferences » Keyboard, and select Services in the left-hand column.
  7. Select the Service you just created, and define a keyboard shortcut for it.
Now, every time you press that shortcut, from any Services-aware application, a clickable hyperlink with the title and the embedded URL of the currently-active Safari tab will be copied to the Mac OS clipboard, ready to be pasted in any other application. This works great with an app that keeps track of your recent clipboard items.

[robg adds: This works fine in 10.6, and can be used in 10.4 and 10.5 as well, though not as a Service. Because textutil was added in 10.4, this hint won't work in older system releases.]
  Post a comment  •  Comments (22)  
  • Currently 1.75 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (4 votes cast)
 
[1,824 views] Email Article To a Friend View Printable Version
10.6: See more process info in top UNIX
Snow Leopard only hintI am an old timer and use top (instead of Activity Monitor) to keep an eye on my system.

I just notice that in Snow Leopard when you horizontally resize the Terminal (or xterm) window, top displays more information about the running processes -- new columns are added as the window grows wider. Use man top to get an explanation of what those extra columns display.

Another nice change is that the Process ID (PID) is now suffixed with - to indicate a 32-bit process, and a * to indicate a PowerPC process.
  Post a comment  •  Comments (6)  
  • Currently 4.29 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (7 votes cast)
 
[1,721 views] Email Article To a Friend View Printable Version
10.6: Display a summary of iCal events in Terminal Apps
Many people and companies use shared calendars to keep track of the time spent on projects. I wrote a Python script (free, open source) called icalreport to display monthly summaries of iCal events, including Microsoft Exchange calendars.

It has several command-line options to customize the output to fit your needs.

[robg adds: This worked as described in my testing. Just in case the original site ever vanishes, I've reproduced the code in the remainder of this hint, but check the link first for the newest version.]
read more (1,037 words)   Post a comment  •  Comments (4)  
  • Currently 4.50 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (4 votes cast)
 
[1,942 views] Email Article To a Friend View Printable Version
Translate outgoing destination ports UNIX
This is probably evident for Unix wizards, but I spent a whole morning figuring this out so I thought some of you might find it useful too.

I have a client app which does not permit specifying a non-standard destination port. In this example, it is an LDAP client which will only contact a host on the local network on the standard port 389. The LDAP server it is trying to contact is in the local network at 193.168.4.253, but listening on the non-standard port 712. So, I had to set up a port translation for outgoing connections. The code to achieve this is as follows (must be run with sudo privileges, or as root in a launchd startup daemon to make it persistent):
sysctl -w net.inet.ip.forwarding=1
ipfw add 01000 divert natd tcp from me to 192.168.4.253 389 via en0
ipfw add 01000 divert natd tcp from 192.168.4.253 712 to me via en0
cat > natd.conf << end
interface en0
reverse
same_ports
redirect_port tcp 192.168.4.253:712 192.168.4.253:389
redirect_port tcp 192.168.4.253:389 192.168.4.253:712
end
natd -f natd.conf
Specifically, what this does is enable ipfw forwarding, then set up that ipfw should pass all traffic to host 192.168.4.253 on port 389, and from host 192.168.4.253 port 712 to the natd daemon. natd gets launched as a daemon and is told to rewrite the outgoing connection to the host's port 389 to the "real" port 712. All returning packets from the host's port 712 are then translated back to the original port 389 expected by the client application.

[robg adds: I haven't tested this one.]
  Post a comment  •  Comments (4)  
  • Currently 4.50 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (2 votes cast)
 
[1,687 views] Email Article To a Friend View Printable Version
Control volume of attached digital Dolby surround device Other Hardware
Some people are speaking from the "living room of the future:" A television where you can read your emails and surf the web, listen to your music everywhere in your house, and also control everything everywhere. For me, all solutions I've seen until today are not very user friendly. Surfing the internet with the television remote control, problems with all the different video codecs when playing media files on the TV screen, etc.

I've had my own solution for the last three years: A Mac mini (small, quiet, powerful enough) attached to a big LCD TV, a Dolby Surround system, Bluetooth keyboard and mouse, some AirportExpress Base Stations for iTunes access in other rooms and an iPod touch to control them, eyeTV, etc.

There was one small problem with my setup, though: With the Mac connected to an audio device using the digital fibre connector, there's no way to control the system output volume. Pressing the volume keys results in this bezel. From that, I presume that the digital output only transports the signal information and no volume information.

So I had to control the sound volume with an additional remote for the digital surround device. I also had to control the power for the surround device and the LCD TV via that remote. This was very annoying, as I had more than enough remotes on my couch table already.

Finally I found a low-cost solution some weeks ago, and maybe it's worth sharing -- I don't think I'm the only one who's using a Mac as a real digital hub.

read more (699 words)   Post a comment  •  Comments (5)  
  • Currently 5.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (3 votes cast)
 
[2,266 views] Email Article To a Friend View Printable Version
10.6 Server: Set the appropriate Software Update Server OS X Server
Snow Leopard only hintWith Mac OS X Server 10.5 and below, Software Update Server only had one catalog of updates -- thus, you could run a command like this one, and have it point Software Update to your server:

defaults write /Library/Preferences/com.apple.SoftwareUpdate CatalogURL "http://Server.local:8088/"

With Mac OS X Server 10.6, Apple has divided the catalog file into three separate catalogs: one for 10.4, one for 10.5, and one for 10.6. Each is a separate URL, and if you set the wrong catalog for the OS, you'll get the (incorrect) message that your software is already up-to-date. Having three separate scripts is a hassle, though, and is prone to error.

On the Hints Forums, users tw and Hal Itosis were instrumental in crafting this AppleScript. It checks the OS that you're currently running, and sets the appropriate Software Update Server URL. Change Server.local to your server's address.
read more (154 words)   Post a comment  •  Comments (4)  
  • Currently 3.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (2 votes cast)
 
[2,719 views] Email Article To a Friend View Printable Version
10.6: Do more with icon previews Desktop
In a Finder window using Icon view, including the Desktop, if the icon size is set to 64x64 or greater, .pdf, .key, and .ppt files will have forward and backward arrows overlaid when you mouse over their icons. Clicking these arrows allows you to page through the document one page at a time.

Previewing the document with Quick Look, viewing a different page, and then closing Quick Look changes the icon view preview to the new page. You can then continue to page through the document with the overlaid forward and backward buttons from the new location.

One caveat: previewing with Quick Look only updates the icon to the new page if you used the overlaid forward or backward buttons on the icon at least once before opening Quick Look.

Taking focus off the icon returns the icon preview to the first page of the document.
  Post a comment  •  Comments (1)  
  • Currently 4.20 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (5 votes cast)
 
[1,474 views] Email Article To a Friend View Printable Version
Cure for Microsoft Office files not showing in Spotlight Apps
Some time ago, after installing a Microsoft Office 2008 service pack update, I noticed that many of my Excel documents were no longer indexed as part of the Spotlight database; Spotlight search results for obviously-known content was coming up empty.

I traced the problem to the fact that I still had Microsoft Office 2004 installed (because I need macro capability), and the old PowerPC version of Microsoft Office.mdimporter was sitting in my ~/Library/Spotlight folder. Many mdworker console messages were indicating that only a PowerPC importer plug-in was found, thus many Office documents weren't getting indexed. This was happening even though I also have the Intel version of Microsoft Office.mdimporter in my system-level Library.

The solution was to trash the PowerPC version of this file, and trash the /.Spotlight-V100 file, which forced a total re-indexing. The system then used the Intel version of the Spotlight importer, and all my Office documents are once again indexed.
  Post a comment  •  Comments (2)  
  • Currently 5.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (3 votes cast)
 
[1,715 views] Email Article To a Friend View Printable Version
Update the Software Update Server without re-downloading OS X Server
I had the need to update a server that was acting as a Software Update Server. I knew that the machine had the update on it, but was unsure of how to get it to see the locally-hosted update. If you open Terminal and issue this command...
open /usr/share/swupd/html/index.sucatalog
...then Software Update will launch, looking at the localhost -- no need to re-download the update from Apple.
  Post a comment  •  Comments (3)  
  • Currently 5.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (1 vote cast)
 
[1,527 views] Email Article To a Friend View Printable Version