Notice: Undefined index: order_next_posts in /nas/content/live/gadgetmag/wp-content/plugins/smart-scroll-posts/smart-scroll-posts.php on line 194

Notice: Undefined index: post_link_target in /nas/content/live/gadgetmag/wp-content/plugins/smart-scroll-posts/smart-scroll-posts.php on line 195

Notice: Undefined index: posts_featured_size in /nas/content/live/gadgetmag/wp-content/plugins/smart-scroll-posts/smart-scroll-posts.php on line 196
News

Use Mozilla Prism to add web apps to your desktop

Mozilla Prism lets you run web apps in their own desktop window allowing a certain degree of freedom compared to running the app in a web browser, while restricting crashes to the app’s window. Follow Sukrit's step-by-step guide to find out just how easy it is…


12. The anatomy of a Prism app

One drawback with setting up a Prism application is that once you set it up using the Prism control panel, there is no way to open the configuration panel again to make changes. You can always delete and start from scratch. Or you can do it manually. First you need to understand the structure of an application installed with Prism. To do that, first launch either a Terminal window or the Nautilus file manager. Open the directory ‘.webapps/’ under your home directory. As this is a hidden folder and might not be visible in your file manager, you might need to use the Ctrl+L option in Nautilus to be able to manually enter the name of the directory.

13. Prism application structure
You should be able to see all the web applications that you have installed locally using Prism in the ‘.webapps/’ directory. Get into the folder of one of these applications to get a better idea of what’s happening behind the scenes. Here you will most likely see a directory named ‘icons’ and two files: ‘override.ini’ and ‘webapp.ini’.

The ‘icons’ directory contains nothing very exciting, just the icon for the web application. The file ‘webapp.ini’ is the main thing you should be interested in. This is the file that contains the configuration information for your application. The ‘override.ini’ is a support file that mentions the parameters that need to be overridden from the main configuration.

14. Hacking Prism
Prism comes off as a relatively simple and straightforward application to install and use. However, if you delve into the details of the configuration, there’s a lot going on there. There are a lot of configuration changes and improvements that you can make if you feel the need. If you are one of those people who likes to not only take a peep under the bonnet of the car but also tinker a bit, you should head over here and take a look at the detailed documentation covering a whole bunch of stuff.

15. Manually creating a Prism app

Take a look at the contents of the ‘webapps.ini’ file and you’ll see just how straightforward it is. The id is the unique name of this web application. Remember that you can create different webapps using the same URL and this webapp is only your particular instance of the web application. So make sure the identifier is unique to the instance. The name, url, and icon are pretty straightforward. The ‘status’ option is a yes/no option which enables or disables the status bar on the application window. The same goes for the ‘location’ and the ‘sidebar’ options. They offer yes/no options to enable or disable the location bar and the sidebar. The ‘navigation’ option is a yes/no option to enable or disable the hot key history navigation – Alt+Left, Alt+Right and Alt+Home.

[Parameters]

id=facebook@developer.mozilla.org
 name=facebook
 uri=https://www.facebook.com
 icon=facebook
 status=yes
 location=no
 sidebar=no
 navigation=no

16. Creating and downloading Prism packages


Once you get a hang of the Prism configuration parameters, you can easily and even automatically create a Prism application installer. All you need to do is to create the ‘webapp.ini’ configuration file and bundle it with an ‘icons’ directory containing the icon. You can find a number of Prism bundles on the Prism development wiki here. You too can create such bundles and share them. Just create the configuration files and the icons directory and archive the folder. The great thing is that if you create this with a ‘.webapp’ extension, the recent versions of Mozilla Prism for Mac and Windows will pick up the application automatically. This feature has yet to be implemented in the Linux version, though. You will notice that on the Prism wiki, the app bundles come with the ‘.webapp’ extension.

Return to the home page
More Linux User & Developer tutorials here.
Click here to see what else features in the latest issue.

×