You Got A Question? Ask    GNOME Community!

gtk-theme2
 11743   |  Oct 25
gtk_logo2
 9522   |  Mar 17
arch
 7934   |  Mar 28

GNOME Desktop Webapp Chrome Extension

This post was made with an older stylesheet


This is kinda a redundancy of an existing functionality of Chrome Browser -but it does it better- from

Chrome Settings => Tools => Create => Create Application Shortcuts

The same functionality is also available in Epiphany (GNOME Web).

GNOME Web Settings => Save as Web Application

The most interesting part is the NPAPI Plugin which is quite simple to copy if you want to make a Plugin from scratch.


Whats

When you install an application from Chrome Store this Extension will also create the .desktop files so you can launch it from Shell Application Overview or adding it in favorites etc etc. If you don’t know what .desktop files are, you can check this post.

For example I have enabled the extension and I installed Chain Reaction (which I haven’t a clue what’s that!) from Chrome Store.

chrome-apps

That will automatically create a .desktop file so we can launch Chain Reaction from within Shell as a normal Application.

chain-reaction

The desktop file is under

~/.local/share/applications/

and follows the google convention names in this case

chrome-gemgfpodpjapjhfohdlibagceiknakpa-Default.desktop

That makes impossible to find the desired files and edit them, so we need to “grep” inside texts. One nice thing that Rodrigo did, was to auto-delete the .desktop files when we delete the web-application from Chrome.

[Desktop Entry]
Name=Chain Reaction
GenericName=Chain Reaction
Comment=Create a Chain Reaction of explosions to clear the level!
Exec=chromium "--app=http://www.yvoschaap.com/chainrxn/"
Terminal=false
Categories=Network;WebBrowser;
Type=Application
StartupNotify=true
StartupWMClass=chrome.google.com__webstore_category_home
Icon=chrome-gemgfpodpjapjhfohdlibagceiknakpa

Notice that it executes

Exec=chromium "--app=http://www.yvoschaap.com/chainrxn/"

In Fedora Chromium installations this should be

Exec=chromium-browser "--app=http://www.yvoschaap.com/chainrxn/"

Another useful thing to know is the app flag

"--app=http://www.yvoschaap.com/chainrxn/"

That will force the browser to run in Application:Mode without toolbars. If you don’t want this, you can remove it.

chrome-no-bars


Compiling

You will find the extension at

Clone it

$ git clone https://github.com/rodrmoya/desktop-webapp-browser-extension.git

And compiling it with autogen script

$ ./autogen.sh
$ make

I am not sure for all the dependencies it needs but the compiler complained me for missing xxd command, which I first even seen it in my life. In Fedora this tool is included in vim-common package.

$ sudo yum install vim-common

If you have troubles to compile it and you want to use it, first let a comment in Git Issues or I can give you the 64bit binaries.


Installing

After compiling it, it will create all the necessary files to install it. This is basically the .CRX file, which I have no clue how to use it :)

Instead you can manually install it. Open Chrome or Chromium (the extension will work in both browsers) at:

chrome://extensions

Check the developer mode checkbox and select “Load unpacked extension..”

 developer-mode

Import the chromium-extension folder

desktop-webapp-browser-extension/chromium-extension

Rodrigo in his blog says that he will upload this extension in Chrome Store. However Google has a very strict policy with NPAPI Plugins and that might never happen.

Don’t forget to check Rodrigo’s blogpost!

 


 
  We can't watch comments unless G+ provides an API or if you send a notification, e.g +World Of Gnome
     Sometimes is better to place your questions on GNOME Community