Wednesday, 27 March 2013

cleaning up messy "open with" menu's in OSX


If you use your Mac for any period of time, you will find the need to open a document with a different program other than the one set as default. The "Open With" menu appears in the Finder whenever you right-click or control-click on the icon of a document. The "Open With" command is designed to give you a list of alternative choices to handle the file that you've selected, but after long-term use you will find this list can get a little bit messy.
Duplicate entries in your "Open With" menu can be easily cleaned via a simple terminal command, methods that'll work in OS X Mountain Lion. I will also show you how to create a bash script to make it easier to repeat this cleaning whenever needed.
Below you'll find the commands. If you are creating the .bash_profile alias method, remember you will have to quit and relaunch terminal for this to work.
Fix Duplicate "Open With" Terminal:
1
/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -kill -r -domain local -domain user;killall Finder;echo "Open With has been rebuilt, Finder will relaunch"
Fix Duplicate "Open With" via Bash alias:
1
alias fixow='/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -kill -r -domain local -domain user;killall Finder;echo "Open With has been rebuilt, Finder will relaunch"'
view rawfixowThis Gist brought to you by GitHub.
If you are a little shy of monkeying around in terminal and bash, you can use utilities such as Onyx or Cocktail to get the job done.

Thursday, 21 February 2013

Hackintosh installing Lion on Mini-ITX DFI P55-T36


As the proud owner of a relatively older Hackintosh (2010 era Intel Core i7 860 on a DFI Lanparty MOBO P55-T36) I had sort of reluctantly accepted that perhaps this machine was just made to run OSX 10.6 Snow Leopard and nothing further. I had tried to install Mountain Lion relatively early on in my ownership of this system but noticed that the Unibeast installer would just kernel panic instantly and I quickly gave up since i wasn't in the mood to sift for hours through forum after forum for clues and answers. Snow Leopard on the other hand just installed within seconds and nothing major to configure.

As time wore on and my optimism for this system dwindled I finally got some time to try baby steps and attempt to install 10.7 Lion first.

Problem number 1. Lion isn't available for purchase from Apple anymore. Okay this is no problem as anyone who's ever heard of torrents would surely tell you its only a click away. Thats exactly what I did and had it in no time.

I quickly downloaded unibeast for Lion from tonymac's website and was ready to get the show on the road…  but there's just one thing.  All the torrents i could find were merely a InstallESD.dmg file, but unibeast is looking for an app in your /Applications folder called 'Install OSX Lion.app'


Okay after some brief youtube skimming I learned you can fake this setup by simply unpacking the InstallESD.dmg file,  finding the 'Install OSX Lion.app' file at the root of the dmg and merely dragging it into your /Applications folder.  At this point you need to 'show package contents' of that .app file and create a subfolder called 'ShareSupport' and simply drop your original InstallESD.dmg in there and bam you've recreated the purchase from the app store.


I launched unibeast and low and behold it found my valid installer file in /Applications I carried on with the app and then POW, unibeast install fails.  At this point my blood was boiling with this hunk of frustration so i decided to pull up the osx console to look at the logs..   blah blah lots of technical babble of the failure which I googled and after much sifting (of course) almost every result was relating to why 10.8 Mountain lion fails in this scenario because there is a special folder missing called _MasReciept and in this folder is a unique id that proves that you've purchased the OS legit from Apple… /insert record scratch..   okay wtf,  you're telling me this Hackintosh God TonyMac is implementing DRM in his app to ensure Apple is properly compensated for their software but who gives a fuck if they don't get hardware purchases from the millions of hackintoshes he helps build.  okay then..

I then spent a good amount of wasted time trying to implement this _MasReceipt voodoo into my torrented Lion only to eventually discover its Mountain Lion specific and does not apply to Lion.  For Lion all you have to do is simply download an older version of Unibeast which predates this DRM crap.  That version is Unibeast 1.2.0

After a quick google search I was happily rapidshare downloading this vintage piece of software and what do you know?  it happily accepts my fake Lion purchase setup and FINALLY gets me a USB key of 10.7 installing goodness.

So now it was time boot into my unibeast Lion installer and….  Kernel panic. Great after everything i've just been through its behaving exactly like Mountain Lion installer did a few months back. Okay this wasn't completely unexpected so I tried booting again using the boot flag -x in order to boot with safe mode. This did not kernel panic which was a good sign, however; it did leave me stuck at the white apple symbol screen until eventually a circle with a line across it came up which reminded me of older mac OS's when the computer couldn't find a bootable volume. The next course of action was to boot with -x -v so that i could have a safe verbose boot and see what the logs had to say or clues as to why the it was hanging. The last message in verbose mode before it stopped was 'waiting for root device' and it seemed to imply what i had figured, which was that it couldn't exactly find the volume it needed to boot which in this case was my USB key.

Time to waste more time sifting through forum posts and eventually I came across a post about using the boot flag PCIRootUID=1 during boot,  but this didn't do anything for me and neither did a bunch of other boot flags.  It wasn't until more forum sifting eventually revealed to me that one of the first course of actions with unibeast booting problems is to ensure that your USB key is plugged into the back of the computer (directly connected to the motherboard) instead of using front panel USB ports which are controlled by a different controller.  Often times thats all it takes. So I plugged it into the back of the computer and got the same kernel panics, however it made me revisit all of the boot flags that didn't work previously.  After some trial and error it turned out that the magical combo while plugged into the back of the board was boot flag PCIRootUID=0

PCIRootUID=1 which I had tried previously turned out to be a default parameter and thus adding it did nothing,  and adding -x for safemode PLUS PCIRootUID=0 nullifys your PCIRootUID statement because in safemode certain drivers are not loaded which makes PCIRootUID useful.  Exactly what the hell PCIRootUID statement is doing I have no idea,  but it was the magic that was required to get Unibeast booting on the DFI P55-T36 Mobo along with moving the USB key to the back of the computer.

Once fully booted into the installer it was smooth sailing,  the install only took like 10 minutes and as soon as I booted off the HD and got Multibeast running I simply chose the Easybeast method and the Intel Driver for Intel 825xxx series cards so that my NIC is useful after Multibeast install.  I should also point out that for a video card i'm using the Nvidia GT220 which is fully osx compliant out of the box and my audio is provided by an M-Audio fast track USB device.  I never tried to get the onboard audio working with this motherboard but I know it was possible under Snow Leopard so I don't see why it wouldn't also work for Lion or even Mountain Lion.

One last important comment i should make is that its very important to do a clean install of Lion once you have the unibeast installer booting.  You'll also want to avoid restoring data with migration assistant from older accounts too.   I spent too many hours trying to bring back data with migration assistant only to have it bring back some kind of old kexts which would then get my computer all corrupted and kernel panic'ing again.  Instead what I ended up doing was just mounting an old time machine volume and then just manually pulling the data back that I needed piece at a time.   Its not as elegant as i'd wanted but on the plus side at least its lightening fast and stable.

UPDATE** --  I recently released I forgot to mention something about the P55-T36 Motherboards Networking card and Multibeast.   Multibeast includes an Intel IntelE1000e.kext which IS NOT 100% compliant with the P55-T36 and will only intermittently work (on initial power up wont work but if you instantly reboot the machine it will then work).   Instead what you MUST do is download an older version of this kext specifically version 1.0.3.   This older kext is 100% compatible with Snow Leopard and Lion (i haven't tested Mountain Lion but i'm sure it works with it also)

Sunday, 3 February 2013

Making a catalog text file of a volume for archival purposes

navigate to the volume you wish to catalog via the terminal

then enter the following at the command line:


find * > volume.txt

Friday, 23 November 2012

Fixing Missing Delegate Calendars in iCal for Mountain Lion

ever since upgrading to Mountain Lion i've recently noticed that all my shared delegate ical Calendars are not showing up or missing and after looking around for answers on the Apple community forums i came up with a fix that worked for me because apparently this is just a bug in iCal

i did the following:


Login to Google Calendar via a web browser (Safari, Chrome, Firefox)
On the left side, locate the calendar you want to add under Other Calendars click on the triangle to the right of it
Select Calendar Settings from the menu
On the Calendar Details page, look towards the bottom for Calendar Address
On that line, go to the right until you find (Calendar ID:ThisWillLookLikeEmail@GoogleOrSomeOtherDomain.com)
Copy just the part after the colon and before the ending parentheses
Paste it into something (Textedit doc, Word, Stickies, whatever)
Copy/paste the following bolded text before the Calendar ID:https://www.google.com/calendar/dav/
Copy/paste or type the following bolded text after the Calendar ID: /user
You will end up with something that looks like:
https://www.google.com/calendar/dav/thiswilllooklikeemail@googleorsomeotherdomai n.com/user
In iCal, select Preferences from the iCal menu
Click on Accounts
Click the + button below the list of Accounts
Give it a description, can be anything you like.
ensure you use the CalDAV type of calendar setting under Account Type
Enter your user name. Note that if it is not a Gmail username, you need to enter the @domain.com part also, critical for Apps for Education or Apps for Business that use their own domain
Enter the password for that account.
Copy/Paste the address you created in the above steps into the Server Address:box
Click Add
The Account Description name will list on the left side of iCal, with a flip down triangle to see the calendar associated with the url entered.

Friday, 16 November 2012

Teardrop Trailer: Solar Panels

the Solar panels I used for this project were by todays standards quite low powered coming in at a whopping 5 watts each giving me 10 watts charging power,  but at the time they weren't incredibly cheap either.  I would probably put like 40 watts these days,  but regardless, it was neat to have.  Installing them into the roof was pretty straight forward as I had pre-measured and built the pockets to be pretty snug when the panels slipped in.  I had them intentionally raised above the roofline just so there'd be no risk of water pooling etc during rain storms,  and I used some heavy duty black silicone to seal them into place.

Overall I'd say the panels were a great addition,  but as mentioned earlier the more wattage you can give the better.  I did many tests over the couple years i tripped with this teardrop and I typically found that 10 watts of charging power usually only gave me like 10 extra minutes of interior light power,  so on a day-to-day basis it really doesn't help you much but where they really helped was when you left the trailer for a few weeks in-between trips.   I was leaving this trailer in an open field when not in use so it was always exposed to plenty of sunlight so battery maintenance was great,  just don't expect panels of this caliber to help you top-up a dead battery over the course of one sunny day on a long trip.

Friday, 14 September 2012

use an HTML file for a signature file in Apple Mail

perhaps you've been wanting to have a scalable html file as your email signature that grows and shrinks as you resize the email in apple Mail under OSX,  here's how its done.

1. create your signature using plain html and save it as a .html file somewhere on your local machine.

2. open that html file with safari and save the page as a .webarchive file.

3. create a new signature in apple mail

4. navigate to the following folder on your local machine:  ~/Library/Mail/V2/MailData/Signatures/

5. rename your cool html .webarchive file with the name of the newly created blank signature webarchive file and place it into the same signatures folder so that you are overwriting the existing blank signature with your cool HTML one.

6. you're done!

Friday, 17 August 2012

Teardrop Trailer: Foam Mattresses

I had a good idea of exactly how i wanted the mattresses to behave in this trailer from very early on in the planning stages since I just wanted to replicate what a lot of camper dinette benches have done for years, which is convert from a dinette into a bed and in our case it was more about going the opposite way, from bed to couches. I looked around a bunch of local foam shops in Mississauga and ended up choosing a place called K N K Foam on Dixie and Britannia.

They were tucked away in a small industrial complex and looked to be a wholesale foam supplier for major furniture shops, but they didn't seem to have any problems dealing with me directly. They were able to cut me 4 pieces of foam that i could use for my benches / bed and only cost me like 50 bucks. Since then I've visited them again for a different camper project so If you're in the area and are looking to do something similar I highly recommend them so go check them out.

The foam was a very nice fit and everything was coming together pretty well. My mother in-law helped us out by sewing us covers for the foam that just zippered on and they really turned out great. We ended up having just enough room to fit a water tank and a decent size cooler into the back galley area under what would soon become our kitchen counter.