courtesy of Rassah.
Hello, many of you have followed my other guide, Linux: setup x.org + vncserver + wine + utorrent but if you are in love with utorrent, and do not wish to install a vncserver, then this is more the right choice of tutorial.
NOTE: If you are experiencing utorrent crashing then look here:
You may need to downgrade wine for it to function properly for some reason unknown.
First login as root, because we will be needing that later on.
OK, next we need to recompile wine on our own, or else it won’t let us run utorrent in CLI mode, so start by going to /usr/src and download the wine source: firstname.lastname@example.org, and when your are done, logout as root.
Now, to proceed we need some programs/libs:
- • The bzip2 lib for extracting
- • The C compiler
- • Make
- • Flex
- • Bison
- • The libgl1-mesa-dev
- • The ftgl-dev
- • Fontforge
- • Screen
So if you have Debian, start by downloading the packages with apt-get or aptitude:
apt-get install gcc flex bison libgl1-mesa-dev ftgl-dev fontforge make bzip2 screen
Then untar it:
tar xf wine-*.tar.bz2
Then install it:
Now just follow the script, and do what it is telling you. BTW - it is very normal for wine to take a long time to compile, so quit waiting in front of the screen for it to finish.
Now first we need to download utorrent from http://utorrent.com/download.php and place it in a directory of choice, eg. your homedir.
You could make another user for utorrent too, but that is not necessary, but sure will make things a lot easier if you have a lot of screens.
Now we need to make wine create the necessary directories in your homedir (~/.wine), so if .wine is not already in your homedir, start utorrent with wine, let it create the .wine dir, and then just exit with ctrl-c.
Next, goto the Application dir in wine:
cd ~/.wine/drive_c/windows/profiles/<username here>/Application\ Data
Then download webui.zip from here http://forum.utorrent.com/viewtopic.php?id=14565
Then move over your settings.dat and dht.dat from your local machine.
For running utorrent i prefer to run it as a daemon, but if it is too hard for you, you can just use screen to run utorrent:
Start by going back to your homedir (~), or where you placed utorrent, and start it in a screen this way:
screen wine utorrent.exe
Running utorrent as a daemon
WARNING: If you do this wrong you WILL mess up the startup of your system, which means reinstall.
To make utorrent run as a daemon means it will start on startup, which is pretty handy. This section is more distro specific, but you should be fine by using a debian based distro.
Start by logging in as root, and download this boot script i made for the utorrent daemon: http://rassah.dk/stuff/utorrent and then place it in your init dir (eg. /etc/init.d). Now run this command which will make the script start upon boot:
update-rc.d utorrent 99
the 99 just makes it run as the latest script executed.
Now we need to replace the variables in the file utorrent, the variables you need to modify is:
- • DAEMON - This is where utorrent is located.
- • USER - This is the user you want utorrent to run under.
To test the process so far, goto /etc/init.d/ and run utorrent start. If everything worked out well, you should be able to see the utorrent webui by now using your browser to navigate to ip:port/gui.
If nothing happens, double check IP and port number, or try to restart.
Reasons why it might not work
• If your settings.dat file is invalid, or something else is wrong with the config, webui refuse to start, same goes with your dht.dat file.
• I has experienced at times, that if you run it with root access it refuse to start, so run it as a normal user.
• For some reason webui will not work untill reboot, if it fails to init, at first.