No way to specify what URL a webapps launcher should display when activated

Bug #1042633 reported by James Henstridge
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
WebApps: libunity-webapps
Confirmed
Low
Unassigned

Bug Description

I've only tested this with Firefox, so apologies if it should have been filed against the Firefox extension. The program behind webapps .desktop files seems to come from this package though, so I filed it here.

While working on Unity integration for a website locally, I was testing out locking of the webapp's icon to the launcher:

 1. I opened the site as http://scruffy:$random_port/music/buy/ ("scruffy" is my system's host name)
 2. That page calls Unity.init() to initialise the Unity integration.
 3. I right clicked on the new launcher icon and picked "Lock to Launcher"
 4. I closed the web page
 5. I clicked the launcher icon.

In response, a new web browser window was opened pointing at http://scruffy/. This was surprising for a few reasons:
 * The port number was dropped, so the browser didn't return to my application
 * The root web page of my application did not implement integration. In fact, I had never navigated to that page with Unity integration enabled.

I understand that the first page on the site that enables Unity integration might not be the best target for the launcher icon, but the current behaviour seems broken.

Perhaps a scheme like the following might be a better way to determine the URL:

 1. Add an optional "root" key to the parameters dictionary passed to the Unity.init() method. This key would contain the root URL of the web application, which must match the "same origin" constraint as the calling page.
 2. If the "root" key is not present, it should default to the URL "/" relative to the calling page.

That sounds like it should be compatible with current behaviour (other than the current bugs w.r.t. port numbers) while allowing web apps to to use alternative root URLs.

visibility: private → public
Revision history for this message
James Henstridge (jamesh) wrote :

On IRC it was pointed out that I completely missed the section of the documentation where it says how to set the home page for the application.

The other half of the problem still seems real: when I don't manually set the home page, the method used to select a default one seems to be a bit buggy.

David King (amigadave)
Changed in libunity-webapps:
importance: Undecided → Low
Alan Bell (alanbell)
Changed in libunity-webapps:
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.