Package: sensible-utils
Version: 0.0.9
Followup-For: Bug #520843

So, the problem in this bug is that sensible-browser in a Gnome
environment selects /usr/bin/gnome-www-browser, which is handled by
Debian's alternatives system.  That means it will in general be out of
sync with the selection of the Desktop's Preferred Browser, since
Gnome itself does not update the alternatives.  

The same problem holds for /usr/bin/x-www-browser, when DISPLAY is set
outside a Gnome environment.

One solution is to use xdg-open instead, which does identify the
desktop default browser.  It also has the advantage of working with
any freedesktop-compliant desktop, e.g. KDE.  In fact it even works
when DISPLAY is not set.

I'm attaching a patch which "Works For Me."

If you think the xdg-open solution is a good one, does it make sense
for sensible-utils to Recommends: (or Suggests:) xdg-utils  ?

Drew

p.s. Not so important for this bug, but GNOME_DESKTOP_SESSION_ID is
apparently now deprecated. 



-- System Information:
Debian Release: jessie/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.13-1-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_AU.utf8, LC_CTYPE=en_AU.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

-- no debconf information
--- /usr/bin/sensible-browser.orig	2014-04-01 15:35:41.750694769 +1100
+++ /usr/bin/sensible-browser	2014-04-01 16:04:52.161292055 +1100
@@ -26,6 +26,10 @@
     exit 1
 fi
 
+if test -x /usr/bin/xdg-open; then
+    exec /usr/bin/xdg-open ${URL:+"$URL"}
+fi
+
 if test -n "$DISPLAY"; then
     if test -n "$GNOME_DESKTOP_SESSION_ID"; then
         if test -x /usr/bin/gnome-www-browser; then

Reply via email to