Apple Magic Mouse Sleeping on Win7

My bluetooth Magic Mouse kept falling asleep. Here’s how to keep it away.

My Apple Magic Mouse was “falling asleep” on me in Windows 7.  Found this post that told how to resolve it.

1. Click on the “Bluetooth Devices” blue icon in the system tray (you’ll probably need to click that little UP arrow first) and choose “Open Settings” from the menu.
2. Under the “Hardware” tab of the resulting dialog, select the “Apple Built-in Bluetooth” device and click the “Properties” button on the lower right.
3. Under the “General” tab in the resulting dialog, click the “Change Settings” button on the lower left (it has a shield icon on it)
4. Under the “Power Management” tab in the resulting dialog untick the “Allow the computer to turn off this device to save power” checkbox.
5. Press OK, OK and OK.

But for me, the Hardware tab was located under “Dell Wireless 573 Bluetooth Module with AMP.”

OS X: Incomplete and partial files

Grey folders inaccessible from Finder? OSStatus error -43? Incomplete or partial folders? Here’s what I think is causing them and quite possibly what you can do about them.

I recently bought a Drobo FS with a lot of storage to keep a lot of my photography and other files backed up, redundant, and available.

Even with a “small” source drive, pumping the data to the Drobo at high speed can take a while. This isn’t the fault of the Drobo, nor the network, it’s that there’s just a lot of stuff to push through the pipe.

About 25 Hours to Go

But I ran into an odd problem, and I haven’t been able to get a good answer as to what’s happening. This is a call to geeks.

The problem is when a copy operation fails.

This could be because one rebooted the Drobo during a long copy operation, one rebooted the machine during a long copy operation, or, more likely, OS X Finder just aborted for no good reason and rather than allowing one to try the operation again, resume, or skip the problem area, the whole batch stops.

TIP: It can sometimes be better to have multiple (concurrent but blocked) copy requests that were individually initiated, than one mega-copy operation. Finder seems to like smaller sized chunks, plus if something goes wrong, there’s less to deal with.

What you end up with is a situation that’s hard to describe without seeing it. It’s a destination directory that look like this:

Incomplete Files and Folders
  1. The folders appear as grey.
  2. The folders can not be selected or opened from Finder.
  3. The folders do not have the little triangle icon by them.
  4. The folders can not be renamed from Finder, but can from Terminal.
  5. The folders can be copied, but they copy as grey.
  6. The contents of the folders can be seen using Terminal.
  7. If you use Finder to copy over them, it sees the name in use and makes a similarly named folder with a number after it.
  8. The source files are not in use.

The question is, then, how to ungrey the folders and finish the copy?

So far, I haven’t found a way.

At the moment, I’m speculating if this is related to kFirstMagicBusyFiletype, kLastMagicBusyFiletype, or kMagicBusyCreationDate as shown in the Finder.h header.

Remember, if I have to delete the directory (which can take a while — if it can be done), and then re-copy everything again (which will take a long while), and still not be certain that copy will complete, it’s a huge investment that may not pay off.

Geeks, I know what you’re thinking — I thought it too:

Was the source drive clean?
Yes. I do a Disk Utility check on my source volumes before copying from them.
Was the destination drive clean?
Yes. I do a Disk Utility check on my destination volumes before copying to them. In the case of the Drobo, I had just formatted it, using the latest firmware, and its dashboard gave the all clear. I even peeked with their sshd application.
Did you check the file permissions?
They’re clean with the regular 700 permissions. Finder’s Info concurs.
# ls -ableO@dFGinpqT *
863913 drwx------ 3 501 501 - 264 Feb 13 19:09:02 2011 NormalDirectory/
863912 drwx------ 3 501 501 - 264 Feb 13 19:09:13 2011 WhyIsThisGrey/
What happens if you delete them with # rf -vrf badDir?
Sometimes that works, actually. Other times the delete command just hangs indefinitely, like the file is busy.That said, using the Path Finder shell, this is what you get if you attempt to delete a directory that’s acting up.

OSStatus Error -43

Any idea what an OSStatus error -43 is? Or why they’d be an invalid path inside the destination directory?

What about extended attributes? Type? Creator?
They’re clean, too. Verfied by Path Finder, stat, xattr, and /usr/bin/GetFileInfo.
# stat -x *
File: "NormalDirectory"
Size: 264 FileType: Directory
Mode: (0700/drwx------) Uid: ( 501/ wls) Gid: ( 501/ wls)
Device: 45,12 Inode: 863913 Links: 3
Access: Sun Feb 13 19:09:02 2011
Modify: Sun Feb 13 19:09:02 2011
Change: Sun Feb 13 19:09:02 2011
File: "WhyIsThisGrey"
Size: 264 FileType: Directory
Mode: (0700/drwx------) Uid: ( 501/ wls) Gid: ( 501/ wls)
Device: 45,12 Inode: 863912 Links: 3
Access: Sun Feb 13 19:09:13 2011
Modify: Sun Feb 13 19:09:13 2011
Change: Sun Feb 13 19:09:13 2011
# xattr -l -v -x NormalDirectory WhyIsThisGrey
(nothing returned)
# /usr/bin/GetFileInfo -a -tcdm *
# /usr/bin/GetFileInfo -a NormalDirectory
avbstclinmedz
# /usr/bin/GetFileInfo -a WhyIsThisGrey
avbstclinmedz

No Extended Attributes, according to Path Finder
What happens if you rsync?
Doing an rsync appears to work, but doing it to the “broken directory” does not fix it after it completes.
# rsync --progress -aPE source destination

Further Thoughts

I found an article that suggests there’s a lot more going on with the file system than most of us give credit for. It talks a lot about the importance of meta data.

More Metadata That I First Thought

Two blog posts, The State of Backup and Cloning Tools under Mac OS X and Extended Attributes led me to playing with the xattr and mdls commands.

xattr didn’t have much interesting.

$ xattr -l SomeGreyDir
com.apple.FinderInfo:
00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 |................|
00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00000020

The mdls command presented a better clue. Check out the kMDItemFSCreationDate attribute.

$ mdls SomeGreyDir
kMDItemFSContentChangeDate = 2011-02-20 14:02:19 -0500
kMDItemFSCreationDate = 1946-02-14 03:34:56 -0500
kMDItemFSCreatorCode = ""
kMDItemFSFinderFlags = 0
kMDItemFSHasCustomIcon = 0
kMDItemFSInvisible = 0
kMDItemFSIsExtensionHidden = 0
kMDItemFSIsStationery = 0
kMDItemFSLabel = 0
kMDItemFSName = "SomeGreyDir"
kMDItemFSNodeCount = 0
kMDItemFSOwnerGroupID = 501
kMDItemFSOwnerUserID = 501
kMDItemFSSize = 0
kMDItemFSTypeCode = ""

A quick romp through my incomplete folders revealed they all had a magical creation date of 1946-02-14 03:34:56 -0500.

The solution I think I need

I’m looking for a way to locate files with the kMDItemFSCreationDate
attribute set to that magic value, and then change it to whatever is in the
kMDItemFSContentChangeDate.

My suspicion is that this will let Finder, and the Apple command line utilities,
consider the file isn’t busy anymore.

My take on the (OS X) App Store so far

The App Store … it’s Terrific, Average, and Awful all at the same time.

I’ve been asked a few times now what I think about the app store. Never before has a feature scored terrific, average, and awful all at the same time for me. Here’s the break down.

What’s Terrific
Apple has made the integration as sweet and easy as System Update, with a trivial installation process that just works universally.

But that’s not the part that has me whistling Dixie — it’s that applications no longer use serial numbers nor do they phone home, instead they use cryptography. Nothing to pollute your network traffic. No software failing validation checks on a plane unable to reach a server.

And, given that I can now run software I paid for on machines owned by me, that’s a big win.

Plus, it unifies the Apple-culture a bit more in that upgrades work the way you expect: you don’t have to always reach for your wallet or buy stupid subscriptions.

What’s Average
The user interface, while simple, still isn’t hammered out in that perfect design that ever-so-well fits the problem space that Apple’s known for. For instance, under certain circumstances, buttons don’t behave the same way potentially causing one to purchase an unexpected item.

The store is missing a CONFIRM button before purchases, a CANCEL button as it’s happening, and more importantly a RETURN UNOPENED if it gets to the doc.

Many apps that have been acquired from other means don’t show up as INSTALLED, making for a very bumpy upgrade path. Others work just fine. Hopefully that will stabilize in the future.

What’s Awful
Some apps are dumbed down in terms of functional restrictions of the features we know and love due to Apple’s Terms of Use. There’s also fears of rejections by Apple, in addition to dealing with the approval process that still doesn’t feel completely worked out or entirely equitable between similar applications or that could be considered competitive.

Browsing the App Store, one notices the gross lack of a Genius mode.

Plus, while there are supposed to be a bazillion apps out there already, only a small handful appear to be browseable. This raises concerns that a popular app may drown out a cheaper and better competitor. Hopefully there will be more ways to slice and dice the browsing experience.

However, two major complaints are still outstanding and pretty valid.

One is that most of the apps on the App Store are crap — the easy distribution mechanism has flooded the market with apps of low interest of quality. It’s like when everyone published a flashlight app for the iPhone, and iFart was the talk of the town. For the historically minded, it was like when Atari opened its console system, and while it had the most game, only a handful were worth playing. Hopefully the rating system will help this problem. In the meanwhile, each ugly app drags the reputation of the App Store down a notch; unless the ratio reverses, the App Store will take on the same appeal as a yard sale.

Two is that many of the apps are priced in ways that don’t make a lot of sense. Someone produces a fantastic game, and it’s a dollar or less. Someone else produces a horrible looking monstrosity and charges $19.95 for it. The costs don’t reflect the features or quality. And, while good in the short term, and just the short term, we may see a plunge much the way that most iPhone apps cost 99 cents.

Caution – the new Mac App Store just bit me

Be VERY careful when using the Mac App Store — here’s how it purchased an app without my permission, along with THREE simple things Apple could have done to fix the problem.

Admittedly, I had my skepticism about how an App Store was going to fair servicing applications to the desktop.

The majority of Mac users seem to quickly grasp dragging an icon to a folder or double clicking the installer; the “hard” part is unzipping a file or opening a disk image file. But perhaps there is a target audience that still has a hard time of installing apps and keeping them up to date.

The downsides I expected were the less obvious things: Apple wanting a chunk of each sale resulting in trickle down inflated prices (though for the moment quite the opposite seems to have happened), certain established apps getting marketing preference due to historic purchases rather than innovative replacements getting visibility, the fear of embedded application ads becoming mainstream in the Mac culture, etc.

I saw up sides too, with copy protection and serial number issues going away. This of course had other down sides, such as apps having to check in with the Internet. I figured this meant a lot more problems for the publishers than the end consumers.

Seems I was wrong about that. I just got bit by the App Store.

I made my first Mac App Store purchase today, and in order to do so I had to authenticate. And, I’m happy to report, the purchase process works exactly as described — the application was downloaded and installed seamlessly. Go Apple!

I then decided to see if there was an update to Aperture, which I had commercially bought. Sure enough, when I went to its page, it said it was already Installed. Clever. Well done, Apple.

This is where things start to get weird. Non-Apple applications, like Coda, which I had externally bought and purchased a while back correctly showed up as Installed as well. This was nice.

But, then I noticed that a packaged I had already purchased, had a license and receipt for, and was already installed, OmniGraphSketcher, was in the App Store, too. It did not show itself as installed. And, wanting to see if it was a newer version, I clicked on it — and next thing I know, the App store begins to purchase it.

The problematic BUY button.Fundamentally the problem seems to be that the purchase button behaves differently whether or not you’re authenticated. Plus, you’re two pixels away from Copy Link / Tell a Friend from an actual purchase.

For me, it was an unexpected $30.00 hit to the wallet simply because the buttons didn’t behave the same way they had a moment ago. That’s just not right, especially not from Apple who studies user interfaces with the same passion you or I crave oxygen.

While I’m screaming, “No, no, no, NO, NO!!!” at my machine, which doesn’t help by the way, I was taken aback that there was NO CONFIRMATION process, nor was there a CANCEL option, nor was there a RETURN UNOPENED option.

Bad Apple, bad.

Because I had previously authenticated for a prior application, it blindly assumed I authorized this purchase. That’d be like buying one item in a store, and after the cashier touched your credit card, anything else you picked up in the store would get bought too.

I’ve just written to Apple at http://www.apple.com/support/mac/app-store/, and we’ll see where that goes.

UPDATE: Got a very kind email from Apple who credited me the correct amount, but for the wrong line item. I sent them a follow up because I want the right developer to be paid.

If this is an indication of how Apple will deal with application purchases in the future, we can all breath a happy sigh of relief. My own hesitations about exploring the App Store have been lightened. Plus I know never-ever-ever touch anything that looks like a price tag button, instead click the icon which doesn’t look clickable.

Apple’s Discussion Boards

An amusement – notice how many of the Apple discussion threads report “2 Helpful, 1 Solved” and not only is the issue unsolved, but often there aren’t even three messages in the thread. Something’s broken, and apparently Apple doesn’t care.

I find it annoying that many of the the Apple Discussion Boards that I browse show “2 Helpful, 1 Solved” as the status to the message threads.

And it’s not that just it has this status wrong, but that often there aren’t even three messages total in the topic.
Apple Discussion Boards: Helpful 2, Solved 1

I’ve reported this problem to Apple in the past, but it’s been ignored for years.

Where’s my JDK?

Caught in the Java depreciation battle under OS 10.6 and can’t find where the Java Development Kit (JDK) now resides? Here’s a command that will tell you, allowing you to still use InteliJ and other IDEs on OS X.

There’s a lot going on with Java at the moment. Oracle acquires Sun, putting the language in squarely in hands that don’t inspire trust; the same thing happened with MySQL. Meanwhile, the Apache Software Foundation quits the Java SE/EE Executive Committee. And now Apple deprecates Java, and the reason doesn’t appear to be what you’d think.

Starting with OS X 10.6.3 update, developers got caught in the back lash. Things moved on the file system.

Upgrading IntelliJ, the IDE was asking me where my JDK was, as it certainly wasn’t where the software, or I, thought it should be.

You won’t find the location using /Applications/Utilities/Java Preferences.app.

But you can find it with some digging. Thanks to this developer release note from Apple, the following command from Terminal will spew out some XML.

$ /usr/libexec/java_home –xml

Find the dictionary section that has ‘x86_64’ in it, and you’ll find an entry that has a ‘JVMHomePath’ with something like:

/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home

You want to provide this full path to the IDE as where the JDK lives.

It’s worth pointing out that Apple recommends that if you install any 3rd party JVMs they should be installed in /Library/Java/JavaVirtualMachines or ~/Library/Java/JavaVirtualMachines.

Competitors?

An opinion piece: are Apple and Microsoft competitors? This line of reasoning says no.

Who made the spoon that you used to eat your breakfast cereal this morning?

Every once in a while I’ll hear people talking about how Microsoft and Apple are competitors. As someone who’s technology agnostic, I don’t see the world in such shades of black and white. Here’s my reasoning as an outsider comparing the two.

Apple is a hardware company, their goal is selling as many units of whatever as possible, whether it be computers or mp3 players. With a focus on design and user experience, backwards compatibility takes a back seat to form and functionality. They excel at elegance and minimalism. They aim sharply at the home user. Disposability is ok. The next big thing is the future.

Microsoft is an operating system and business application vendor, their goal is to put that software on to as many pieces of hardware as possible. They are an industry leader in office applications and software development environments. They aim sharply at business and government. Backwards compatibility is highly important. They’d run on toasters if they could.

Is there overlap between the two? Sure, some. Is it a make or break difference? Not really, much is a matter of preference and familiarity.

I twitch anytime I hear someone say OS X is more “intuitive” than Windows; the word they’re looking for is consistent. Coarse application design is more similar, meaning once you get over the learning curve, subsequent new challenges have a ring of familiarity.

But more importantly, are the two environments mutually exclusive? Not at all. That’s why platform agnostics run both systems. Some things are just easier to do in some environments than others.

The operating systems wars and the phone wars are about luring people toward purchasing something from that camp. But look closer. MS-Office runs on OS X, and quite nicely. Safari and QuickTime run on Windows, and quite nicely. Once you’ve made the purchase of their crown jewel, the fighting appears to stop.

Users, on the whole, don’t care (and often don’t understand) about the underlying system. They just have a problem they want to solve, learn how to do it once and without change, and any tool that gets the job done will do.

Just like my spoon.

Camera is in use by another application

Trying to video conference with Skype and getting a message saying the camera is in use by another application with no video feed sent out? Try this.

Blind SkypeRecently I was attempting to use Skype, but it reported that “Your camera is in use by another application” and I couldn’t get any video feed, though the camera turned on.

Then I found this post which suggested removing the file
/Library/QuickTime/CamCamX5.component from the system, although I found it’s possible just to move it out of that directory.

Restarting Skype, the video conference worked perfectly.

Yahoo concurs. Here’s more on CamCamX. And here’s another thread saying to remove it.

Operating System: OS X 10.6 (Snow Leopard)

NTFS on OS X

Trying to write to an NTFS volume on OS X, and all you find are third party packages and complicated config file manipulations asking you to reboot? Do this….

Every once in a while someone brings over an external NTFS formatted drive and plugs it into my Mac to exchange some large data sets. While the Mac can easily read NTFS, it doesn’t appear to have the capability to write to that file system.

Appears is the operative phrase.

If you search for a solution in the open, you’ll find companies selling commercial products, drivers, and mounters. Some people have posted complicated looking instructions telling instructing you to mess with low level system files, that may or may not exist, ending in a full system reboot that typically solves the problem for that lone drive.

NTFS on OSXHere’s the generic no-software required solution.

First connect your NTFS drive to the Mac, it’ll mount with some name like “My Disk.”

Open a Terminal window and enter the command:
$ mount

The mount command will tell you what drives are listed. Find the one that has your drive name listed in it and copy the device name:
/dev/disk1s2 on /Volumes/My Disk (hfs, local, nodev, nosuid, journaled, noowners, mounted by me)

Now eject the drive, but don’t disconnect it from the machine.

Go manually create the directory (shown in bold above); this is where the mount point will be:
$ cd /Volumes
$ mkdir My\ Disk

NOTE: The backslash escapes the next character, in this case allowing a space in the directory name.

Now, mount the drive as read-write using this command:
$ sudo mount -o rw -t ntfs /dev/disk2s1 /Volumes/My\ Disk

Make sure that you’ve used the same device location you copied down the the prior steps.

At this point your drive should appear on the desktop, and you ought to be able to read and write to it just fine. No rebooting necessary!

Note that you can get to it from the Terminal as well:
$ cd /Volumes/My\ Disk
$ ls

Note that sometimes Finder may act a little wonky with timing problems and a huge file. Apparently the underlying Unix system has no problem. You can copy a big file to the drive:
$ rsync –progress SuperBigFile.zip /Volumes/My\ Disk

Or a whole directory:
$ rsync -r –progress LargeDeepDirectory /Volumes/My\ Disk

When done, make sure you are not running any programs that are accessing the drive or have their current directory set to the drive:
$ cd /Volumes

Then, eject the drive normally, or unmount it from the command line — your choice.
$ sudo umount /Volumes/My\ Disk

Full disclosure and warnings: This was tested on OS X 10.6.5, though support has been around to do this for a while. And, any time you’re doing something that deals with questionable file system access, make sure there’s nothing on the drive you don’t mind losing. Have a backup. There’s always a slight risk, but it’s very close to zero — why state all this? Because I assume no responsibility if something goes wrong.