- All Webdevelopment
- All Software
- All Technology
- All Macintosh
- All News
- All Apple
- All Mac-News
- All Miscellaneous
- All all available Feeds
- Use a third-party APC UPS management tool for more control
My APC UPS beeps whenever the power fails. If this happens at night, the beep is loud enough to wake people. The beep can be disabled by software in Windows, but not in the Mac version of PowerChute Personal Edition. The Mac version provides features that Mac OS X already provides: shutdown timers for any UPS connected via USB.
I stumbled across the open source Unix app Apcupsd which gives me all the features I want from the Windows version of PowerChute: beep settings, battery change dates, and so forth. Furthermore, it can send email notifications for significant events. As someone who runs an old G4 as a home server, this is very nice to know.
After downloading and installing Apcupsd is installed, run this command from Terminal: sudo /sbin/apctest. This will display a simple text-based menu, and it's self-explanatory. If you get an error message that reads Cannot find UPS device..., it could be because:
...
- 10.6: Avoid a DHCP issue with Dual Band Airport Extreme
While playing with Snow Leopard Server's various services, I noticed DHCP wasn't working. Actually, it worked at first for my laptop, then it stopped. Then I noticed the iPhones were not able to receive IPs either. I thought it was something with my server, so I drew a network diagram, and it gave me an idea.
I have an Internet modem connected to a Netgear router, to which the AirPort Extreme (Dual Band) is connected. My Snow Leopard Server machine is connected via the AirPort, as are all other clients. My drawing showed that when my Server was connected on the 5Ghz side, and the DHCP clients were connected on the 2.4Ghz side, DHCP would not work.
I confirmed this by splitting the dual band and connecting server and all clients on the 2.4GHz channel only. Set up this way, DHCP worked great; problem solved! I'm not sure if that makes perfect ...
- Use Terminal to open Screen Sharing connections
The open command in Terminal will, when given a vnc://1.2.3.4 (or vnc://hostname) protocol argument, open the Screen Sharing app and connect to IP address 1.2.3.4 (or hostname).
[robg adds: I was certain we'd covered this tip somewhere before, but all I can find is a brief mention in this comment to this hint about dict:// URLs.]
- Create a PDF from an Office document using Google Docs
A few days ago, I was using a desktop at home to try to print a .docx document (from Word 2008). Unfortunately, the home machine had a much older version of Office, and it couldn't open the .docx format.
As a workaround, I uploaded the .docx document into Google Docs, edited it a little bit, and then clicked Print. This converts the document into a PDF, so all you need to do is save that window to create a local PDF. (This also works if you create a document using Google Docs and click Print.)
[robg adds: Another way to do this would be to send the .docx file through Microsoft's Open XML File Format Converter. After conversion, you could then open the document in older versions of Office.]
- 10.6: A workaround for a Boot Camp x64 installation issue
Today I installed Windows 7 Ultimate x64 via Boot Camp on my 2007 MacBook Pro 2.4GHz machine. I was stumped when I couldn’t install the Boot Camp drivers from the 10.6 DVD in Windows.
I tried several different approaches, but every single try ended with the message Boot Camp x64 is unsupported on this computer model when launching the Boot Camp setup app. I could also not install the 3.1 update. The only visual indication was Nvidia drivers installing, and afterwards, it would simply quit while all the time there was no reference that I was actually about to install Boot Camp.
Knowing that I didn’t do anything wrong, I didn’t want to give up and finally found a solution. Here's a step by step guide:
Boot into Windows 7 and insert your 10.6 DVD
Right-click on Start » Programs » Accessories » Comman...
- Secrets of the proxy icon in a program's title bar
You can perform many useful tasks using the icon in the title bar of many OS X applications (known as the proxy icon), in both Apple-bundled (TextEdit, Preview, etc.) and third party (BBEdit, Path Finder, and numerous others) applications.
For this to work, you need to be using a file that has had its latest changes saved (otherwise, the icon will be grayed out). Normally, when you click-and-drag on the title bar of a window, you just drag the window around. However, if you click-and-hold directly on the proxy icon, and optionally add a modifier key, you can access other useful functions. Here's what happens in most applications, including TextEdit and Preview:
Drag icon: If you drag the proxy icon to a Finder window or your Desktop, an alias to the open file will be created at the location where you drop the icon.
Option-drag icon: Hold down the Option (Alt) key prior to dragging, and you'll create a copy instead of an alias.
Command or Control: ...
- Select entire paragraphs while editing text on the iPhone
I haven't seen this documented anywhere, but I discovered that you can select an entire paragraph of text by quadruple-tapping on it when entering text in the iPhone. For instance, when replying to an email, you can quadruple-tap on paragraphs in the quoted reply, then cut them.
You have to do it pretty quickly, and take care not to move your finger too much between taps. Try it a few times, though, and you'll get the hang of it. And yes, I know it might sound weird, but I actually find it quite useful sometimes.
[robg adds: This works, and isn't covered in the iPhone user's guide.]
- Modify one iWeb project on multiple different Macs
Here's a simple workaround that will let you modify your own iWeb website from multiple locations and machines: Carry the original files on a USB stick, and trick the local machines into using the USB stick instead of the local file by using an alias. Important to make this workaround work is that the alias file is set with its 'Open With' set to 'iWeb.' Detailed steps are below.
This workaround assumes that the data for all websites created by your machine are on your USB stick. (For management of multiple websites, see this older hint).
First, generate your website with iWeb. iWeb stores all information in your user's Library » Application Support » iWeb folder, in a file named domain.sites2. Navigate to this file in the Finder, then:
Copy the file domain.sites2 to a USB stick.
Create an alias of domain.sites2 (will be called ...
- Dynamically attach files to iCal events using tags
This hint shows how to utilize OpenMeta tagging to attach a set of multiple, often-changing files to an iCal event. Although it may work with other tag managers out here, I'm using TagoMan2 for this purpose, which allows me to refer to a tag using a tag:// URL scheme:
Edit an event in iCal
Enter tag://Name_of_tag into the URL field.
Click on the link you just created; this will open up an empty window you can drag your files into.
Drag in your files.
The way this works is that TagoMan will associate a tag (e.g. Name_of_tag) to every file you drag in. When you click on the link again, TagoMan will search for all files using this tag -- any newly-tagged files that match Name_of_tag will show up in the list. Tags are Spotlight-aware, and this tag:// URL may be used in any app which support URLs. ...
- 10.6: See grammar suggestions on hover
Snow Leopard has an built-in grammar checker (in Cocoa and other certain apps) that will place green dotted lines under any possible grammatical errors it detects. (You may have to enable this first, in the program's Edit » Spelling and Grammar » Check Grammar With Spelling.) However, accessing the corrections panel using Control-Click » Spelling and Grammar » Show Spelling and Grammar has always seemed cumbersome.
Now I've discovered that simply hovering the mouse over the underlined word pops up a tool tip description of the error.
[robg adds: The first option in the contextual menu will be the replacement suggestion, but the Spelling and Grammar box will typically have more information. Given you probably want to make the suggested change anyway, I prefer the contextual menu, so I can see and replace; the to...
- Check the status of the online Apple Store via shell script
Sometimes, like today, I'm particularly interested in the Apple Store's status...as in, when is it back up so that I can order whatever it is I'm waiting to order. While sitting around pressing Command-R this morning, I figured there must be a better way. After a few minutes with curl and GeekTool, I had the solution.
Because I didn't have very much time to implement this trick this morning, I just created a new 'Shell' Geeklet in GeekTool, with the refresh set to every five seconds, that showed the output of this command:
curl -s http://store.apple.com/us | grep backsoon | grep australia
Note that the above is specific both to the US Apple Store, and to the current version of that store. You may have to modify it for other geographies, or for future store site changes. Basically, what the command does is grab the Apple Store page via curl, suppresses the normal output (-s...
- Enhance readability of sites with very small text on the iPhone
Sometimes I visit a website on my iPod Touch that is almost unreadable due to the expected size of a screen on a desktop computer. Even when zoomed in, some sites have the text continue off screen, meaning I'd have to scroll left and right to read a whole line of text.
I have MobileMe and sync my bookmarks between computers and my iPod Touch. And one day I happened across just such a too-small site. Frustrated, I decided to just try my Readability bookmarklet, and was happy to see it worked!
You'll need either an iPhone or iPod Touch and a computer that you sync your device to via USB or MobileMe. From a computer, navigate to Readability and set your desired options. I like Inverse, Extra Large text, and Extra Narrow margins, but pick what you like. Drag your bookmarklet to your bookmark bar, as the site instructs. (You can move it to your Bookmarks menu, anywhere, or into the sidebar of Safari's Bookmark ...
- Set photo titles to picture capture date in iPhoto
The titles iPhoto chooses for just-added photos is the annoying "IMG_nnnn" serial number from the camera. This AppleScript simply takes the date of the photo (EXIF info that iPhoto knows very well) and uses it as the photo title. The format is: yyyy-mm-dd-hh.mm.ss, so it's a bit easier to read than the ISO version, but also easily sortable.
Here's the code:
tell application "iPhoto"
-- activate -- bring iPhoto back to front
copy (my selected_images()) to these_images
if these_images is {} then error "Please select some images before using this script."
set thename to ""
set thepaths to ""
set thedates to ""
repeat with i from 1 to the count of these_images
set this_image to item i of these_images
--set this_file to the image path of this_image
set thename ...
- Create Growl alerts for Address Book contacts' birthdays
I have a lot of people in my Mac OS X Address Book. I thought it would be a nice idea to have the system check the birthdays in Address Book, and inform me of any forthcoming birthdays via a Growl notification. So I've created an Apple Script to do that (with a lot of help from a few other peoples).
First, install Growl if it isn't installed. Also install the Terminal growlnotify command, which you'll find in the Extras folder on the Growl disk image. Next, copy and paste the following into AppleScript Editor:
delay 0.5
set isRunning to 0
set timer to the time of the (current date)
repeat while isRunning = 0
tell application "System Events"
set isRunning to ¬
((application processes whose (name is equal to "GrowlHelperApp")) count)
...
- Avoid a potential issue with voice control on iPhone 3GS
If you have entire albums, artists, or playlists excluded from shuffling in iTunes (The 'Skip when shuffling' flag is set), your iPhone 3GS will fail to play these albums, artists, or playlists when you select them using Voice Control if it has shuffle play mode enabled.
The manner in which it fails makes it seem as if something is seriously amiss (hence this hint): It acknowledges your voice input, indicating that your selection is about to play (e.g., 'Playing album Avatar'), but then returns to whatever had been playing before. If nothing had been playing before you gave the voice command, the iPhone will remain resolutely silent after acknowledging your input.
The solution to this 'issue' is, of course, to simply to turn off shuffle play mode. Unfortunately you can't do this with a voice command (as far as I know).
- Experiment with GIMP's new single window mode
Are you curious, like me, about the new Single Window Mode (most excellent; see this article at Ars for more details) available in the newest unstable 2.7.x GIMP releases? Well, sadly, the final and stable GIMP 2.8 release won't come out before the end of this year, and there are still no experimental 2.7.x binary releases available for Mac OS X (via X11). One could always try to compile everything from source, but that might be quite complicated and time-consuming.
So, let's look at another, definitely easier way of running GIMP 2.7.x on Mac OS X: not (semi) natively through X11, but through virtualization. First of all, we need a virtual machine with the latest Ubuntu 9.10 (Karmic), or even 10.04 (Lucid, in Alpha at this time) installed: you can create a 32- or 64-bit Ubuntu VM in...
- Use one bookmark to load different versions of a site
I have several sites that I access on both my iPhone and desktop, so I like to have quick access to them via the Bookmarks Bar. However, these sites have different versions for the desktop, for mobiles, and, in some cases, yet another version for the iPhone. Usually, the full version doesn't work so well on the iPhone, and the iPhone version is undesirable on the desktop.
Instead of creating a plain bookmark, a little Javascript can make a bookmark context-sensitive, and allow you to have one bookmark that opens the right version of a page, depending on which platform you're browsing from. The basic idea is to use some client-side Javascript to check the browser's platform (a.k.a. operating system), and then tell the browser to access a URL based on that check.
The code looks like this:
javascrip...
- Poll updates - iPad results and new Intel/PowerPC survey
Two poll updates today. First, I've posted a new poll about the mix of Macs you're presently using -- Intel (via Apple), Intel (via build-it-yourself), PowerPC, or some mix of the above. I'm curious to see not only the mix of Intel and PowerPC, but how many are using self-built Intel powered Macs.
The second poll update is that the iPad interest poll has now closed, with just over 10,000 votes. Of those who voted, nearly 44% are planning on buying iPad 1.0 when it comes out in April, with a virtual tie (two votes' difference) between then cheapest and the most expensive versions for the most-popular spot (11.3% each). In total, Mac OS X Hints readers will be buying at least (as the poll didn't allow for more than one purchase) $2.92 million worth of iPads!
An additional 29% claim they'll buy the second gen...
- Disable AirPort when Ethernet cable is connected
At my office, I needed to find a way to turn of the wireless network when someone plugged in their network cable. I also did not want them to be able to turn the wireless network back on until the network cable was unplugged. I came up with the fallowing solution.
I created a launchDaemon called com.companyname.ethernetmonitor, and saved it in /System » Library » LaunchDaemons:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.companyname.ethernetmonitor</string>
<key>ProgramArguments</key>
<array>
<string>/Library/Scripts/CompanyName/turnOffAirp...
- Clean .DS_Store, .Trash, and ._resources files prior to copy
Frequently we need to clean a directory before zipping it or copying it to an external USB drive to be used by Windows or Linux users.
Apple Finder has the custom of populating directories with those unavoidable .DS_Store files, volumes with .Trashes, and some files (especially pictures) with ._resources. The following interactive script will safely remove these files prior to copying.
#!/bin/sh
# bash script to clean (delete) Finder .DS_Store, .Trashes and ._resources
# Use cleandsstores.sh
# juanfc 2010-03-06
if [ $# != 1 ]
then
echo "ERROR: use\n\t`basename $0` dirtoclean"
exit 1
fi
res=`find "$@" \( -name ".DS_Store" -or -name ".Trashes" -or -name "._*" \) -print`
if [[ -z $res ]]; then
echo "nothing to delete"
exit 0
el...
Feed cached for the next hour.

