Two Features To Make Lion’s Launchpad Perfect

One of the features in Lion that I didn’t think I would like has become one of my favorites: Launchpad. This is essentially Springboard from iOS, but for the Mac. It’s a nice iOS-like view of your /Applications folder, that you can get to by pinching on your trackpad using your thumb and three fingers. Once it opens, you see all your installed applications, with multiple pages, just like in iOS. Swiping left and right with two fingers switches between pages. Single-clicking an app runs it. Holding down Option makes the icons “go wiggly,” so you can move them around, just like in iOS.

The main problem is that you have to move apps around just like on iOS: one at a time. It makes sense on a touchscreen to only let you move one thing at a time, but on a traditional computer, it’s a limitation. My first suggested feature, then, is Apple should add the ability to select groups of icons and move them between pages as a group. It might also be nice to have a “consolidate” option that would just squeeze the apps onto as few pages as possible.

Which brings me to the second feature I’d like to see: pre-defined sort options. I like to have icons show up in alphabetical order, so having a menu option to “Sort Ascending” or something like that would be nice. I can also see something like sorting by most-recently used, so the apps you have recently used show up first. Or maybe a most-used sort, so those apps you use the most are at the top of the first page. Of course, they need an “as arranged” option so they show up how you arrange them.

These should be easy additions, and Apple should have already thought of them. I hope they will be in an update soon.

My Lion “Clean Install” Saga

Updated! Scroll down for the latest.

I upgraded my 2011 Macbook Pro and my 2006 Mac Pro to Lion on Day 1. The MBP has had no problems at all. The Mac Pro, on the other hand, was acting a little squirrelly. For example, after installing Xcode 4.1, iTunes could no longer see my iPhone or iPad when I attached them. Looking in Console, I saw errors about trying to start usbmuxd, but not being able to find it. This is because /System/Library/PrivateFrameworks/MobileDevice.framework had been gutted. Only a few files were left, none of which were the files in question. I could tell when they went missing from looking at the Time Machine backups, and it was the Xcode 4.1 installer’s fault. Xcode 4.1 also crashed on startup, every time. I had also been having some strange goings-on between my AppleTV and iTunes. All in all, I figured maybe a clean install was warranted. After all, I have never done one. I bought this machine new in 2006, and it came with Tiger. I then upgraded to Leopard, Snow Leopard and now Lion.

So I made a bootable Lion disc this morning, booted from it, repartitioned my hard drive and then started the install. It took a while. Finally, it asked me if I wanted to transfer data from another machine or from a Time Machine backup. I selected Time Machine, picked the backup to restore from, and then unselected the stuff I didn’t want to come over. I noticed that ~/Library was not shown, so I assumed that meant it would not be restored. I was wrong. Once I got into the system, I could tell that ~/Library had been restored. That meant that a good deal of the cruft I was hoping to cleanse was now back. So I started the whole process over again.

This time, when it asked if I wanted to transfer/migrate/restore, I said “no.” I ended up at a clean desktop, with no customizations, just like you would expect. I started restoring things from Time Machine, starting with my iTunes library. I have over 230GB of stuff in iTunes, so when it was finished, and I tried to open iTunes, I was a bit shocked when it said it couldn’t open the iTunes folder because it was on a locked volume. Clearly it wasn’t, but something was up. I ended up finding a command that seemed to fix this, but I also noticed that the gid on some of the files was wrong. So I typed

sudo chown -R jgibson:staff .

and shortly thereafter, iTunes was happy. But then I tried to restore my Documents folder. It got through a few of them, and then died with a similar message. Upon closer inspection, I could see part of the problem: the group id (gid) of all of my files in the backup was 501, but my current gid was staff (20). The group 501 doesn’t exist on this system (that’s a relic of a previous OSX version), so I figured I could just chgrp the files and all would be fine.

Except it wasn’t. As root, I was able to change most of the files and directories to have the proper gid, but some just responded with “operation not permitted.” That’s it. No further explanation about why or what to do about it. This was probably the crux of my problem, but I couldn’t fix it, even as root. I scoured the web, looking for answers, and found several, like ensuring the uchg flag is not set. I did so, but the problem persisted.

Next I decided to create a group that had 501 as its gid and add myself to it. Once I did this, the files in the backup volume now showed the new group’s name instead of 501. I thought I was home free. I was wrong.

I tried to change the gid of the files, but couldn’t. I figured I would need to logout and back in, since group changes usually require that on a Unix-y system. I did so. And then I noticed something else. None of the changes I had made to preferences or the dock had persisted. I use a Microsoft keyboard, so I had swapped the values of the Command and Option keys; they had reverted. I had removed Photo Booth from the Dock; it was back. I had changed the settings for Terminal and chosen “use settings as defaults;” the defaults had defaulted to their defaults.  Something else was definitely going on. After spending a few hours trying to find anything that looked possible, I gave up. I decided to start yet another install, and pay close attention to see if there’s something I missed. Perhaps when I first tried to restore from Time Machine, I ended up bringing across some bizarro setting that caused the whole thing. I don’t know. I’m frustrated and concerned and really tired of messing with this stupid thing today. This is not how I planned to spend my Saturday.

Dear Steve, this is not cool. I have no idea what’s going on here. Why the f@*k should I not be able to restore from Time Machine and have it set permissions properly? Why the f@*k should I see messages telling me what happened, but not why or what I might do about it? Why the f@*k should iTunes think it was on a locked disk when it wasn’t?

I will keep updating this post as my latest install progresses…

23:45 Update: I did a third clean install and everything seems to be OK. At first my preferences were not being saved, just like before, but after a couple of logouts/reboots, it occurred to me that the installation DVD was still in the drive. I took it out and rebooted, and now things were working as expected. I can’t prove it, but it seems to me that the system was booting from the DVD, even though it didn’t appear to be. Or just the presence of the install DVD caused the OS to mount the main drive “differently.” I can’t say, but removing the DVD seems to have fixed the problem.

Once I realized that preferences and settings were getting saved and survived logouts/reboots, I started restoring from Time Machine. Rather than trying to do several directories at a time (Documents, Pictures, Music, Movies, etc.) I did them one at a time, verifying things once each restore was complete. I got none of the “operation not permitted” or “can’t copy because you can’t read the files” errors, which was a nice change.

After restoring my Music folder, I updated iTunes to the latest version and ran it. It came up fine, found my library and everything was fine.

Since I’m running up against my draconian Comcast bandwidth cap, I tried to copy things from my MBP where possible, rather than download them. I was able to copy several gigabytes of stuff over, which was nice. I was a bit worried that I wasn’t going to be able to copy the “Install Xcode” package, because when I tried, I did get the “you can’t read this” error. I had set everything to what I thought was proper, but still no go. So I tarred the whole package up and copied that. I untarred it on the Mac Pro, then from Terminal, I went into the package to inspect. Instead of a gid of “staff” it was “admin.” I did a chgrp on all the files in the package, and then ran it. It installed without a hitch and at the end, Xcode fired up just like it should.

The real test was did it destroy the MobileDevice.framework directory like it had before. Covering my eyes, I navigated to the directory and took a peek: everything was there! So then I plugged in my iPad and Xcode saw it, iPhoto saw it and iTunes saw it. The trifecta, w00t w00t!

I did end up having to reinstall iWork ’09 from DVD, and I had to reinstall iPhoto from the app store, which meant a 700MB download, but that was the only one.

So, if you decide to do a clean install for Lion, make certain your backups are good and once it seems to have finished installing, and dumps you to the Finder, don’t believe it! Eject the DVD and reboot.

OSX Lion To Lion File Sharing Not Working – How To Fix It

After upgrading both my Macs to Lion on Wednesday, I discovered this morning that I can no longer mount shared folders between them. I tried going in both directions, and both failed with a very non-intuitive “Connection failed” message. I went to Preferences, Sharing, File Sharing and tried turning it off and on again, but to no avail. I then tried googling for the problem and saw lots of people with the same situation, but this one guy hit upon the “solution” to get it going. You have to turn off AFP sharing, and just leave Windows sharing on. Here’s the original answer. To summarize:

  1. Go to Preferences
  2. Click on Sharing
  3. Click on File Sharing on the left-hand side
  4. Click the Options button
  5. Uncheck “Share files and folders using AFP”
  6. Check “Share files and folders using SMB (Windows)”
  7. Click the Done button.

At this point, you should be able to connect from the other machine. If you need to go in the other direction, perform these same steps on the other machine.

Steve, please get this fixed ASAP, OK?

Xcode 4.1 Not Installing? Try This.

Apple released OSX Lion earlier today, but Xcode 4.0.2 is not compatible with it. Later in the day, they released Xcode 4.1 for Lion through the Mac App Store. I saw some comments from people saying that at about 80% of the way through the installation, they got a popup telling them they needed to quit iTunes in order to continue, but iTunes wasn’t running. They were unable to continue.

Here’s what they missed: iTunesHelper. This is an additional iTunes process that is running, even when iTunes proper is not. It’s there so that when you attach an iOS device, it can fire up iTunes for you.

Go into Activity Monitor and find iTunesHelper. Select it, and then kill it. After a second or two, the “you need to quit iTunes” dialog will go away, and the installation will complete.

Make a Copy of the OSX Lion Installer BEFORE You Run It!

If you’re planning on downloading OSX Lion from the Mac App Store and installing it on multiple Macs, heed my warning to make a copy of the .dmg file before you actually install it. I learned the hard way this morning that once the install is complete, it deletes the installer. That’s a 4GB file, by the way. And it’s not in the trash can; it’s completely gone. If you fail to make a copy of it, as I did, your only option, apparently, is to re-download it on your other Macs. Which is fine, unless you are a Comcast customer with a bandwidth cap and a draconian exceed-the-cap-twice-in-six-months-and-we-cut-you-off-completely plan. I accidentally exceeded the cap last month for the first time, so I’m extremely conscious about my usage now. I’m pissed that I need to re-download a 4GB file.

Steve, you have failed me. It is asinine to automatically delete a file so big without asking me. I understand that some people are short on disk space, and may not want that big file hanging around, but for those of us who have lots of space available, let us decide whether to delete it or not.

MiddleClickClose: New Home!

For those of you who have been pining for a working 64-bit version of MiddleClickClose, your patience is about to be rewarded. A fellow called Tom has taken the MCC code, gotten it working with 64-bit Safari and has moved it to its new home. I am no longer maintaining the code, since I don’t use Safari, so from now on, here’s where you should go for MCC:

There you will find all the source code so you can see how it works, or make changes yourself. If you are only interested in using it, you can get a binary bundle here. I haven’t tried it, but Tom assures me that it works. 🙂

Thanks Tom-of-no-last-name for taking over the code.

MiddleClickClose Will Work With Snow Leopard But…

12/02/2009 Update: MiddleClickClose has been updated for 64-bit Safari. More info here.

I have upgraded my Mac to Snow Leopard, and as soon as I loaded Safari, I could see that MiddleClickClose was no longer working. I had already heard from someone that this was so, and I had expected it, so this was no surprise. It is possible to get it working again by right-clicking (or whatever the native OSX clicks are to get the context menu) on the Safari program in /Applications, selecting Get Info, and then checking the “Open in 32-bit mode” checkbox. Once you do that, SIMBL and MiddleClickClose both load, and the plugin works. But you’re in 32-bit mode.

MiddleClickClose is totally dependent on SIMBL. If SIMBL won’t load, neither will MiddleClickClose. The solution is, most likely, to get a 64-bit build of SIMBL, but I don’t know if that’s a simple matter or not. The SIMBL developer has said that he only has a PPC machine running Tiger, so I don’t really see how he’s going to get it running. If he does, then maybe there is hope. If not, your only option is to run Safari in 32-bit mode.

Or use Firefox, which is what I do.

MiddleClickClose Updated For Future Safari Versions

08/31/2009 Update: For Snow Leopard compatibility, see here.

Yesterday Apple release Safari 4.0.3 which, of course, broke MiddleClickClose. Again. The problem lies in the file Info.plist that is part of the plugin. From what I read about SIMBL, good practices said that you should include a key called MaxBundleVersion whose value was the internal version number of the app you were patching. The problem is that every time Safari gets updated, Apple increments that number and SIMBL won’t load the extension any more, since it proclaims that the maximum version of Safari it should be loaded with is the previous version.

I usually play catch-up with Apple and get MiddleClickClose updated a day or two after a new Safari ships. I’ve decided to stop that and have removed the MaxBundleVersion from the Info.plist. This is, after all, a dirty hack, so why not make it even hackier?

If you re-download and re-install, you shouldn’t ever need to update it again. If you already have it installed, you can just edit the Info.plist file that will be in ~/Library/Application Support/SIMBL/Plugins/MiddleClickClose.bundle/Contents, removing the two lines that look like this


Here are the new downloads

MiddleClickClose for Safari 4.0.1

A day or so ago Apple released Safari 4.0.1 and bumped the version number in the process. Safari 4.0 was 5530.17, while Safari 4.0.1 is 5530.18. After installing the update, MiddleClickClose was still loading, even with the minor version mismatch. I don’t know if Safari only looks at the first part of the number when specified in an Info.plist for MaxBundleVersion, but just to be on the safe side, I bumped it to 5530.18 and have re-released it. If it’s working fine for you, don’t bother getting this version. That’s the only change I made.

Huzzah! MiddleClickClose Working In Safari 4!

08/31/2009 Update: For Snow Leopard compatibility, see here.

08/13/2009 Update: It should now work with all future versions of Safari without having to update it again. Read about the change here.

06/09/2009 Update: Apple released the production version of Safari 4 yesterday at WWDC. I have just updated the plugin distribution, so if you download it now, it should work. If you already have it installed, follow the directions below for changing the version number to 5530.17 and your old installation should work. If you don’t yet have it installed, follow the directions here.

Thanks to Sylvain Frébourg, MiddleClickClose is now working with Safari 4. The fix is quite simple: change the MaxBundleVersion in the Info.plist file from what it was, to 5528.16. I know that I tried that, because I could see warnings about an incorrect version whilst watching Safari start up on the console. I must have changed something else at the same time and not realized it, because no matter what I set the version to, it wouldn’t load. Anyway, I reverted my SIMBL install and my SIMBL plugin directory from back in January using Time Machine, made the version number change, and now it works. It helps to be methodical, and I was not.

So, there are two ways you can go about getting it working for you. You can edit ~/Library/Application Support/SIMBL/Plugins/MiddleClickClose.bundle/Contents/Info.plist, changing 5525.13 to 5528.16 5530.17, or you can download a new zip file and re-install. Either way should work.

If only Apple would build this functionality into Safari itself…