Make Chromium or Chrome to open magnet links in LXDE
To make chromium to open magnet links, that most of the torrent sites uses. You need to open terminal and write:
gconftool-2 -t string -s /desktop/gnome/url-handlers/magnet/command "transmission %s"
gconftool-2 -s /desktop/gnome/url-handlers/magnet/needs_terminal false -t bool
gconftool-2 -t bool -s /desktop/gnome/url-handlers/magnet/enabled true
Open xdg-open in desired text-editor
sudo medit /usr/bin/xdg-open
find the lines:
#--------------------------------------
# Checks for known desktop environments
# set variable DE to the desktop environments name, lowercase
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 xprop -root _DT_SAVE_MODE 2> /dev/null | grep ' = \"xfce4\"$' >/dev/null 2>&1; then DE=xfce;
elif [ x"$DESKTOP_SESSION" == x"LXDE" ]; then DE=lxde;
else DE=""
fi
}
make it to look like this instead:
#--------------------------------------
# Checks for known desktop environments
# set variable DE to the desktop environments name, lowercase
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 xprop -root _DT_SAVE_MODE 2> /dev/null | grep ' = \"xfce4\"$' >/dev/null 2>&1; then DE=xfce;
# elif [ x"$DESKTOP_SESSION" == x"LXDE" ]; then DE=lxde;
# else DE=""
# fi
DE=gnome;
}
This will probably work in Arch, Lubuntu, Mint and Fedora. Will work in other Linux OS that uses lxde as desktop environment. This isn’t a optimized hack, if you know another way that works as good as this, let me know.