Creativebits.org

an All Creative World site

Mac OS X hints

Subscribe to Mac OS X hints feed
Macosxhints.com RSS feed
Updated: 1 hour 27 min ago

Permanently Unhide Library

Wed, 2012-05-16 14:30
When Apple shipped Mac OS X Lion 10.7, the “Library” folder located within every user’s home folder, which had previously been visible to users in the Finder, was made invisible. This hint shows how to make the folder visible and keep it that way forever.

As you may know, and as mentioned in this hint, the Library folder can be made visible again by running the following command in Terminal:

/usr/bin/chflags nohidden ~/Library

Apple keeps making the folder invisible again with every System update, so it gets tedious re-running the above script. You can automate this by adding a Login Item with an AppleScript "script application" containing the following code:

do shell script "/usr/bin/chflags nohidden ~/Library"

Read detailed instructions for this hint, and download a ready-made script application file on the ...



Add to digg Add to Reddit Add to Slashdot Email this Article Add to StumbleUpon

New poll: Does your main Mac have an SSD?

Tue, 2012-05-15 14:31
As SSDs become more common, and prices drop, more and more people are either buying Macs with SSDs, or installing them in their Macs. Personally, I started using an SSD with the first MacBook Air in 2008, and bought my current Mac - a Mac mini, purchased in 2011 - with an SSD. The gains in performance are huge, though the price still makes them a choice that is not for everyone.

So, what about you? Does your main Mac - the one you use most - have an SSD? Feel free to post in the comments to the poll which model, whether you bought it with the Mac or installed it yourself, or any other comments you may have about SSDs.

Vote in the poll

Add to digg Add to Reddit Add to Slashdot Email this Article Add to StumbleUpon

Two AppleScripts for unmounting, mounting local disk volumes

Tue, 2012-05-15 14:30
These AppleScripts are related to this hint. Both can already be found in the replies to the hint topic post, but I'm resubmitting them so that they will appear together.

The first is an improved version of the original AppleScript which presents a dialog box from which a selection of local volumes to be ejected can be made. An example of its usefulness might be that it provides a reliable method for quickly ejecting a MacBook's mounted local volumes for users on the go. I've configured it as a "Run AppleScript" step for an Automator-based Mac OS X Service called "Unmounter" and assigned it the keyboard shortcut of (Command-Control-Shift-E) in System Preferences on my system.

The second is a more robust version of the AppleScript included in my first reply to the original hint topic. It attempts to automatically unmount all unmountable local volumes, and if it finds none, attempts to mo ...

Add to digg Add to Reddit Add to Slashdot Email this Article Add to StumbleUpon

Copy partially played Audiobooks to a playlist

Tue, 2012-05-15 14:30
iTunes Smart Playlists don't offer a criteria to find tracks which have been partially played. While "Last Skipped" is an option, this track property may not be set if the track wasn't actually skipped and was merely stopped.

However, if a track's "Remember playback position" option is set (and most audiobooks have this set by default) the track's AppleScript bookmark property will contain the number of seconds that a track has advanced before being stopped. Thus, any track with a bookmark value greater than zero would have been partially played.

Here is an AppleScript that will copy all the tracks in the "Books" library to a new playlist named "Partially Played". Each time it is run it will update the "Partially Played" playlist. property nameOfPlaylist : "Partially Played" tell application "iTunes" try set thePlaylist to some playlist whose name is nameOfPlaylist on error set thePlaylist to (make playlist with properties {nam ...

Add to digg Add to Reddit Add to Slashdot Email this Article Add to StumbleUpon

Open certain preference panes with quick shortcut

Mon, 2012-05-14 14:30
If you press the Option key, then press certain dedicated keys on the standard Apple keyboard, preference panes will open. This works for Mission Control (Option-F3 or Option-F4), Displays (Option-F1 or Option-F2), and Sound (Option-F10, Option-F11 or Option-F12). The F keys in question are those which act on the given features, either displaying Dashboard or Mission Control (F3 and F4), decreasing or increasing brightness (F1 and F2), or changing or muting volume (F10, F11 and F12). If you use a laptop, you may need to press the Fn key together with the other keys to open these preference panes.


Add to digg Add to Reddit Add to Slashdot Email this Article Add to StumbleUpon

Drag files from Safari 5 Downloads popup

Mon, 2012-05-14 14:30
I recently tried to drag from Safari's Downloads popup and found that if you drag from the icon of the downloaded file, you can move it where you want.

Click on an icon in the Downloads popup and drag it to any folder, or even onto a Dock icon to launch a file you've just downloaded with a specific application.

[kirkmc adds: This seems obvious, but there's no hint here for it. There have been hints about double-clicking an icon in the Downloads window to open it, copying and pasting URLs from the Downloads window, and the keyboard shortcut to show the Downloads popup (Command-Option-L).]

Add to digg Add to Reddit Add to Slashdot Email this Article Add to StumbleUpon

Save all of your Terminal activity to a file

Fri, 2012-05-11 14:30
I use Terminal everyday, and I find it a good idea to log everything I you. It makes it much easier to undo your mistakes when you know what those mistakes were. Here's how I do this:

Open Terminal's preferences.

Go to Settings, then Shell. You can choose here to run a command at startup. You could create a simple log of your session using the following: /usr/bin/script ~/Desktop/Terminal.log This will log everything you do and append it to the log file.

I like to keep my history so instead I wrote this small script that archives previous sessions by renaming the file with a date/time string. I then set Terminal.app to run at startup the following command: ~/Desktop/logger.sh Here's the script: #!/bin/bash # logger.sh # Log everything you do in Terminal. #* Formatted date & time string. FORMATTED_DATE=`/bin/date "+%Y-%m-%d%H%M%S"` #* Archive the previous file /bin/cp -f ~/Desktop/Terminal ...

Add to digg Add to Reddit Add to Slashdot Email this Article Add to StumbleUpon

Remove rubber band scrolling in most apps

Thu, 2012-05-10 14:30
Combining some findings from a recent hint and on Apple's forums, I've finally found a way to disable the annoying rubber-band scrolling in most applications. All the credit goes to those guys as they did the initial investigation.

It works in applications like:
  • Finder
  • Mail
  • Preview
  • TextEdit
  • Xcode
and probably in most applications that use the standard UI (the string to be used in defaults appears in AppKit.framework). It doesn't work in Safari or iTunes.

In Terminal type: defaults write -g NSScrollViewRubberbanding -int 0 It should work after you relaunch your applications.

To undo this change, run this command in Terminal: defaults delete -g NSScrollViewRubberbanding [kirkmc adds: Works as described. I haven't tested many apps, so feel free to post which o ...

Add to digg Add to Reddit Add to Slashdot Email this Article Add to StumbleUpon

View full track info in iOS Music App

Wed, 2012-05-09 14:30
This hint solves a long standing problem when playing classical music on an iPhone. When using the iPhone Music app (iOS 5.1), the full entry (e.g. name of artist, album or song title) for an item can be too long to be displayed. Tap and hold entry to see the full entry pop up. Tap and drag your finger down the list to make the pop up change as you drag. This works for album titles, song titles, and artists names.

[kirkmc adds: Nice. I hadn't heard of this before, but searching the web shows that it is not totally unknown. Since it hasn't shown up here before, it's worth posting.]

Add to digg Add to Reddit Add to Slashdot Email this Article Add to StumbleUpon

Allow custom URL protocols in Lion Server wiki pages

Wed, 2012-05-09 14:30
If you use Lion Server, and its wiki server, you may find it useful to use custom URL protocols for internal documents and links. Apple has published a technical note explaining how to do this. This document explains how to create the necessary configuration file - /etc/collabd/filter_whitelist.plist - for any custom URL protocol you wish to use.

Add to digg Add to Reddit Add to Slashdot Email this Article Add to StumbleUpon

Remove scrolling elasticity in Xcode

Tue, 2012-05-08 14:30
Mac OS X Lion introduced iOS-style scrolling elasticity. Do you think it's annoying, and it slows you down while working in Xcode? Here's how to remove it.

Copy this Xcode plugin to the following directory:

~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/

You should create the directories if needed.

Enjoy!

Add to digg Add to Reddit Add to Slashdot Email this Article Add to StumbleUpon

Scroll PDF in Finder in Column View

Mon, 2012-05-07 14:30
In the Finder, when working in Column View, if you select a multipage PDF you can scroll up and down in the document. This is much faster than using the small arrow controls, and appears to work with any input device that can scroll.

[kirkmc adds: Several points. First, in Column View, you need to have Show Preview Column checked in the View settings. When you select a PDF, its first page shows in the Preview column. From there, you hover your cursor and see two arrow buttons. You can either click on these or scroll.

This might be useful if you just need a quick glance at a file, but once you've selected the PDF, you can view it in Quick Look by pressing the space bar, which lets you see the document at full size.]

Add to digg Add to Reddit Add to Slashdot Email this Article Add to StumbleUpon

Moving custom paper sizes from Snow Leopard to Lion

Fri, 2012-05-04 14:30

I was recently asked to see if I could copy over the custom page sizes from a Snow Leopard machine over to a Lion machine.

While finding the right file in ~/Library/Preferences (com.apple.print.custompapers.plist) wasn't so difficult, it turned out that the Snow Leopard version of the file is binary encoded while the Lion version is not. (It may be that this file was grandfathered in from a previous system.)

XCode for Lion can convert the file to a regular XML text file:

  1. Open the file in Xcode.
  2. Choose File > Duplicate.
  3. In the Save dialog box, select "Property List XML" from the Format drop-down list.

Moving the regular text version over to Lion and putting it into the Preferences folder gave us a way to copy a huge list of custom paper sizes from one designer to another quickly and easily.



Add to digg Add to Reddit Add to Slashdot Email this Article Add to StumbleUpon

AppleScript for selecting local volumes to unmount

Thu, 2012-05-03 14:30
Here's an AppleScript that presents a dialog box listing mounted local volumes, one or more of which can be selected for unmounting. Some solutions for doing this either require the use of additional system resources or are offered commercially. This AppleScript is free, of course. I’ve only tested it in Lion so far. I recommend that you set up a keyboard shortcut that launches the AppleScript either as part of a Mac OS X Automator Service, or from the Script menu, which (in Lion) can be configured using the Keyboard preferences. set alldisks to paragraphs of (do shell script "df -hlg | awk -F/ '/disk*/ {print $5}'") try set item 1 of alldisks to ((characters 1 thru -2 of (path to startup disk as string)) as text) on error set alldisks to {((characters 1 thru -2 of (path to startup disk as st ...

Add to digg Add to Reddit Add to Slashdot Email this Article Add to StumbleUpon

Option-up arrow and Option-down arrow cycle through sent messages in iChat

Wed, 2012-05-02 14:30
When focus is in the text entry field in an iChat chat window, holding option and using your up and down arrow keys cycles through the previous messages you've sent. This is very similar to how Terminal lets you cycle through previous command just using the up and down arrow keys.

[kirkmc adds: I actually spotted this a while ago. I'm not sure why it's there; and I don't really see any use for it, other than, perhaps, to find a text you sent to someone without scrolling in the window, and copy that to send to someone else. This works in Lion; can anyone confirm that whether works in earlier versions of OS X or not?]

Add to digg Add to Reddit Add to Slashdot Email this Article Add to StumbleUpon

Build a service to count characters, words and paragraphs

Tue, 2012-05-01 14:30
Apple does not provide any way to count the number of characters in a selected text. Fortunately, you can create your own very easily using Automator.

Launch Automator and create a new Service. Add the Execute an AppleScript script action, then paste the following code: on run {input, parameters} try set MyText to input as string set NombreSignes to the number of characters of MyText set NombreMots to the number of words of MyText set NombrePara to the number of paragraphs of MyText set LeResultat to "The selected text contains :" & return & "- " & NombreSignes & " sign(s) ;" & return & "- " & NombreMots & " word(s) ;" & return & "- " & NombrePara & " paragraph(s)." display dialog LeResultat buttons {"OK"} default button 1 with icon n ...

Add to digg Add to Reddit Add to Slashdot Email this Article Add to StumbleUpon

Use Logitech N305 number pad with Mac

Mon, 2012-04-30 14:30
My right shoulder had been hurting lately, due to the movement necessary to reach my trackpad. I was using a standard, wired Apple keyboard with the number pad on the right, and my Magic Trackpad was to the right of that, making me reach pretty far to access it.

So, I set out in search of a standalone number pad I could use with my Mac. While I don't work with numbers often, when I do my accounting, it's a pain to have to type numbers from the top row of the keyboard. I looked at a number of models - both wired and wireless - and found what seemed to be the best choice: Logitech's N305. This works with Logitech's Unifying Receiver, is fairly compact, and, according to Logitech, works for three years with a pair of batteries.

But the N305 does not support Macs. Fortunately, in reviews for the product on Amazon, a number of people posted a solution. Download the free KeyRemap4MacBook, a preference p ...

Add to digg Add to Reddit Add to Slashdot Email this Article Add to StumbleUpon

Reduce the size of Google Chrome

Fri, 2012-04-27 14:30
]Google Chrome keeps older versions of its web browser causing it to balloon in size. I noticed that the Google Chrome App on my Mac was 1.2 GB. That seemed a bit portly for a web browser. Upon looking into the app's bundle, by right-clicking and choosing Show Package Contents, I found multiple old versions of the app, all which appeared to be nearly identical. I removed all but the most recent version and everything appears to run correctly and the app size is now a much more slim 113 MB.

[kirkmc adds: Interesting. On my Mac, in the bundle, in Contents > Versions, there are, indeed, two versions of Chrome. This presumably has something to do with Chrome's silent updating. (Queries on Twitter suggest that this is the norm; a number of people replied that theirs was around 220 MB, as was mine.) Make sure you keep the one with the highest version number. You could also, of course, just download a new copy.

If you want to turn off this automatic updating, s ...

Add to digg Add to Reddit Add to Slashdot Email this Article Add to StumbleUpon

Get rid of intermittent SSH_AUTH_SOCKET environment variable from SSHKeychain

Thu, 2012-04-26 14:30
SSHKeychain used to set the SSH_AUTH_SOCK environment variable to something like /tmp/50x/SSHKeychain.socket, but even getting rid of SSHKeychain didn't get rid of the environment setting.

I used to use a great little program called SSHKeychain to maintain my ssh world on OS X. Even after Apple's keychain started dealing with ssh-agent properly, I still kept SSHKeychain around for the convenience of maintaining my ssh tunnel configurations in one place.

However, there was an occasional mismatch between the SSHKeychain way of doing things and the Apple keychain way, and SSHKeychain seemed to have fallen into disrepair, with no maintenance (on SourceForge at least) since 2007.

A few months back, I finally got rid of SSHKeychain, and started having problems.

There was apparently a phase-of-the-moon dependent race condition (somewhere) that clobbered the Apple keychain setting of SSH_AUTH_SOCK with a setting left over from SSHKeychain. This man ...

Add to digg Add to Reddit Add to Slashdot Email this Article Add to StumbleUpon

New poll: Which is your favorite Mac?

Thu, 2012-04-26 14:30
It's time for a new poll. Following Apple's quarterly earnings call, where the company announced selling 4 million Macs in the last quarter (see Macworld's discussion of Apple's earnings), this could be a good time to find out which model Mac OS X Hints readers prefer. Will it turn out that laptops are popular with readers of this site? They represent 70% of Apple's sales. Or is the Mac Pro still a favorite?

You can vote in the poll, and feel free to post comments on that page about why you selected a specific model.

Add to digg Add to Reddit Add to Slashdot Email this Article Add to StumbleUpon

Pages

Creativebits is a blog about creativity, design and Macs. We also have a critique section where you can post your work to get opinions and a forum to discuss any design related topics.

Recommend us on Google

Latest critique

Marketplace