4

In Chromium you can go to File > "Create application shortcuts"...

This then allows you to add a "webapp" type shortcut to your launcher.

Is this possible through Firefox with the same type of ease?

Or what is the best/official way to do this in Ubuntu 14.04 LTS?

0

The official way would be to use webapp-container: https://developer.ubuntu.com/en/web/ubuntu-webapps-guide/

Then the webpage is rendered and runs in an Oxide webview. Oxide is a Blink/Chrome webview that is customized for Ubuntu. The Oxide webview runs and displays in the webapp-container. The webapp-container is the executable app runtime that is integrated with the Ubuntu/unity shell. The webapp experience is contained and isolated from the browser data point of view. That is webapps do not access data from any other installed browser, such as history, cookies and so on.

E.g. for Gmail you could either run the following command from a terminal:

$ webapp-container https://mail.google.com/mail/u/0/#inbox --app-id=comgooglemail

Or create ~/.local/share/applications/comgooglemail.desktop with the following content:

[Desktop Entry]
Name=Gmail Inbox
Name[nl]=Gmail Postvak IN
Exec=webapp-container https://mail.google.com/mail/u/0/#inbox --app-id=comgooglemail --user-agent-string='Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:39.0) Gecko/20100101 Firefox/39.0'
Icon=/home/username/comgooglemail.png
Type=Application
Actions=compose;starred;contacts
StartupWMClass=comgooglemail
OnlyShowIn=Unity

[Desktop Action compose]
Name=Compose
Name[nl]=Opstellen
Exec=webapp-container https://mail.google.com/mail/u/0/#inbox?compose=new

[Desktop Action starred]
Name=Starred
Name[nl]=Met ster
Exec=webapp-container https://mail.google.com/mail/u/0/#starred

[Desktop Action contacts]
Name=Contacts
Name[nl]=Contacten
Exec=webapp-container https://mail.google.com/mail/u/0/#contacts

Now open the Unity dash and type gmail to open the comgooglemail webapp. This also offers quicklists (visible when right clicking the icon) for Compose, Starred and Contacts. Search online for an icon (minimum 48x48 pixels) and save it to ~/comgooglemail.png

Another way would be to create ~/comgooglemailbrowser.desktop with the following content:

[Desktop Entry]
Name=Gmail Inbox
Name[nl]=Gmail Postvak IN
Exec=xdg-open https://mail.google.com/mail/u/0/#inbox
Icon=/home/username/comgooglemail.png
Type=Application
Actions=compose;starred;contacts
StartupWMClass=comgooglemail
OnlyShowIn=Unity

[Desktop Action compose]
Name=Compose
Name[nl]=Opstellen
Exec=xdg-open https://mail.google.com/mail/u/0/#inbox?compose=new

[Desktop Action starred]
Name=Starred
Name[nl]=Met ster
Exec=xdg-open https://mail.google.com/mail/u/0/#starred

[Desktop Action contacts]
Name=Contacts
Name[nl]=Contacten
Exec=xdg-open https://mail.google.com/mail/u/0/#contacts

xdg-open opens a http/https URL in the user's preferred webbrowser (e.g. Firefox), you could replace it by firefox as well. This also offers quicklists for Compose, Starred and Contacts. Search online for an icon (minimum 48x48 pixels) and save it to ~/comgooglemail.png

This does not offer the same kind of Unity integration as webapp-container since it just opens in Firefox. To put it into the starter you need to type gmail and drag it into the starter (you can not pin the webpage directly into the starter by right clicking since this would only pin Firefox itself). The webpage will open in a new Firefox tab and no arrow will be shown on the comgooglemailbrowser launcher icon in the starter indicating that a window is open, the arrow is shown on the Firefox icon.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.