Web App Windows (And Making Them Play Nice With The Launcher)

For I-don’t-know-how-long, Chromium and Chrome have had “web app windows”, which allow a web page to run in a minimalistic window. Odds are you’ve seen this before, if not used it yourself for something.

These app windows are useful for web pages that you treat, like… well, applications. Things like mail, document editors, and so on. It’s nice to be able to pull things right out of the browser.

Except… it doesn’t play too nicely with the Unity launcher. There is a well-reported issue of the launcher mixing up which icon the instances of Chromium belong to. I’ve found a bit of a workaround.

I actually discovered it by accident when Google Apps did the transition to making organization profiles different from normal profiles. I had to start using two Google profiles – one for mail, one for everything else. Instead of switching accounts all the time, I made a separate Chromium profile, and then made an app window. And I noticed the following:

See how the launcher says there’s a normal browser window and a mail window? Apparently, making a profile for something makes the launcher see it as a “different application”. Making a new profile isn’t the best solution I admit…. but, it makes app windows play nice.

To open a website as an app window, add –app=http://example.org to the launcher parameters for chromium. Making and using a new profile is as easy as adding –user-data-dir=/path/to/profile .

Here’s an example .desktop:

#!/usr/bin/env xdg-open
[Desktop Entry]
Version=1.0
Type=Application
Terminal=false
Exec=chromium-browser –user-data-dir=/home/username/.gmail –app=http://mail.google.com
Name=GMail
Icon=applications-mail

This entry was posted in Applications and tagged , , , . Bookmark the permalink.
  • http://castrojo.tumblr.com Jorge Castro

    YOU ARE AWESOME. Any downsides to using a separate profile dir? I wouldn’t think anything is important in there since the data I care about is in the webapp itself.

    • http://alexandos.org Alexander

      None except the obvious lack of background data – but as you say, most things that you’d want in an app window don’t need it. I’ve not measured performance, but I’m pretty sure there’s not really an impact.

      • Luis Palomo

        can you post a full .desktop file for example?

        • http://alexandos.org Alexander

          #!/usr/bin/env xdg-open
          [Desktop Entry]
          Version=1.0
          Type=Application
          Terminal=false
          Exec=chromium-browser –user-data-dir=/home/username/.gmail –app=http://mail.google.com
          Name=GMail
          Icon=applications-mail

          • Luis Palomo

            Works!!, thanks a lot :)

            I don’t know if requires turn on the flag “Multiple Profiles” but I did it anyways

  • Pingback: Jorge Castro: Workaround for Unity Web Applications in Chromium | Ubuntu Forms

  • Magnus

    Thanks! Very useful, I was really frustrated before I found this.

    I’ve noticed that starting Google docs with –app really doesn’t makes sense. As soon as you open a document a new window of Chromium opens. I want all documents and the docs start page in the same window.

    I really miss the tabs in app mode! Do you know of a way to either get tabs in app mode or get rid of  the address bar in normal mode?

  • Jeremy Frank

    There’s only one problem with this: external links in the webapp open in this different version of Chromium. Any way to ensure all links open in the default profile?