Bittorrent Setup Guide

From LinuxMCE
Jump to: navigation, search

This is a guide to help you set up the uTorrent bittorrent client running under wine on a LinuxMCE box. This setup has the following features:

  • torrent client that is always running right on the core
  • add new and monitor torrents from a web browser (i.e. works in a headless configuration)
  • completed downloads automatically show up in media library
  • partially downloaded torrents survive LinuxMCE reinstallation

This setup was tested on a hybrid/core running LinuxMCE 0710RC2. The same should work on a dedicated core.

Storage Setup

I recommend downloading torrents to a local hard drive that is not the system drive. If you are using a NAS, I find that manually moving completed downloads from the local drive to the appropriate NAS location works well.

For this guide I will refer to the secondary local hard drive used for downloading as the dl-drive. Such a drive installed in a core is automatically mounted by LinuxMCE/Kubuntu at /mnt/device/#. # is a number that changes from installation to installation.

Install Wine

Wine provides the windows environment on linux. Wine allows you to run the windows-native uTorrent.exe on linux. Wine is not an emulator, rather it is a compatibility layer so there is no performance penalty for running uTorrent on linux.

1. First install the wine package:

sudo apt-get install wine

2. Run winecfg to set up the windows environment -- do not run this as super user otherwise you will run into permissions problems later.


Install uTorrent

uTorrent is a widely-used and efficient bittorrent client. The following steps install it on the dl-drive itself rather than the system drive. The reason for this is so that the uTorrent configuration will survive a re-installation of LinuxMCE thereby allowing any in-progress downloads to continue after a re-install.

1. Create uTorrent folders on the dl-drive.

mkdir /mnt/device/#/uTorrent
mkdir /mnt/device/#/incomplete

2. Create a symlink to the uTorrent folder on the dl-drive from the Program Files folder.

cd ~/.wine/drive_c
cd "Program Files"
ln -s /mnt/device/#/uTorrent

3. Create a symlink to dl-drive. By mapping the uTorrent download directories using this symlink, in-progress downloads can continue after a LinuxMCE re-installation.

ln -s /mnt/device/# ~/dl-drive

4. Download uTorrent

cd /mnt/device/#/uTorrent

Create the utorrent-startup Script

In order to start uTorrent from a shortcut in KDE, a startup script is required.

1. Create the script file:

<editor-of-choice> /mnt/device/#/uTorrent/utorrent-startup

2. Paste this into the file:


cd ~/.wine/drive_c
cd "Program Files"
cd uTorrent
wine utorrent.exe

Create the uTorrent Shortcuts

A desktop shortcut allows you to manually launch uTorrent. A copy of it is also used to automatically start uTorrent on startup.

1. Right-click the desktop and select Create New Link to Application. A dialog box is shown.

2. On the general tab type uTorrent beside the icon.

3. On the application tab type the following in the command text box:


4. Click OK. You should now be able to run uTorrent using the newly created link.

5. Put a copy of the link into the Autostart folder at ~/.kde/Autostart.

Make KDE Desktop Launch Automatically at Boot

uTorrent launches automatically when KDE desktop starts. By default LinuxMCE does not start KDE desktop on boot. To have uTorrent start automatically on boot, you need to make KDE desktop start automatically.

1. Edit the media center startup script:

<editor-of-choice> /usr/pluto/bin/

2. Add the following line to the very end of the file:

StartService "KDE Desktop" "/usr/pluto/bin/"

Reboot LinuxMCE. You should see KDE desktop start just before the on-screen orbiter is shown. You should also see the green 'u' icon in the system tray.

Enable WebUI

The WebUI is handy for adding and monitoring torrents. It allows you to access uTorrent from any browser with access to the core. It needs to be enabled in order to access it.

1. In uTorrent check the Enable WebUI box and setup a username and password at Options=>Preferences=>WebUI.

2. Browse to the URL below. <incoming-port> is the port number at Options=>Preferences=>Connection.


Configure uTorrent Directories

Set up the the directories to keep the incomplete torrents out of the LinuxMCE media folders. Once a torrent completes however, uTorrent should move it to the video folder so that it is picked up automatically by LinuxMCE.

1. Go to Options=>Preferences=>Directories 2. Check Put new downloads in: and set the path to


3. Check Move completed downloads to: and set the path to


4. Check Store .torrents in: and set the path to


5. Check Move .torrents for finished jobs to and set the path to: