getlantern/lantern — pull request #595 by aranhoide (2013-03-13 11:59:12+00:00)
Title: Iconfix

This fixes #439, but I'm touching unfamiliar stuff. In particular, the part that redirects "/org.lantern.index.html" to "/" probably needs some cleanup.

In order to set a Lantern launcher (dock) icon for a chrome window, we need to register the lantern .desktop files for the appropriate StartupWMClass. Now, Google Chrome sets that based on the address and path of the page we pass in the --app command line option (it ignores the port). So strictly speaking we would fix #439 just setting StartupWMClass to 127.0.0.1 in the .desktop files. Now, that would probably conflict with any other app that wanted to run Chrome on localhost. So we call Chrome with `--app=127.0.0.1:PORT/org.lantern.index.html` to get a StartupWMClass that is less likely to clash with other apps, then redirect that to "/".