Friday, December 4, 2009

Getting Adobe Air apps to open Links with your default browser (if your default browser isn't firefox)

If you're like me, you don't want open up every Twitter link from your Twitter Client in Firefox. If I wanted that, I would install Twitterfox. Not that there's anything wrong with Firefox, I just like the uptime and the rendering that Webkit Browsers have.

First of all, You have to Turn off all Adobe Air Apps!! Because we're gonna edit a Binary and unless you wanna break Adobe Air and all Air Apps, you might wanna, so please close all Air Apps.

Next, we'll need get a Hex Editor, so do

sudo apt-get install ghex

Now, that we have a Hex Editor, we can edit the Binary.

sudo ghex2 /opt/Adobe\ AIR/Versions/1.0/libCore.so

Hit CTRL+F and find firefox and keep on hitting next until you see "firefox.DESKTOP.DOCMENTS"

Whatever you do, don't touch the backspace or delete key, this will screw it up! If you so screw it up, close it without saving.

What you're gonna do is click on the "f" in "firefox.DESKTOP.DOCMENTS" and just type "browser". If you did it right, It should say "browser.DESKTOP.DOCMENTS". If not, you screwed it up and don't save your mistakes. If you did it right, save it and quit.

Now that the scary part is over, we need to make a link.

ln -s /usr/bin/xdg-open /usr/bin/browser

"xdg-open" means "open link in my default Browser"

Now, everything should work now, but you may not want to not update Adobe Air or even your Adobe Air Apps because a Adobe Air update will set it back to firefox and you'll have to edit the binary again.