How to simulate Google Chrome’s “Create Application Shortcut” for web applications in Mozilla Firefox using the Prism Plugin
Just an interesting side thingy I just figured out: I like Google Chrome’s feature to create web application shortcuts. However, Chrome is still in Beta, and it sometimes shows. In the past I was using .XUL files to create a chome-less window for Firefox, extremely bitchy, with lots of hand-coding, but with the advantage of actually hiding all window elements (careful, you should know your keyboard shortcut keys now, you don’t even have a window handle for closing, dragging, resizing this thing ;)).
Of course Google Chrome’s feature is much nicer and easier to use than hacking .XUL files. But I couldn’t imagine that there wouldn’t be a similar solution for Firefox – this is not some kind of avantgarde feature to think of.
Tada: Mozilla Prism. I totally forgot about this project. In case you have Firefox 3.0, there is even a Prism Firefox Plugin you can install, everyone else can still use the download version on the documentation site. It’s basically a XUL runner that creates all these .XUL scripts for you, with lots of room for hacking and tweaking if you need to :)
One thing that needed manual editing: The shortcut that was created on the desktop needs the right “Start in:” working directory to open the application.ini file. In my case this directory needed some quotes (“…”) around it, otherwise it wouldn’t work and you would get an error “Cannot open application.ini”.
UPDATE 2008-10-14
The latest plugin version does that for you now ;)
Anyways, the result is your own window with your own icon and window title. In Google’s Chrome the status bar is also hidden, in Mozilla’s Prism there is a “print” icon and some other functions you can access.
UPDATE 2008-10-14
I forgot to mention that Prism will not use any of your Firefox Addons such as Greasemonkey or CustomizeGoogle. Addons typically “overlay” themselves into the host app (firefox or prism). Though Firefox is the engine for the Prism XULRunner Application, these addons are not ported to Prism yet, you would probably have to do that yourself… it’s half as hard as it sounds, though: look at the posting of http://douglasjmeyer.blogspot.com/2008/09/google-gears-in-prism.html. You basically have to rename the .xpi file of your extension to .zip (yes, .xpi files are zipped files), and then edit the file install.rdf to include some code:
<em:targetApplication>
<!– Prism –>
<Description>
<em:id>prism@developer.mozilla.org</em:id>
<em:minVersion>0.8</em:minVersion>
<em:maxVersion>1.0.0.*</em:maxVersion>
</Description>
</em:targetApplication>
Of Course you might have to change some things to work in Prism, too – hey, don’t ask me about that ;)
You can follow the comments for this article with the RSS 2.0 feed.
Hello Mark, thanks for the tip – I updated the article accordingly…
Content © Playout Intelligence
Proudly powered by WordPress
Theme designed by Artisan Themes
Great post! Is there any way to make Firefox’s add-ons work when the ‘application’ is launched? I want to use it for my Gmail and I have a few Gmail specific Firefox add-ons that I can’t live without…