Skip to content

Mac OS X Hints

A nasty little iTunes/iOS bug may be causing media sync issues

November 18th update: My sync issues returned, but due to a different cause this time. Details in this post.

After complaining to Tim Cook, and separately starting a (now closed) support ticket, it appears that my iOS/iTunes sync nightmare has finally come to an end!

I have not seen a progress bar that busy since the day I brought my iPhone 6 back home. Whatever I tried, iTunes simply would not sync everything in my library. In the end, the problem turned out to be as simple—but as deadly—as this:

In the current version of iTunes/iOS, there's a bug that only appears when you have duplicates of purchased songs. When encountered, a duplicate of a purchased song will (almost always) cause iTunes to silently stop syncing.

This is a known-to-Apple issue, and it will be fixed in a forthcoming update. I'm fairly certain it's an iTunes bug, but as Apple didn't clearly state which it was, I'm calling it iTunes/iOS. Either way, until it's fixed, it's a really bad bug.

Here's what happens: If you have duplicates of purchased songs, iTunes simply silently stops syncing when it hits one of those duplicates. From your perspective, it will look like everything is working—iTunes never throws an error, and it proceeds through all six (or seven or whatever) steps of the sync process, as seen in the status window of iTunes.

But behind the scenes, nothing is happening—at least, nothing relative to syncing your files. As seen by my troubles, this can be incredibly frustrating and hard to fix.

Continue reading to see how I was able to finally (with Apple's help) get my devices syncing again—the tricky part is finding all the duplicates, because they're not all obvious. Also note that if you are not having sync issues, I wouldn't worry about duplicates—no need to endanger what's already working well!

[continue reading…]



Silently mute the mic input via AppleScript

Note: The scripts in this hint don't truly mute the mic input; they drop its volume to zero. That's because there's no way to mute an input source via AppleScript (while you can mute an output source). At zero level, the mic will still pick up sounds, but they're very quiet.

Thanks to John Welch, though, you can download an app that will mute the mic with a simple one-click HUD—he posted it in the first comment here, but that download link is broken. Instead, download it via this link, and you should be good to go.

While recording our weekly podcast, The Committed, I often want to mute the microphone input for one reason or another. (Yes, my microphone has a big Mute button on it, but pressing it results in an audible CLICK in the recording.)

There are any number of ways to do this quietly, including just sliding the level down in the Sound System Preferences panel (though it's hard to then get it back to exactly the right spot). There are also any number of App Store apps that will do this for you; some are free, some are paid. And doing it programmatically yourself is as easy as two one-line AppleScripts:

Save those separately, assign keyboard shortcuts (or more quietly, trackpad gestures) using your favorite third-party tool, and you're done.

But I wanted something more. I wanted one script to mute and unmute the volume. I also wanted a visual reminder when I was muted. After an afternoon of slogging around the internet, looking up obscure AppleScript command syntax, and diving into Sal Soghoian's AppleScript 1-2-3 book, I came up with something that seems to work. This short video shows one version of it in action:

Read on for the code and a how-to on putting it to use.

[continue reading…]



A [possibly dangerous] fix for the bash security exposure

In case you missed the news, there’s a big security hole in the bash shell. If you’re using an OS X machine and it’s not exposed to the internet (and even then, not running a publicly-facing service that communicates with bash), you shouldn’t have much of anything to worry about. In theory, anyway.

In practice, because I like to live dangerously, I decided I wanted to make my machine safe. Or at least try. What follows is the how-to for how I did it.


Note: Please exercise extreme caution if you're going to follow my how-to! I am replacing a couple of key system-level files with a new, untested-by-Apple version. It's quite possible this may break my system in ways I haven't yet discovered. Also, given that there's probably not any exposure for a typical user not running web-facing apps that interface with bash, this really isn't worth doing for most users.


With that disclaimer out of the way, read on for my how-to…

[continue reading…]



My most-useful and least-used shell script

I have a large number of small shell scripts I've either written or collected over the years. Today I had the opportunity to use my favorite one—which is rare, as I only need it a couple times a year. But when I do need it, it's a wonderful little script.

It's also a very simple-minded script, as it does just one thing: it copies my public IP address to the clipboard and shows it in a pop-up message, as seen at right. OK, so that's two things, but they're very closely related.

Clearly this isn't something I need to do often, but when I do, the script changes this…

Switch to browser, open new tab, load the DynDNS check IP page, drag mouse to select IP address, press Command-C to copy, switch back to destination app, press Command-V to paste

…into this…

Press a key combo, wait about a second, then press Command-V

This is a big timesaver, obviously, and it makes the process about as easy as it could be.

I originally wrote this up for Mac OS X Hints a few years back, but thought I'd post it here (given the changes at Macworld, I'm not sure how long the hints site may be around). I've also modified it a bit, as I no longer use growlnotify for the onscreen display of the copied IP address.

You can read the original how-to at hints, or below, where I've posted the updated version that no longer uses growlnotify.

[continue reading…]



Search the iTunes Store from anywhere

This morning, I wanted to send someone an iTunes App Store search URL, so that when they clicked it, they'd see the list of matching apps in the iTunes App Store. There's no apparent easy way to do this within iTunes, but after much futzing about, I figured out how to structure a URL that will open to to the search results screen in the iTunes App Store.

Because Apple has separated iPhone apps and iPod apps in the store, there are actually two separate URLs, one for each type of app. The iPad version of the URL is:

itms://search.itunes.apple.com/WebObjects/MZSearch.woa/wa/advancedSearch?entity=iPadSoftware&free=0&genreIndex=1&media=software&restrict=false&softwareTerm=TERMS+TO+SEARCH+FOR&submit=seeAllLockups

And for the iPhone, it's identical except for the entity bit:

itms://search.itunes.apple.com/WebObjects/MZSearch.woa/wa/advancedSearch?entity=software&free=0&genreIndex=1&media=software&restrict=false&softwareTerm=TERMS+TO+SEARCH+FOR&submit=seeAllLockups

Hopefully obviously, replace TERMS+TO+SEARCH+FOR with the keywords you want to use for the search, separating words with the plus sign. You can then use the URL for whatever you like: send it to someone, add it to your bookmarks bar, whatever. When clicked, the search will run and the results will open directly in the iTunes App Store for either iPad or iPhone apps.

For example, iPad Apps related to the word foobar, or iPhone apps about hopping frogs.

You can further customize the URL to find anything you want—not just apps, and using additional criteria—within any of the various areas of the App Store. Read on for the details on how to do that.

[continue reading…]



A look at the first eight years of macosxhints.com

I was cleaning out some old images from the site, and found over 150 apparently unused images. Whoops, that's what nine years of bad housekeeping will get you.

One of the leftovers, though, was kind of interesting. At some point in time, I graphed the number of hints published each day on macosxhints.com, from launch through 2008—a total of 12,051 hints.

Even if unlabeled, it'd be pretty easy to figure out where the major OS X releases occurred (except for 10.1, not sure what's up with that?). And you can see a general downward trend in hints per day, as the OS became more established (and more locked down) over time.

In any event, I thought it was an interesting chart, and figured I'd toss it into a quick post instead of just sending it to the dustbin.



Control is the key to avoiding needless dialog boxes

Over the weekend, I wrote myself a little AppleScript program that makes it much easier to create license files for our customers. (Given my lack of knowledge on AppleScript, I'm quite happy with the result.)

To make it easy to use on all my Macs, I stored the finished result in Dropbox. I tested it using my MacBook Pro, assigning it a global keyboard shortcut using Butler. It worked great; as soon as I typed the shortcut, I'd see my "Which program?" onscreen dialog, and all was good.

When I got back to my iMac, I used Butler to point to the same script on Drobpox, and tested it. I was very surprised to see that, instead of launching my app, OS X presented this dialog box:

Confused, I pulled out the MacBook Pro, and tested again…and again, it worked fine, launching without any confirmation dialog.

After many minutes of hair pulling, I figured out the problem: On the MacBook Pro, I had assigned the shortcut as Shift-Option-M; on the iMac, I decided that it'd be easier to type Shift-Control-M, so that's what I used (intending to change the MacBook Pro to the same shortcut). As soon as I removed the Control key from the shortcut, my application loaded without the confirmation dialog.

I've been unable to figure out why this happens, but if you're launching AppleScript apps via global shortcuts, avoid using the Control key in those shortcuts (unless you like needless confirmation dialogs, that is).



How to use Safari to track The Masters leaderboard

In general, I don't use Safari—mainly because I'm addicted to the add-ons I get with Chrome and Firefox. (Yes, I know Safari has extensions…but they're underpowered and feature limited compared to what you can get in the other browsers.) However, during Masters week, Safari has a key role in my following the tournament, thanks to one key feature: web clip, i.e. Open in Dashboard.

While The Masters has an excellent iPad app, I don't like having the iPad locked into one app for hours at a time. So, to follow the leaderboard, I turn to Safari's Open in Dashboard feature, along with a favorite old Mac OS X Hints hint that allows me to drag widgets out of the Dashboard. Using these two things together, I can view the full Masters leaderboard, floating in a window all its own.

Best of all, the interactivity of the leaderboard is preserved, so I can re-sort the list, expand a player's scores, and do all the other things I can do on the actual leaderboard page.

Note that you'll need some spare monitor space for this trick: the dragged Widget floats over every other window, so it will get in the way if you're using, for instance, an 11" MacBook Air.

If you'd like to do the same, here's how…
[continue reading…]



A workaround for an iPhoto/set desktop picture bug

On both my Mac Pro and my iMac, I've run into a problem where the iPhoto library simply doesn't show up in the Desktop & Screen Saver System Preferences panel (in Mac OS X 10.6.x). Well, sometimes it shows up, but simply as a line reading iPhoto, but without any actual content.

When this happened the first time, I looked in Console and found the following entry for each time I'd tried to load the Desktop tab of the Desktop & Screen Saver panel (reformatted for easier reading):

1/12/12 9:09:36 AM      System Preferences[4134]
**** DesktopPref error: DSKiPhotoRootSource -loadData TIME OUT!!! There something wrong with iLife Media Browser

Googling on that error led to a number of pages, including iLife: Cannot See iPhoto Files in Other iLife Applications on Apple's support site. But after trying everything in that article, I still couldn't see my iPhoto images when trying to set the Desktop picture.
[continue reading…]



Feedback from readers

Macworld logoAs you might guess, I get a lot of email from readers of Macworld and macosxhints.com. For the most part, I love hearing from readers -- even if it's negative feedback, believe it or not. In the case of negative feedback, however, it's nice if the writer provides enough detail so I know (a) what they're upset about, and (b) what I might be able to do about it. I've actually had many useful and productive exchanges with folks who wrote to flame me for one reason or another.

However, on the opposite side of the fence, as an example of the kind of useless feedback I hate receiving, I offer up this email that arrived this morning:

Do you proof read these articles before you publish them?

That was the entire email. I have no idea which typos the author may be referring to, nor for that matter, which one of the 20 to 30 things I wrote last week that those typos may be in. It's also somewhat ironic to note that proofread is one word, not two -- if you're going to chastise me for typos, it's best not to make any of your own!

I really do enjoy hearing from and corresponding with readers. But if you're going to take the time and effort to write to me, at least include enough information for me to understand what it is that's gotten your attention, so that I have some context for your comments and can respond in a meaningful manner.