Mac OS Hints

10.6: Automate the creation of ISO images

Mac OSX Hints - 12 hours 33 min ago
I love Disk Utility, however, it does not directly support the creation of ISO 9660 images. It can create CDR images or CD/DVD master images. Those can be renamed to .iso files and are supported by most software. But that's inconvenient to say the least.

Some searching revealed that you can create ISO images using the Terminal through hdiutil. The Terminal command is:
hdiutil makehybrid -o ~/Desktop/Diskimage.iso ${diskName} -iso -joliet

However that still leaves things complicated. So I put this in Automator by adding the 'Run Shellscript' action. echo -n `date "+%Y-%m-%d - %H:%M:%S ->"` >> ~/iso.log echo "Starting ISO creation" >> ~/iso ...


Categories: Mac OS Hints

Use Transmit to deal with MobileMe's iDisk

Mac OSX Hints - 12 hours 48 min ago
Accessing iDisk through Finder is, in the best case, slow and unreliable. I've found that Transmit (Panic Inc.) is a fast, reliable and easy substitute to Finder. Everywhere you can find opinions against using iDisk to synchronize data or to hold working copies; however, MobileMe has 20Gb of available capacity I wanted to use. After searching a lot, I have found that Transmit has native support for MobileMe (amongst others), lots of features, it is very fast and easy to use.

These hints are focused on basic iDisk usage, i.e. get you up and running in short time:
  • Synchronizing folders: Go to 'Favorites' and connect to your MobileMe iDisk. Don't forget to save it in a favorite with remote and local paths defined. Then it's just a matter of pressing the Sync button.
  • Save as 'on-demand', preserving folder structure: Again, go to 'Favorites' and connect to your MobileMe iDisk. Define remote and local paths and act ...



Categories: Mac OS Hints

iTunes 9.2 adds Undo & Redo commands

Mac OSX Hints - Wed, 07/28/2010 - 10:30am
Most applications have Undo and Redo commands, and iTunes has long had them available when editing song tags. Beginning with iTunes 9.2 (the latest version is 9.2.1), offers Undo and Redo commands which can be applied to songs which have been removed from or added to a playlist. Note, though, that these commands will not work for songs which have been removed from the Library.

As always, Undo is available from the Edit menu and can also be invoked using the keyboard with Command-Z. Redo is also in the Edit menu and can be done with the Command-Shift-Z keyboard shortcut.

I have no earlier version available for testing, but am confident 9.2 is when the feature I've noted was added. I regularly invoke the Undo keyboard shortcut just as a habitual response to a mistake, and I never witnessed the behavior prior to 9.2.

[crarko adds: I tested this, and it works as described.]


Categories: Mac OS Hints

10.6: Change remote ssh connections default

Mac OSX Hints - Wed, 07/28/2010 - 10:30am
In 10.5 and previous versions of the system, Terminal's remote connection dialog (go to the menu item Shell » New Remote Connection...) had a selection for Secure Shell (ssh) that defaulted to 'SSH (Automatic).' In 10.6, this has been changed to default to 'SSH Protocol 1.' None of my servers support SSH-1 (and if yours do, you should fix the security hole and disable it). [crarko adds: Here's a nice little FAQ that describes the SSH-1 and SSH-2 protocols. SSH-2 is newer and more secure.]

Also, Terminal does not remember the state when you change this pull down. Quitting Terminal or changing to another protocol and back will reset the pull down back to SSH-1. Here's a simple way to force it to keep the change. Since there doesn't seem to be a way to save the state of t ...


Categories: Mac OS Hints

10.6: Snow Leopard update remaps mouse click

Mac OSX Hints - Tue, 07/27/2010 - 10:30am
The latest Snow Leopard update (10.6.4) remapped the right mouse key to Application Switcher for the Apple USB Mouse when I applied it.

If you are surprised at having the large dock style transparent window suddenly popping up in the middle of your screen, simply go into System Preferences » Mouse and remap the right mouse button back to the Secondary Button (which was the default).

This will also restore the mouse's right-click functionality within your various applications.

[crarko adds: I haven't tested this one. Can people confirm that this happens with 10.6.4?]


Categories: Mac OS Hints

Prevent disk auto-mount while logged in

Mac OSX Hints - Tue, 07/27/2010 - 10:30am
While there are numerous well-documented ways to prevent a hard disk or USB drive from mounting at boot-time, I found only one way (working in 10.6) to prevent newly-connected disks from auto-mounting while logged in. It is possible to turn off the responsible process: sudo launchctl unload /System/Library/LaunchDaemons/com.apple.diskarbitrationd.plist This has negative repercussions on general ejecting and mounting. Turning diskarbitrationd back on with load instead of unload doesn't solve all problems, either.

So I looked far and wide for a simple GUI tool performing this function; all I found were expensive forensics-toolkits for law enforcement which offer this function on the side.

Then I stumbled upon this gem: ...


Categories: Mac OS Hints

10.6: Add applications to Exposé

Mac OSX Hints - Mon, 07/26/2010 - 10:30am
You all probably know about Exposé's Application Mode (introduced in 10.6 I think). What's interesting is that while you're in it, you can Command+click on other running applications and bring their windows into Exposé as well.

Steps to reproduce:
  • Open Application Exposé (click and hold on any running application in the Dock).
  • Cmd+click on another running application in the Dock.
What happens is that only the windows of these 2 applications will be shown in Exposé. You can also continue to Cmd+click on other applications and bring their windows into Exposé as well.

I noticed that some windows that are normally ignored by Exposé, appear while doing this.

[crarko adds: I tested this, and it works as described. It's something of an addition to ...


Categories: Mac OS Hints

Safari Reader copy and paste modes

Mac OSX Hints - Mon, 07/26/2010 - 10:30am
Copying and pasting from Safari when using the Reader function has two modes, depending on where you are pasting. If you select, copy, and paste the text into a text editor, you get something that looks like this: Britain Plans to Decentralize Health Care

LONDON -- Perhaps the only consistent thing about Britain's socialized health care system is that it is in a perpetual state of flux, its structure constantly changing as governments search for the elusive formula that will deliver the best care for the cheapest price while costs and demand escalate.[...] However, if you paste your copied text into a new mail message in Mail.app, the source URL is prepended to the text, like this: http://www.nytimes.com/2010/07/25/world/europe/25britain.html?_r=2&hp

Britain Plans to Decentralize Health Care

LONDON -- Perhaps the only consistent thing about Britain's socialized health ...


Categories: Mac OS Hints

Secure Evernote for Mac application data

Mac OSX Hints - Fri, 07/23/2010 - 10:30am
Evernote is a combination of an application and a cloud based service to save notes, reminders, images and other data that can be accessed from a Mac, PC, iPhone or other mobile devices. This hint is about encrypting the local data store from the Mac version of the software.

Here's how to do it:
  • Quit Evernote from the Menu bar shortcut.
  • Make an encrypted disk image using Disk Utility and mount it. (You may want to put it in your login items to open on login.)
  • Move the folder: ~/Library/Application Support/Evernote folder over to the disk image.
  • Use the SymbolicLinker Service (10.6) or plug-in (10.5 and earlier) or make the symbolic link yourself v ...



Categories: Mac OS Hints

Python and UTF-8 text encoding on OSX

Mac OSX Hints - Fri, 07/23/2010 - 10:30am
I'm using a MacBook Air with Snow Leopard (10.6.2) as my development platform. And I'm using Python 2.6.4 with Unicode strings.

I received the following error when trying to run a script: UnicodeEncodeError: 'ascii' codec can't encode character u'xe9', indicating that the text encoding was wrong. So it couldn't output a word like appliqué correctly.

I tried adding # -*- coding: utf-8 -*- at the head of my Python script, but I still get this complaint.

To fix this, I found that the text encoding used for standard input, output, and standard error can be specified by setting the PYTHONIOENCODING environment variable before running the interpreter.

The value should be a string in the form <encoding> or <encoding>:<errorhandler>. The encoding part specifies the encoding's name, e.g. utf-8 or latin-1; the optional errorhandler part specifies what to do with characters that can't be handled by the encoding, ...


Categories: Mac OS Hints

Use AppleScript for a Virtual Numpad

Mac OSX Hints - Thu, 07/22/2010 - 10:30am
The keyboards on Mac notebooks, and now desktops, too, have no number pad. It used to be that notebook keyboards had a numlock key, and you could use the letter keys on the right hand side of the keyboard as a number pad, but that feature seems to have vanished. It can, however, be brought back with AppleScript. [crarko adds: You can get it by pressing and holding the 'fn' key, which is also cumbersome.] The code given below will let you type as if this numpad existed. It will convert the letters into the corresponding numbers, and copy the result to the clipboard. When you need a numpad, just switch to this program, and then back to your original, and paste. Also, you can type normally by typing " " (double-space). Use that to switch to text mode, and again to switch out. For example: "jkl jkl jkl" will produce "123jkl123". If you use triple-spaces, one space will be left ("123 jkl 123"). So, you could type this: " My favorite number is jkluio789 ." and get "My fa ...


Categories: Mac OS Hints

Refresh a widget in Dashboard

Mac OSX Hints - Thu, 07/22/2010 - 10:30am
To refresh a widget in the Dashboard, open the Dashboard, select a widget, and press Command-R. There is a slick little animation, and the widget will refresh.

[crarko adds: I've seen this before, but on searching didn't find it here as a hint. Here is a previous hint with a list of other interesting modifier keys. It looks like the wiki mentioned there is no longer active, so I'll see about creating a new one. Thanks to reader Reuven Volnoboy for pointing this out.]


Categories: Mac OS Hints

Time Machine: Mount backup disk on demand

Mac OSX Hints - Wed, 07/21/2010 - 10:30am
It is both inconvenient and less safe to keep backup volumes mounted when not in use. A mounted volume is more prone to corruption, and open file dialogs needlessly spin up mounted volumes, contributing to a user experience latency that is most apparent if the primary drive is solid state.

By creating an /etc/periodic/hourly directory modeled after the existing /etc/periodic/daily directory, and adapting com.apple.periodic-daily.plist, there is a place to put a script that handles mounting and unmounting the Time Machine backup disk, and launching Time Machine. Scripts that implement nightly tasks can be placed in the /etc/periodic/daily directory, which is run at 3:15 AM by /System/Library/LaunchDaemons/com.apple.periodic-daily.plist. Using sudo in Terminal, create the parallel directory /etc/periodic/hourly and the parallel file /System/Library/LaunchDaemons/com.apple.periodic-hourly.plist.

Then clone the file com.apple.periodic-hourl ...


Categories: Mac OS Hints

HP all in one now can scan

Mac OSX Hints - Wed, 07/21/2010 - 10:30am
I was having problems with my HP PSC 2110 all-in-one printer and in the process of troubleshooting was tinkering with the System Preferences for it. I just randomly clicked on the Scan button and the clicked Open Scanner. Up popped a scan window with 'Scanner is warming up.' Then it showed a preview window and a Scan button. I was completely blown away. I have been trying to get this scanner to work with Leopard and Snow Leopard for years.

This was after applying the most recent HP Printer Drivers v.2.4.1 for Mac OS X v10.6 update, so that is likely the fix.

[crarko adds: I haven't tested this one. It's nice to see the functionality returned to multi-function printers, even if it takes quite a while to happen. Remember to try the latest driver updates when they come out.]


Categories: Mac OS Hints

Measuring screen elements in pixels

Mac OSX Hints - Tue, 07/20/2010 - 10:30am
Measuring elements on the screen quickly and easily can be really important for all sorts of tasks. I often use the excellent Free Ruler app for this but don't always want to waste time opening it up.

For super-quick measurements just use the built-in screen capture command (Cmd-Shift-4) to drag and measure the element you're interested in instead. Click and drag to measure and to avoid taking a screenshot simply press the Escape key before releasing the mouse button.

I'd not really thought of this as a hint until a fellow designer was astounded when then they saw me doing this, so I thought I would share!

[crarko adds: Free Ruler has been mentioned before but this is a nice quick alternative.]


Categories: Mac OS Hints

10.6: A Service to show/hide hidden files

Mac OSX Hints - Tue, 07/20/2010 - 10:30am
There are many ways to show and hide the various hidden files and folders in Mac OS X. This one is an update to an older Automator workflow method. The previous method was to create a plug-in in Automator; now a pair of Services are used, so this hint only applies to Snow Leopard. Refer to the previous hint for usage in either Leopard or Tiger. Here's how to do it:
  • Launch Automator and choose Service as your template. (Be careful in the next steps if you copy and paste the code that the apostrophes and quotes come through as plain text.)
  • On the left side, use the search bar to find the 'Run Shell Script' action (it's in Utilities) and drag three instances of that action over to the right side.
  • At the very top on the right where is says 'Service rec ...



Categories: Mac OS Hints

Add custom keyboard shortcuts in Terminal

Mac OSX Hints - Mon, 07/19/2010 - 10:30am
In Terminal, under the Keyboard tab of a theme, you can add custom keyboard shortcuts. However, if you try to add a custom shortcut that types a modifier key, you will have some difficulty. This is because the entry form seemingly makes it impossible to enter a modifier key or the escaped octal number for it. The way around this is to type a backslash \, which will enter \\. Then arrow key left and type a forward delete. This will delete one of the backslashes, allowing you use the remaining one as an escape. You can, for example, use \033 to emulate the Option key. Another option is to look up the octal value for the key you want in the table at this Wikipedia article, and type the corresponding control sequence. For example, option is ^[, or Control-[. It also turns out that this is the same as escape, so you can just press the esc key if you w ...


Categories: Mac OS Hints

Quick Look and images: zoom in and out

Mac OSX Hints - Mon, 07/19/2010 - 10:30am
If you're using Quick Look on an image, you'll appreciate the following trick for zooming.

Once you've opened the QL window on a JPEG or other image file, simply press Option and the pointer will change to a magnifying glass with a plus sign in the middle. Click somewhere on the image to zoom in.

Drag the cursor around to move around, or use the scroll wheel (2 fingers on trackpad) to move around. Option-Shift-click to zoom back out.

[crarko adds: I tested this, and it works as described. It doesn't work on PDF's, which is a bummer.]


Categories: Mac OS Hints

Transfer Google Chrome Keywords

Mac OSX Hints - Fri, 07/16/2010 - 10:30am
I recently downgraded from Google Chrome 6.x (a developmental version) back to the officially released 5.x version. In the process all of my Firefox style keywords (aka searches) were lost. You can use the following process to transfer your old keywords to a new installation of Chrome or maybe to a different machine on which you are also using Google Chrome. I took advantage of the built-in sqlite3 database utility to do this. Note: all processes must take place when Chrome is not running.

Export the keywords from your original Chrome install: Google Chrome stores its keyword data in ~/Library/Application Support/Google/Chrome/Default. Navigate to that location in the Terminal and issue the following command: sqlite3 "Web Data".dump > keywords.sql This will export your current data to a SQL command file. If you want to transfer all of the data including autofill data, etc. to your new installation or location then skip the next step ...


Categories: Mac OS Hints
Syndicate content