Set midbrowser as the default URL handler for HTTPS

Bug #191064 reported by Steve Magoun
24
Affects Status Importance Assigned to Milestone
crown-beach-config (Ubuntu)
Fix Released
Undecided
Unassigned
ume-config-common (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

crown-beach-config sets midbrowser as the default URL handler for HTTP URLs. It needs to do the same for HTTPS URLs.

I noticed that Liferea can open HTTP URLs in the browser, but not HTTPS URLs (like articles from the Ubuntu Fridge, which is one of the default Liferea feeds). The problem is that Firefox is the default browser, and we override it for HTTP URLs only.

To reproduce:
gnome-open http://www.google.com (works)
gnome-open https://www.google.com (doesn't work)

To fix, add this to debian/postinst:
su - ume -c "gconftool-2 -s -t string /desktop/gnome/url-handlers/https/command 'midbrowser %s'"

Tags: oem-services
Revision history for this message
Loïc Minier (lool) wrote :

Also, perhaps this should be moved to config-common? Or to midbrowser?

Revision history for this message
Steve Magoun (smagoun) wrote :

At Loïc's suggestion I added the gconftool-2 call to ume-config-common:
http://people.ubuntu.com/~smagoun/packages/ume-config-common_0.10-0ubuntu1.dsc

I didn't add it to midbrowser because there's a chance people will try to add midbrowser to a desktop system, and we don't want to override their default browser. ume-config-common comes with a warning about not installing to a desktop system, so I figure that's the safer option.

Revision history for this message
Loïc Minier (lool) wrote :

@Steve: the changes are okay; some remarks though:

a) We stay with a native package while we have some Ubuntu changes; it would be logical to move to non-native here.

b) Maintainer: field dance anyone? :-)

c) I think you should prepare a crownbeach-config package with a bumped dependency on ume-config-common (e.g. >= 0.10-0ubuntu1) as to prevent installation of ume-config-common 0.10.0 with an updated crownbeach-config (0.17-0ubuntu1) -- as none of these two packages would be altering the default, and hence we would miss the GConf changes. ume-config-common should be updated first and crownbeach can be fixed a bit later, both packages can be setting this for a little while without causing any issue. (IOW: this isn't blocking the sponsoring of ume-config-common, but we should keep this bug open to remember dropping the gcontool call from crownbeach-config)

d) On the changes themselves: using a gconftool-2 call changing the settings of the "ume" user and telling users to please not install this package is quite ugly in general; instead, it would be much more elegant to use a gconf defaults file with higher priority than the other ones; this is described in the dh_gconf manual page and in /usr/share/doc/gconf2/README.Debian (you could use a priority of 20/30 or so I guess). Such a setup would allow:
- to not overwrite the GConf settings of the ume users (only the *default* is set, and if the user changed the default, this is kept, if he didn't, he gets the updated default)
- to act on the default for all users, and so not hardcode "ume"
- this would be completely reverted by the removal of the package; at least for this, we wouldn't need to warn users about installation if this package only tweaks the defaults

Could you prepare a new upload for a) and b)? I'm afraid it's more work per upload as what we used to do in the past, but I guess we're in a period where we try to "cleanup" the packaging a little and stay a bit closer to the "Ubuntu way".

Revision history for this message
Steve Magoun (smagoun) wrote :

Prepared a new package with the following changes:
http://people.ubuntu.com/~smagoun/packages/ume-config-common_0.10+repack-0ubuntu1.dsc

- Switched to a non-native package
- Repacked w/o the upstream debian directory
- Replaced the gconftool-2 calls with a gconf-defaults file to override the default url-handler

@Loïc: I don't understand the comment about Maintainer field dance?

Steve Magoun (smagoun)
Changed in ume-config-common:
status: New → Confirmed
Revision history for this message
Daniel Holbach (dholbach) wrote :

Maybe http://wiki.ubuntu.com/DebianMaintainerField (use update-maintainer in ubuntu-dev-tools).

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ume-config-common - 0.10+repack-0ubuntu1

---------------
ume-config-common (0.10+repack-0ubuntu1) hardy; urgency=low

  * Synchronize with the moblin release of 0.10, which is
    different than the 0.10 release used in Hardy.
  * Set default HTTP, HTTPS url-handlers to midbrowser (LP: #191064)
  * Convert to non-native package
  * Repack without upstream debian directory

 -- Steve Magoun <email address hidden> Tue, 19 Feb 2008 16:04:06 -0500

Changed in ume-config-common:
status: Confirmed → Fix Released
Revision history for this message
Loïc Minier (lool) wrote :

Excellent work!

And sorry for the long delay in sponsoring...

@Steve: are you interested in preparing a crown-beach-config update?

Changed in ume-config-common:
status: Fix Released → Fix Committed
status: Fix Committed → Fix Released
Revision history for this message
Luca Falavigna (dktrkranz) wrote :

I've unsubscribed u-u-s as it seems there is nothing else to sponsor at the moment. Please resubscribe u-u-s if you have a debdiff ready for review. Thanks!

Revision history for this message
Steve Magoun (smagoun) wrote :

Prepared a new crown-beach-config with the following changes:
http://people.ubuntu.com/~smagoun/packages/crown-beach-config_0.28+repack-0ubuntu1_source.changes

- Synchronize with the moblin release of crown-beach-config 0.28, to supersede the 0.28 that's (incorrectly) in the ubuntu-mobile PPA
- Convert to non-native package, repack without upstream debian directory or git directory
- Updated dependency on ume-config-common

Changed in crown-beach-config:
status: New → Confirmed
Revision history for this message
Loïc Minier (lool) wrote :

@Steve: no comment on your changes, simply fine, thanks! I spotted a lintian warning when preparing the update:
W: crown-beach-config source: maintainer-script-lacks-debhelper-token debian/postrm
So I added the missing token and pushed the new source.

Revision history for this message
Loïc Minier (lool) wrote :

This bug was fixed in the package crown-beach-config - 0.28+repack-0ubuntu1
---------------
crown-beach-config (0.28+repack-0ubuntu1) hardy; urgency=low

  [ Steve Magoun ]
  [ Steve Kowalik]
  * Stop shipping hostname.sh again

  [ Steve Magoun]
  * Synchronize with the moblin release of 0.28, which is
    different than the 0.28 release in the Ubuntu Mobile PPA. (LP: #191063)
  * Convert to non-native package
  * Repack without upstream debian directory or git directory
  * Updated dependency on ume-config-common (LP: #191064)

  [ Loic Minier ]
  * Include #DEBHELPER# snippets in postrm.

 -- Steve Magoun <email address hidden> Tue, 04 Mar 2008 11:12:40 -0500

Changed in crown-beach-config:
status: Confirmed → Fix Released
Revision history for this message
Michael Terry (mterry) wrote :

I don't think this works quite right. ume-config-common is installing gconf keys with too much quoting. So when gnome-open parses them, it tries to run the command 'midbrowser %s' instead of the command 'midbrowser' with a %s argument.

The command line fix "gconftool-2 -s -t string /desktop/gnome/url-handlers/https/command 'midbrowser %s'" works because the quoting was stripped by gconftool-2. But debian/gconf-defaults keeps all quoting.

I've repackaged it for acton. Debdiff for original package coming.

Changed in acton:
assignee: nobody → mterry
milestone: none → rc1
status: New → Fix Committed
Revision history for this message
Michael Terry (mterry) wrote :

Here's a debdiff against ume-config-common_0.10+upstream-0ubuntu1.

I've also included a bonus related fix -- setting BROWSER to midbrowser. I think that's an appropriate place to do so.

Relatedly, I hate the million places we have for finding browsers:
* BROWSER
* /desktop/gnome/url-handlers
* x-www-browser
* gnome-www-browser
* xdg default mime application for text/html

I'll reopen other projects on this bug to committed.

Changed in crown-beach-config:
status: Fix Released → Confirmed
Changed in ume-config-common:
status: Fix Released → Confirmed
Revision history for this message
Daniel Holbach (dholbach) wrote : Sponsor Request

Alexander: can you please take a look at it?

Michael Terry (mterry)
Changed in acton:
status: Fix Committed → Fix Released
Revision history for this message
Loïc Minier (lool) wrote :

Michael, why did you reopen the crown-beach-config task? (I only see a ume-config-common debdiff.)

Revision history for this message
Loïc Minier (lool) wrote :

Ups, looks like I sponsored this a while ago in intrepid already:

ume-config-common (0.10+upstream-0ubuntu2) intrepid; urgency=low

  [ Michael Terry ]
  * Set BROWSER=midbrowser in 25ume-config-common_startup
  * Fix quoting on midbrowser gconf defaults (LP #191064)

  [ Loic Minier ]
  * Target intrepid.
  * Update upload date.

 -- Michael Terry <email address hidden> Tue, 17 Jun 2008 23:56:29 +0200

Changed in ume-config-common:
status: Confirmed → Fix Released
Revision history for this message
Loïc Minier (lool) wrote :

Right, the bug closing was missing a colon, so LP didn't close the ume-config-common tasks.

Revision history for this message
Loïc Minier (lool) wrote :

Michael, I'm setting the cbc task back to fix released as I believe it doesn't need any upload; please reopen if necessary.

Changed in crown-beach-config:
status: Confirmed → Fix Released
Revision history for this message
Michael Terry (mterry) wrote :

Right, that was just me being overzealous. Thanks, Loïc!

Michael Terry (mterry)
tags: added: oem-services
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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