Mac OSX

Recovering the Safari address field

Tags: 

Apple's Safari is my browser of choice on OSX - it's fast, it has a great RSS reader, and it's generally very stable. Occasionally I run into glitches with it, though.

A perfect example is what happened to me tonight. The machine had been running a bit slow having been unused all day, and when I tried to start interact with apps it was taking them a few moments to get caught up. I should note that I also am having problems with my MacBook's armrest that has started clicking the mouse button if I press on the wrong area. Anyway, while the apps were warming up I accidentally dragged the address field / address bar out of the toolbar then watched in horror as it went poof and disappeared.

201002181927.jpg  

Not to much of a problem, I thought, and I went to change the toolbar settings to restore it, only the Customize Toolbar window wouldn't open. Further, the "Open Location" menu item was disabled.

201002181927.jpg

ARGH!

I tried searching online on ways to recover it but all of the suggestions boiled down to "reset it through the Customize Toolbar window", which obviously wasn't going to work.

Thankfully I was aware that Apple uses XML-like property-list, or "plist", files to store settings for most of its applications. I also knew that there were preferences files in the "Preferences" directory of the "Library" in my home directory, one for most of the applications I had installed, including one named "com.apple.Safari.plist".

Opening this file brings it up in OSX's Property List Editor tool which provides a tree-like interface into the various properties that have been assigned. Just what was needed.

201002181929.jpg

Unfortunately the Property List Editor tool doesn't include a search so you have to just trawl through all of the settings until you find what you want, or something related, or something that might just look like fun. The problem I was having was related to the Toolbar and there was a large number of items that could be added to the toolbar, so I started looking for something with the word "Toolbar" in the name that contained sub-items, i.e. an array.

After a bit of searching I found the "dictionary" object "NSToolbar Configuration SafariToolbarIdentifier" which had the sub-property "TB Item Identifiers".

201002181934.jpg

Guess what this contained - yep, you guessed it, an array of strings named "BackForwardToolbarIdentifier", "StopOrReloadToolbarIdentifier", "HomeToolbarIdentifier", "PrintToolbarIdentifier", "AddBookmarkToolbarIdentifier", "OPToolbar1Passwd", "WebSnapper" and, lastly, "InputFieldsToolbarIdentifier". My Safari toolbar only had five items, not the eight in this list, but at least it had relevant-sounding names.

201002181937.jpg

A moment later I noticed that right beside this dictionary was another one named "NSToolbar Configuration BrowserWindowToolbarIdentifier", which also had an array named "TB Item Identifiers". This list was shorter.. only five items, and each of them seemed to be the items that were showing in my toolbar.. Was this what I was looking for?

201002181938.jpg

Before I dug further I closed Safari so it wouldn't try to overwrite the file I was trying to manually modify. I then went to the "TB Item Identifiers" array and clicked the "Add Item" button, which added an "Item 6" entry to the array; making a guess I copied the "InputFieldsToolbarIdentifier" item from the other array and pasted it in as the value for the new "Item 6".

201002181939.jpg

I then saved the file and opened Safari...

201002181925.jpg

Yay! :-D Problem resolved, back to life as normal.

Wondershare iCollage bug - images thumbnail pane wrong size (updated)

Tags: 

When adding images to an iCollage project it is common to use its iPhoto integration and directly load images through the image selector sidebar.  This sidebar is opened by clicking the Image icon in the bottom toolbar and it pops out a bar with a list of albums at the top and the images at the bottom.  In theory this is would be a great system, but there's a problem - when you have a lot of photos in an album (which will happen a lot for the average user) the pane that lists the image thumbnails is sized incorrectly so you don't see the images at the bottom.

iCollage photo pane slider bug, with annotations

(click to view the full-size version with annotations)

Update: After submitting this bug report to Wondershare and explaining to them several times that the problem had nothing to do with resizing the images, they finally accepted there was a bug and said they would pass it to the developers to resolve.  Am not holding my breath.

Attachments: 

Wondershare iCollage for Mac is VERY buggy, company not very helpful

Tags: 

Ever since moving to using a Mac as my primary computer I've wanted a simple app for building photo collages, cards, etc - something more than what iPhoto itself provides. After looking around the only one I could find that was reasonable was iCollage from the company Wondershare.

I happened to find it on sale via MacZot so tried the demo only to start running into problems.  I submitted some bug reports via their official support site and, after a long wait received a response saying that because it was the weekend their support staff would respond on the Monday.  Due to the deal running over a weekend I figured I'd risk it and bought the app.

The following Monday came and I started into a discussions with their support staff that went on for two weeks.  The delay in getting to the bottom of the issues left it too late to use iCollage for the project in mind I had so I left it alone.

This past weekend I decided to do a small collage for my mother's birthday and pulled up iCollage.  I manually resolved one of the bugs seen I'd seen before and started working on my project.  Well, let me tell you, I've never dealt with such a buggy, unstable piece of software before, it's surprising they released it for sale in its current state, there doesn't seem to be any way to work with it for more than a few minutes without it crashing!

So after submitting more bug reports and opening up another can of worms I figured I should start to publicly document some of the problems to warn off other potential customers.

Just to clarify: if Wondershare release a version of iCollage that is a) stable, b) resolves some of these issues, I will be more than happy to update these blog posts to note this fact; until then, I will continue to publicly document the bugs I find.

iCollage bugs:

  • Images thumbnail pane size is incorrect, hides images.
  • Does not recognize iPhoto library if files moved.
  • Templates list is incorrect out of the box.
  • Support system does not display the body of the original message, either that or they remove the text.
  • Emails from their support system can include URLs back to the tickets that are invalid.

More soon..

Full-screen browser for OSX - PlainView

Tags: 

Building my presentation for the FL Drupal Camp I was stuck - neither Firefox nor Safari would let me do a full-screen browser display so the audience was going to be stuck seeing my title bar, browser window border, tool bar, etc - not terribly good for a presentation. A bit of searching later I discovered the perfect solution - PlainView. Built on the same WebKit engine that powers Safari (OSX's built-in web browser), it very simply gives you a border-free, toolbar-free browser that can be made to display in the full screen, hiding everything else. It suited my needs perfectly, I'll definitely be using it again and strongly recommend it.

Moving your TimeMachine

Tags: 

It's bound to happen to everyone, they outgrow their TimeMachine and want a new one, a bigger one, one that will allow them to go further into the past... I'm talking about OSX's built-in backup system here, I don't know what you were thinking..

So ever since starting to use OSX Leopard I've been using TimeMachine to keep a running backup of my laptop for two reasons - I can instantly jump back to an old revision of a file, and it keeps a near-constant mirror of the OS as it is with all of the software & settings intact. My laptop came with a 120gb drive and I've been using a 160gb USB drive for TimeMachine. Obviously enough, when this is my main machine I move a lot of files around - download lots of files (all legit), delete some, move others to a file server, but with TimeMachine keeping a regular hourly backup of all change files it can end up bloating up pretty quickly. Sure enough, within a few short months I'd filled up the drive and for the past three or four months it regularly informs me that it has flushed some older backups in preference to keeping newer data.

It's 2009 and hard drives of all sorts are insanely cheap. Taking advantage of the early sales I snagged a 320gb replacement internal drive for the laptop and a 500gb external drive for TimeMachine. Incidentally, both of the drives were made by Seagate, as all of my drives are, as all of their drives (at least up through their January 2009 new models) come with a five year warranty, so between backups I'm (mostly) guaranteed five years of usable storage.

Moving on.

I personally don't like moving data off a primary drive due to the inherent reliability problems of external storage - if it's important data then it needs to be on an actively used internal drive, not on a DVD or CD sitting on a shelf somewhere for grubby little fingers to play with (or get knocked over), and definitely not on a USB memory key that's going to get put through it's paces in the next laundry cycle. All external storage formats should be used for backups exclusively. End of story.

So, in order to keep my data intact I planned a drive shuffle. First I was going to migrate the TimeMachine backup data to the new external drive, then I was going to swap out the internal drives and follow up with a quick restore off the backup drive to the main OS drive. Simple enough, and something I've done before.

Well the first step, as mentioned, was to migrate the 160gb (actually only 145gb due to drive companies lying about the size of a "gigabyte") to the new 500gb drive so I could retain the last few months of data as an active backup. That seemed simple enough. Because the drive comes pre-formatted for use with Windows (NTFS), I plugged the new drive to my laptop, ran the funky Seagate software installer & allowed it to wipe & repartition my drive for OSX. After rebooting (yeah, go figure, silly company) I has a 465gb usable drive. But it didn't have my TimeMachine data.

The official guideline on migrating TimeMachine data is to use DiskUtility to "restore" the data to a new drive - odd terminology, but it kinda makes sense. Well, for some odd reason it started giving me an error when I tried this. Just to be sure (and because computers make us crazy by expecting different outcomes for repeating the same procedures) I tried again, and sure enough, the same error.

Poop.

A quick google later and I find two shareware utilities that might also do the trick - CarbonCopyCloner and the amusingly titled SuperDuper. Long story short - both tools would run for a few minutes and then seem to get stuck, sitting with zero change in progress while saying they're copying this file that's actually rather tiny (so it wasn't that it was just moving a huge file). Enough of that, back to google.

A bit more research turned up an article on the excellent MacOSXHints.com which detailed how to use the UNIX tool dd to copy a drive, including to use it to recover lost data off a partition. So I gave it a spin.

The instructions are simple. First off, use the tool "df" to find out the exact location of the partitions or drives you wish to copy (the first column marked "Filesystem"), e.g. the 160gb drive showed as "/dev/disk3" and its partition as "/dev/disk3s2", while the 500gb drive was "/dev/disk2". Then, once you know the drives you just run the following command: "dd olddrive newdrive" e.g. "dd /dev/disk3 /dev/disk2".

Well, while I was overjoyed that my first h@rDk0r3 use of UNIX in some time actually started to do something, I was dismayed to see it say the average copy speed was "1705KB" i.e. 1.7meg per second, and at that rate would take 26 hours to complete. Bummer. As it turns out, by default it works with tiny 512byte data blocks, which obviously takes FOREVER.

While researching it I come across another tool that bids itself as a simpler tool for migrating partitions called "ddrescue". I do a quick download, compile and run, and sure enough it's using the same block size. Sure enough, there's a handy little option called "--block-size", or just "-b" for short, that lets you tell it to use larger blocks of data at a time. A quick "-b 4096" later and the transfer speed jumped to ~5KB. Good enough, though it still took six hours.

After the six hours I now had a drive that seemed to all be there, but it only said it was 145gb and my efforts to resize it with Disk Utility just gave a wonderfully error that says "Error with partition: MediaKit reports partition (map) too small".

Back to the drawing board.

I then thought "maybe I have to copy just the partition instead of the entire drive. Six hours later... and I was left with basically the same thing - Disk Utility said that the entire drive was in one large 465gb partition, but Finder said it was only 145gb.

Back to the drawing board. Again.

And back to Disk Utility.

This time around I deleted the existing partition first so that the 500gb drive was completely blank. I then set the Rescue action to erase the destination. Four hours later it had copied all of the data, another two hours later and it had verified the data.

Golden. Or so I thought.

I now have a single, 465gb partition that shows up in Finder and Disk Utility. The only problem is that Disk Utility says that the drive itself has no partitions! While I'm stumped, I think I'm going to count my blessings, just deal with it - TimeMachine works again, and if I find a fix I'll post an update.

Pages

Subscribe to Mac OSX