Not too long ago, Amazon released Elasticfox, a Firefox extension to help manage EC2 instances. We really liked the idea of a GUI for managing EC2, but the idea of having it integrate with our browser and slow down our browsing made little sense. Luckily, Mozilla’s XULRunner project makes it easy to turn projects like these into standalone applications, and the code for Elasticfox proved relatively easy to add to.
application.ini
XULRunner needs a bit more metadata than Firefox. The first file needed is called application.ini. It lives in the root folder of the extension code (where install.rdf goes for Firefox extensions) and contains information such as vendor name, version, and supported Gecko versions. Here is an example for use with Elasticfox:
[App]
Vendor=Amazon
Name=Elasticfox
Version=1.0
BuildID=20080109
Copyright=Copyright (c) 2007 Amazon
ID=elasticfox@amazon.com
[Gecko]
MinVersion=1.8
MaxVersion=1.9.0.*
prefs.js
XULRunner also needs some default preferences set, so that it knows what window to open and what Gecko features to enable. The file for this is called prefs.js and lives in defaults/preferences. Here is some example code for use with Elasticfox:
pref("toolkit.defaultChromeURI", "chrome://ec2ui/content/ec2ui_main_window.xul");
pref("signon.rememberSignons", true);
pref("signon.expireMasterPassword", false);
pref("signon.SignonFileName", "signons.txt");
package.sh
Finally, these new files have to be added to the XPI. In Elasticfox, this means replacing the second-to-last line of package.sh with the following:
cp -rvf defaults/ build/
pushd build && zip -9 ../build/ec2ui.xpi * -x *.sh -x project -x ec2ui.rdf -x *~ && zip -r9 ../build/ec2ui.xpi chrome/*.jar && zip -r9 ../build/ec2ui.xpi defaults/* && zip -r9 ../build/ec2ui.xpi defaults/preferences/* && popd
Setting up XULRunner
Mozilla has good instructions on installing XULRunner on various platforms (Linux, Mac OS, Windows). Once it is installed you have to run:
xulrunner --install-app ec2ui.xpi
This will create an executable in a platform-specific location that you can just run. (For more information about paths used, see the Documentation)
Note that these modifications do not affect the ability of the XPI to be used as a Firefox extension.
ElasticFox.exe ElasticFox Standalone Installer (Windows) (Size: 5.6 MB)














One Response
Steven Hatch’s Blog » Blog Archive » links for 2008-03-04
March 4th, 2008 at 12:08 am
1[…] Fast & Easy EC2 Dashboard With Standalone ElasticFox - AideRSS Blog “…a standalone desktop version of ElasticFox.” (tags: Amazon ec2 Firefox cloud architecture) Book Mark it-> del.icio.us | Reddit | Slashdot | Digg | […]
RSS feed for comments on this post · TrackBack URI
Leave a reply