HOW TO: µTorrent in Ubuntu 9.04

5 10 2009

There are alternatives to µTorrent like deluge, transmission and the official bittorrent client, but I just like µTorrent a lot better, and wanted to see how it performed through wine, and the outcome was splended. The road to making it work like it should is a little tricky, but here it is:

Innstallation:

Download wine:

$ sudo apt-get install wine

Then download and install µTorrent through wine:

$ wget http://download.utorrent.com/1.7.5/utorrent.exe
$ wine utorrent.exe

Choose yes to all when prompted to add shortcuts. You will now have a shortcut on your desktop and one under the wine menu. Please be sure this works before continuing.

Open a document called utorrentu under /usr/local/bin/

$ sudo nano /usr/local/bin/utorrent

and add the lines:

#!/bin/sh

if [ “$1″ ]; then
torrent_file=”Z:`echo $1 | sed ‘s/\//\/g’`”
env WINEPREFIX=”/home/USER/.wine” wine \
“C:\Program Files\uTorrent\uTorrent.exe” “$torrent_file”
else
env WINEPREFIX=”/home/USER/.wine” wine \
“C:\Program Files\uTorrent\uTorrent.exe”
fi

Replace all USER with whats suits you. Then run make the file executable

$ sudo chmod +x utorrent

This is the script we will run µTorrent with. It will help us to make µTorrent change locations from windows to linux-format (Z:\tmp\torrent.torrent to /tmp/torrent.torrent)

The we need to edit the .desktop file:

$ sudo nano ~/.local/share/applications/wine/µTorrent.desktop

This looks a little something like this:

[Desktop Entry]
Name=µTorrent
Exec=env WINEPREFIX=”/home/sinnadyr/.wine” wine \
“C:\Program Files\uTorrent\uTorrent.exe”
Type=Application
StartupWMClass=Wine
Icon=6948_utorrent.0

Replace the Exec-line with:

Exec=/home/sinnadyr/bin/utorrent %f

and add these to lines to the document:

Categories=Network;FileTransfer;P2P
MimeType=application/x-bittorrent

Now the µTorrent.desktop should look like this:

[Desktop Entry]
Name=µTorrent
Exec=/home/sinnadyr/bin/utorrent %f
Type=Application
StartupWMClass=Wine
Icon=6948_utorrent.0
Categories=Network;FileTransfer;P2P
MimeType=application/x-bittorrent

To make µT run as standard torrent-client, run

$ sudo nano ~/.local/share/applications/defaults.list

and add the line

application/x-bittorrent=µTorrent.desktop

Then what we need to do is update the Gnome fileassociations:

$ update-desktop-database ~/.local/share/applications

In the end, open firefox, Edit -> Preferences -> Applications -> Bittorent seed files -> use other > and type in:

/usr/local/bin/utorrent

GREAT SUCCESS!


Actions

Information

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s




%d bloggers like this: