← Back to team overview

desktop-packages team mailing list archive

[Bug 932472] Re: xdg-open does not seem to handle magnet links

 

I've got similar problem on Xubuntu 14.10 when using Chromium: click on
magnet link opens Firefox window which (correctly) opens torrent client
(Transmission). I found a solution:

'xdg-open' script incorrectly recognises Xfce4 desktop in 'detectDE()'
function (very old code?), which makes that 'open_generic()' is used
instead of 'open_xfce()'. The code below works much better:

detectDE()
{
    if [ x"$KDE_FULL_SESSION" = x"true" ]; then DE=kde;
    elif [ x"$GNOME_DESKTOP_SESSION_ID" != x"" ]; then DE=gnome;
    elif `dbus-send --print-reply --dest=org.freedesktop.DBus /org/freedesktop/DBus org.freedesktop.DBus.GetNameOwner string:org.gnome.SessionManager > /dev/null 2>&1` ; then DE=gnome;
    elif [ x"$XDG_CURRENT_DESKTOP" = x"XFCE" ]; then DE=xfce;
    elif [ x"$DESKTOP_SESSION" = x"LXDE" ]; then DE=lxde;
    else DE=""
    fi
}

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to xdg-utils in Ubuntu.
https://bugs.launchpad.net/bugs/932472

Title:
  xdg-open does not seem to handle magnet links

Status in xdg-utils package in Ubuntu:
  Confirmed

Bug description:
  i'm running precise 12.04
  expected behavior is to open magnet links in a bittorrent client.

  on Lubuntu, the actual behavior is to open another chromium window
  when clicking the link.

  $ dpkg -I xdg-utils
  dpkg-deb: error: failed to read archive `xdg-utils': No such file or directory
  anliot@6002:~/pcman/pcmanfm-0.9.10$ man dpkg
  anliot@6002:~/pcman/pcmanfm-0.9.10$ dpkg -s xdg-utils
  Package: xdg-utils
  Status: install ok installed
  Priority: optional
  Section: utils
  Installed-Size: 316
  Maintainer: Ubuntu Developers <ubuntu-devel-discuss@xxxxxxxxxxxxxxxx>
  Architecture: all
  Version: 1.1.0~rc1-2ubuntu6

  ProblemType: Bug
  DistroRelease: Ubuntu 12.04
  Package: xdg-utils 1.1.0~rc1-2ubuntu6
  ProcVersionSignature: Ubuntu 3.2.0-14.23-generic 3.2.3
  Uname: Linux 3.2.0-14-generic x86_64
  NonfreeKernelModules: fglrx
  ApportVersion: 1.91-0ubuntu1
  Architecture: amd64
  Date: Tue Feb 14 20:01:02 2012
  Dependencies:
   
  InstallationMedia: Lubuntu 12.04 "Precise Pangolin" - Alpha amd64 (20120205)
  PackageArchitecture: all
  ProcEnviron:
   PATH=(custom, no user)
   LANG=en_US.UTF-8
   SHELL=/bin/bash
  SourcePackage: xdg-utils
  UpgradeStatus: No upgrade log present (probably fresh install)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/xdg-utils/+bug/932472/+subscriptions