SummerOfCode/2012/LinuxNativeWebApps

< SummerOfCode‎ | 2012
Revision as of 01:03, 11 June 2012 by Skierpage (talk | contribs) (→‎28/05 - 04/06: bug template)

Native Webapps Support on Linux

The Native Webapps feature in Firefox permits a webapp to be installed in the OS and launched as a separate process in a standalone window and environment. Currently this support exists for Windows and OSX, and the goal of this project is to bring the same support for Linux desktop, specifically for Gnome. The work consists in two pieces: support for the standalone runtime that runs the webapps, and support for the installation process that installs them to the OS.

Activities during the "Community Bonding" period

  • Study the code of the implementations for Windows and Mac.
  • Watch webapps related bugs and their fixes (see bug 731054).
  • Improve my knowledge of the Mozilla codebase.
  • Study the Mochitest testing framework, that could be useful to write automated tests (see bug 733631).
  • Decide the approach for webapps installation/removal (https://etherpad.mozilla.org/tzkVRnfvm1)

Timeline

Time To Do
May 21 - May 28 Implement the webapp launcher (I).
May 28 - June 4 Implement the webapp launcher (II).
June 4 - June 11 Test the implementation with manual test cases. Correct eventual bugs.
June 11 - June 18 Implement installation in the home directory.
June 18 - June 25 Support the creation of .desktop files in the standard directories and the reloading of menus, when necessary (for example on GNOME it's automatic, on KDE you have to execute an external binary)
June 25 - July 2 Implement support to uninstall applications.
July 2 - July 9 Manual testing on several distributions (with different desktop managers, Unity,GNOME,KDE,Xfce,LXDE) and possibly write automated tests. Correct eventual bugs.
July 9 - July 16 Test the implementation with manual test cases. Correct eventual bugs. During this week we'll also submit the mid-term evaluations.
July 16 - July 23 Implement automatic update of the webapp launcher. We could use GSettings to store the Firefox installation path, as another way to check a new webapprt version (other than "installDir" in the webapp.ini).
July 23 - July 30 Manual testing on several distributions (with different desktop managers, Unity,GNOME,KDE,Xfce,LXDE) and possibly write automated tests. Correct eventual bugs.
July 30 - August 6 Any other business.
August 6 - August 13 Any other business.
August 13 - August 20 Improve documentation.


Obviously the work could be subject to delay depending on the approach we'll adopt for uninstallation. This is why I decided to have two weeks without any specific work planned.

Weekly status reports

I'll write here weekly reports about my work, starting from May 21.

21/05 - 28/05

In the first weeks of my GSoC I learnt a lot of things about Open Web Apps and the implementation of native installation/uninstallation and execution of web apps on Windows and Mac. I've seen how other Mozilla developers solved many of the problems that occured with webapps and even helped to solve a (really) small issue with the Mac installer.

I've already started to develop the webapprt launcher and the installer and, if you want, you can try the implementation with a try build (but consider that it's not ready for production, the installation directories will likely change and the uninstallation isn't yet implemented). On Gnome 3 and Unity you'll find your installed web apps respectively in the application picker and in the dash. On the other desktop environments in the applications menu (but as for now the applications aren't categorized, they won't be showed).

At the beginning I wrote the webapprt launcher using GLib and GIO, but later I decided to directly use Linux functions.

The plan for uninstallation is to add a desktop action to the app icon. But sadly Gnome doesn't support this as yet: https://bugzilla.gnome.org/show_bug.cgi?id=669603. So there will probably be a special Firefox page (about:apps) to manage apps on platforms that don't support desktop actions.

The webapps will most probably be installed to the home directory, under ~/.config/<webappuniqueid>.

About the Linux implementation coming after the Mac and Win ones, it isn't a Mozilla fault. The problem is that Linux distributions lack a common way to install/uninstall applications, desktop environments have different behaviours (even when it comes to freedesktop standards). The extreme opportunities of Linux personalization have their shortcomings!

During these weeks I've also started to contribute to GFX, working on the porting of OMTC to basic layers (in simpler words this means software omtc, that in my opinion is really important to improve Firefox responsiveness on older machines, where layers hardware acceleration is disabled).

I'd like to thank Felipe, my mentor, along with the other Mozilla developers for their help and support. And I'd like to thank the Mozilla community (especially Linux users) for their help and feedback (many of them have been eager to test the first implementation and they gave me a lot of useful feedback).

Feel free to give your feedback and stay tuned for other weekly reports!


28/05 - 04/06

This week has been really interesting. With the help of some fast and effective reviewers, I've been able to land the installer and the launcher implementation in Firefox 15. You can now test my work on Aurora (when it'll be released in the coming days), so I'm going to delete the old try builds.

We've already found two problems and fixed one.

1) It was impossible to launch multiple applications. This showed up (in the past) on Windows too and needed a really simple fix that will most probably be uplifted to Aurora (bug 761496).

2) There is a build problem with other *nix platforms. Luckily this showed that the implementation could work on other *nix platforms too (like bsd), even if my work was supposed to work only on Linux. So we have to be grateful that this build error showed up, otherwise we wouldn't have tested on bsd. As I said the first week, feel free to test the work and file bugs (it would be better if you talk in #openwebapps before filing bugs), but remember that the implementation isn't ready through-and-through (for example there isn't the uninstallation support: bug 761806).

As yet, your web applications will be installed in your home directory, with this format: ~/.SCHEME;HOST[;PORT] A desktop entry file will be stored in $XDG_DATA_HOME/applications (usually it's ~/.local/share/applications), with the same format. So you should see the application icon in your applications menu (if you're on GNOME 2 and the other "classic" desktop environments), in your applications picker (if you're on GNOME 3), in your dash (if you're on Ubuntu).

So far, the webapp support has been tested on GNOME 2, GNOME 3, Unity, LXDE. In LXDE there is a problem related to the categorization (if the desktop entry file hasn't a category, the application icon won't be showed in the menu). We'll however support the categorization (bug 760748). I haven't tested yet on XFCE, Cinnamon and KDE. But I hope these three support freedesktop standards!