Platima Posted November 28, 2010 Report Share Posted November 28, 2010 Hey everyone,I spent a little bit getting this just right, so I thought I'd share it all with you. It's also cross-posted to the linux forum (40) too.Script to accept magnet URIs. It trims the leading whitespace, uses wget to add the torrent, and fires up uTorrent Server in App mode:#!/bin/bashUSERNAME=adminPASSWORD=HOST=127.0.0.1PORT=8080URL=$(echo -n "$@" | sed -e "s/^\ //g")wget -q -O /dev/null --user="$USERNAME" --password="$PASSWORD" "http://$HOST:$PORT/gui/?action=add-url&s=$URL"/opt/google/chrome/google-chrome "--app=http://$USERNAME:$PASSWORD@$HOST:$PORT/gui" &Commands to add magnet handler to Gnome:gconftool-2 --set --type=string /desktop/gnome/url-handlers/magnet/command '<path_to_script> %s'gconftool-2 --set --type=bool /desktop/gnome/url-handlers/magnet/enabled truegconftool-2 --set --type=bool /desktop/gnome/url-handlers/magnet/need-terminal falseEnjoy!-Platima Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.