1.Prepare folder structure for rtorrent

It is of course entirely up to you to decide the folder structure for you torrents, but then you have to make the accompanying adjustments to the configfiles below:

My rtorrent dropbox/.incoming/.session/torrents folder setup is created as follows:

sudo mkdir /exports
cd /exports
sudo mkdir Audiobooks  Books  Concerts  Documentaries  Documents  Films  Music  Samples  Series  Software  Sports  Talk

sudo mkdir /incoming
cd ../incoming
sudo mkdir audiobooks  books  concerts  documentaries  documents  films  music  samples  series  software  sports  talk .incoming .session webupload
  • exports = This folder will contain your completed torrents
  • incoming = We will set up a script to make this rtorrents watchfolder thus enabling us to drop/save torrents to this dir and make rtorrent automaticly start processing them.
  • .incoming = this is where the torrents reside when incomplete and under processing
  • .session = stores info about active torrents etc

2. Setting up the config file for rtgui.

Let us start with the rtGui config file

sudo vim /var/www/rtgui/config.php

Edit the configfile to suit you needs, I edited the following in mine:

.

// Connect string for your local RPC/rTorrent connection:
$rpc_connect="http://localhost/RPC2";

// rtorrent 'watch' directory (used for upload torrent)
$watchdir="/incoming/webupload";

// Path to report disk usage
$downloaddir="/exports";

// Threshold for disk usage alert (%)
$alertthresh=15;

// Time between ajax calls - default 5000 (5 secs).   Disable with 0
$defaultrefresh=5000;

// Display tracker URL for each torrent on main page - you might want to disable this if you run lots (ie 30+ ?)
// torrents - To get the tracker URL requires another RPC call for every torrent displayed.
// If it's disabled, it only requires one RPC call to list all the torrents.
$displaytrackerurl=TRUE;

// URL to your rtGui installation (used in RSS feed).  Include trailing slash.
$rtguiurl="http://your.ip/rtgui/";

// Speeds for the download cap settings dialog.
$defspeeds=array(5,10,15,20,30,40,50,60,70,80,90,100,125,150,200,250,300,400,500,600,700,800,900,1000,1200,1400,1500,2000,5000,10000);

// Start download immediately after loading torrent
$load_start=FALSE;

// Enable debug tabs
$debugtab=FALSE;

// Tracker colour hilighting...
// Format is array(hexcolour, URL, URL, ...) The URL is a string to match identifiy tracker URL
// Add as many arrays as needed.
$tracker_hilite_default="#900";   // Default colour
$tracker_hilite[]=array("#990000","ibiblio.org","etree.org");

// Define your RSS feeds here - you can have as many as you like.   Used in the feedreader
// Feed name, feed URL, Direct download links? (0/1)
$feeds[]=array("ibiblio.org","http://torrent.ibiblio.org/feed.php?blockid=3",0);
?>

3.Now for the more complex .rtorrent.rc config

I run rtorrent as roor in a screen environment som that meens .rtorrent.rc must reside under /root/

You can get the original configfile from the rtorrent project here

sudo vim /root/.rtorrent.rc
######################## CONNECTION SETTINGS ####################################

# Maximum and minimum number of peers to connect to per torrent.
min_peers = 40
max_peers = 100

# Same as above but for seeding completed torrents (-1 = same as downloading)
min_peers_seed = 10
max_peers_seed = 50

# Maximum number of simultanious uploads per torrent.
max_uploads = 10

# Global upload and download rate in KiB. "0" for unlimited.
download_rate = 0
upload_rate = 0

port_random = no
check_hash = no
use_udp_trackers = yes
encryption = allow_incoming,try_outgoing,enable_retry
dht = auto
peer_exchange = yes

port_range = 10001-10002
dht_port = 10002
scgi_port = 127.0.0.1:5000

########################### CONNECTION SETTINGS ##################################

# Hash read-ahead controls how many MB to request the kernel to read
# ahead. If the value is too low the disk may not be fully utilized,
# while if too high the kernel might not be able to keep the read
# pages in memory thus end up trashing.
# hash_read_ahead = 10

# Interval between attempts to check the hash, in milliseconds.
# hash_interval = 100

# Number of attempts to check the hash while using the mincore status,
# before forcing. Overworked systems might need lower values to get a
# decent hash checking rate.
# hash_max_tries = 10

###################### RATIO ##############################

# Enable the default ratio group.
ratio.enable=

# Change the limits
ratio.min.set=200
#ratio.max.set=300
#ratio.upload.set=20M

###################### RATIO ##############################

#################### WATCH FOLDERS #######################

# Default directory to save the downloaded torrents.
directory = /incoming/.incoming/
# Default session directory.
session = /incoming/.session/

schedule = watch_directory_1,10,10,"load_start=/incoming/concerts/*.torrent,                    d.set_custom1=/exports/Concerts"
schedule = watch_directory_2,10,10,"load_start=/incoming/films/*.torrent,                       d.set_custom1=/exports/Films"
schedule = watch_directory_3,10,10,"load_start=/incoming/series/*.torrent,                      d.set_custom1=/exports/Series"
schedule = watch_directory_4,10,10,"load_start=/incoming/sports/*.torrent,                      d.set_custom1=/exports/Sports"
schedule = watch_directory_5,10,10,"load_start=/incoming/audiobooks/*.torrent,                  d.set_custom1=/exports/Audiobooks"
schedule = watch_directory_6,10,10,"load_start=/incoming/books/*.torrent,                       d.set_custom1=/exports/Books"
schedule = watch_directory_7,10,10,"load_start=/incoming/documentaries/*.torrent,               d.set_custom1=/exports/Documentaries"
schedule = watch_directory_8,10,10,"load_start=/incoming/music/*.torrent,                       d.set_custom1=/exports/Music"
schedule = watch_directory_9,10,10,"load_start=/incoming/talk/*.torrent,                        d.set_custom1=/exports/Talk"
schedule = watch_directory_10,10,10,"load_start=/incoming/samples/*.torrent,                    d.set_custom1=/exports/Samples"
schedule = watch_directory_11,10,10,"load_start=/incoming/software/games/*.torrent,             d.set_custom1=/exports/Software/Games"
schedule = watch_directory_12,10,10,"load_start=/incoming/software/linux/*.torrent,             d.set_custom1=/exports/Software/Linux"
schedule = watch_directory_13,10,10,"load_start=/incoming/software/microsoft/*.torrent,         d.set_custom1=/exports/Software/Microsoft"
schedule = watch_directory_14,10,10,"load_start=/incoming/software/mobile/*.torrent,            d.set_custom1=/exports/Software/Mobile"
schedule = watch_directory_15,10,10,"load_start=/incoming/software/nonPlatform/*.torrent,       d.set_custom1=/exports/Software/NonPlatform"
schedule = watch_directory_16,10,10,"load_start=/incoming/software/osx/*.torrent,               d.set_custom1=/exports/Software/Osx"
schedule = watch_directory_17,10,10,"load_start=/incoming/webupload/*.torrent,                  d.set_custom1=/exports/Webupload"

########################################## ON COMPLETE #######################################################
# on_finished = move_complete,"d.set_directory=$d.get_custom1= ;execute=mv,-u,$d.get_base_path=,$d.get_custom1="
# Equivalent on_finished for rtorrent > 0.8.4
system.method.set_key = event.download.finished,move_complete,"d.set_directory=$d.get_custom1= ;execute=mv,-u,$d.get_base_path=,$d.get_custom1="
########################################## ON COMPLETE #######################################################

################## WATCH FOLDERS ########################
on_start    = link1,"create_link=tied,,.started"
on_stop     = link1,"delete_link=tied,,.started"
on_finished = link1,"create_link=tied,,.finished"
on_erase    = link1,"delete_link=tied,,.finished"

encoding_list = UTF-8

Now in terminal type

screen
sudo su
rtorrent

Hopefully no errors are present. I will add a rtorrent init.d script later

To exit screen and leave rtorrent running :
ctrl+a then press d
To go back to screen and rtorrent:

screen -r

To visit your rtGui, point your webbrowser to http://server.ip/rtgui (password protection using .htacces can be wise)

Now would be a good time to share /incoming and /exports to your network clients


rtorrent

I you, like me, have a Linux server in your home network, there are ways to make it work as a beautiful torrent client for all network users and thus limit setting up clients on all workstations and opening unnecessary amounts of ports. (you can also use it on a nix workstation of course, but in this guide I am using a headless server).

For torrent handling we use rTorrent and libtorrent developed by Jari Sundell, “Rakshasa”, a student of computer science at the University of Oslo.
To make things simpler we will use rtGui which is a web based front end for rTorrent . It’s written in PHP and uses XML-RPC to communicate with the rTorrent client.

For more information on rTorrent, see the home page: http://libtorrent.rakshasa.no/
For more information on rtGui, see the home page: http://code.google.com/p/rtgui/

Requirements : what I am using in ()

  • Computer running Linux (Ubuntu server 8.04LTS)
  • Internet (10/10 Fiber link)
  • Tiny bit of Nix know how (some)

Getting started:

From your server console (text in bold you can paste into termina):

1.Get the required files for running the torrent setup

sudo aptitude install php5 libxmlrpc-c3-dev php5-xmlrpc libapache2-mod-scgi libncurses5-dev libsigc++-2.0-dev libcurl4-openssl-dev screen build-essential
sudo vim /etc/apache2/sites-enabled/000-default

Add the following text above the last “</VirtualHost>”

LoadModule scgi_module /usr/lib/apache2/modules/mod_scgi.so
SCGIMount /RPC2 127.0.0.1:5000
sudo apache2ctl restart

2.Get rtorrent from http://libtorrent.rakshasa.no/downloads/ (at this time rtorrent-0.8.5.tar.gz)

cd /tmp
wget http://libtorrent.rakshasa.no/downloads/rtorrent-0.8.5.tar.gz
tar xvf rtorrent-0.8.5.tar.gz
cd rtorrent-0.8.5/
sudo ./configure -with-xmlrpc-c
sudo make
sudo make install

3.Get libtorrent from http://libtorrent.rakshasa.no/downloads/ (at this time libtorrent-0.12.5.tar.gz)

cd /tmp
wget http://libtorrent.rakshasa.no/downloads/libtorrent-0.12.5.tar.gz
tar xvf libtorrent-0.12.5.tar.gz
cd libtorrent-0.12.5/
sudo ./configure
sudo make
sudo make install

4.Get rtgui from http://code.google.com/p/rtgui/downloads/list (at this time rtgui-0.2.7.tgz)

cd /tmp
wget http://rtgui.googlecode.com/files/rtgui-0.2.7.tgz
sudo tar xvf rtgui-0.2.7.tgz -C /var/www
sudo mv /var/www/rtgui/config.php.example /var/www/rtgui/config.php

The last line just renames the the rtgui configfile to it´s intended name

Ok, now all the installing is over. I decided to make the configuring rtorrent/rtGui a seperate post to shorten down the posts. Read configuring rtorrent/rtGui.


If you are a curious person you should really have a look at the videos posted at TED Talks. As their motto is “Ideas worth spreading”, I have to concur, here, have some ideas.

This is an example talk held by biologist Richard Dawkinswere he makes a case for “thinking the improbable” by looking at how the human frame of reference limits our understanding of the universe.

Quote ted.com : ” TED is a small nonprofit devoted to Ideas Worth Spreading. It started out (in 1984) as a conference bringing together people from three worlds: Technology, Entertainment, Design. Since then its scope has become ever broader. Along with the annual TED Conference in Long Beach, California, and the TEDGlobal conference in Oxford UK, TED includes the award-winning TEDTalks video site, the Open Translation Program, the new TEDx community program, this year’s TEDIndia Conference and the annual TED Prize.”

Go to TED Talks


Sometimes it’s hard to get syntax right, or even remembering how to use specific commands in the various bash command lines. This is were SS64 can come in handy.Every OS has a comprehensive BASH command list in alphabetical order for a .beautiful and easy to understand layout.

View commands used in GNU Linux, OS X, Windows Power Shell and Windows XP HERE</a


Xmarks

26Oct09

I started using Xmarks back in the days when it was called Foxmarks and only existed for Mozilla Firefox as a bookmark syncronizer. As evolution has ran it’s course, Foxmarks has morphed into Xmarks with support for multiple operating systems and browsers, including bookmark and password synchronization and a lot of other features. You can sync everything cross platform and even log onto your online account to access bookmarks from any location.

Vistit : Xmarks


Gapminder

26Oct09

Statistics most often do not completely represent reality, but we can learn a lot from them.

Check out Gapminder.org

Quote from Wikipedia:

Hans Rosling (born 1948 in Uppsala, Sweden) is Professor of International Health at Karolinska Institutet and Director of the Gapminder Foundation, which developed the Trendalyzer software system. From 1967 to 1974 he studied statistics and medicine at Uppsala University, and in 1972 he studied public health at St John’s Medical College, Bangalore. He became a licenced physician in 1976 and from 1979 to 1981 he served as District Medical Officer in Nacala in northern Mozambique.


Requirements: USB Stick (not smaller than OS you are planning to install), PC running Vista or Windows 7

1. Open a command prompt as administrator (WIN + R)

2. Get USB Stick number, type in CMD window:

diskpart
list disk

Take note of your number, in my case the USB stick was disk 1.

3. Prepare the stick, type in the following:

select disk 1
clean
create partition primary
select partition 1
active
format fs=NTFS (faster: format stick from explorer using Quick Format)
assign
exit

The USB stick is now ready, proceeding to write bootsectors.

1. Insert your Windows Vista / 7 DVD into your drive or mount your ISO or you can extract the boot folder using WinRAR.

2. Go into the boot folder:

d:
cd boot

3. My USB stick labeled disk G:\ by the computer:

bootsect /nt60 g:

4. CloseCMD.

Copy the entire installation DVD to the root of theUSB stick, you can just use explorer for this if you like.

Reboot and boot from USB, et voila


aboutmac
To change CPU type if not automatically detected do the following : In terminal type:

sysctl -n machdep.cpu.brand_string

The result i am presented with is :

Intel® Core™2 Quad  CPU   Q9450  @ 2.66GHz

Edit file :

sudo vim /System/Library/CoreServices/Resources/English.lproj/AppleSystemInfo.strings

Change the following line :

“UnknownCPUKind” = “Unknown” to
“UnknownCPUKind”= “Intel® Core™2 Quad CPU Q9450"

You do not have to restart to see the changes in effect, just close About This Mac and reopen and you will see the correct information.


Statistics most often do not completely represent reality, but we can learn a lot from them.

Check out Gapminder.org

Quote from Wikipedia:

Hans Rosling (born 1948 in Uppsala, Sweden) is Professor of International Health at Karolinska Institutet and Director of the Gapminder Foundation, which developed the Trendalyzer software system. From 1967 to 1974 he studied statistics and medicine at Uppsala University, and in 1972 he studied public health at St John’s Medical College, Bangalore. He became a licenced physician in 1976 and from 1979 to 1981 he served as District Medical Officer in Nacala in northern Mozambique.


Requirements: USB Stick (not smaller than OS you are planning to install), PC running Vista or Windows 7

1. Open a command prompt as administrator (WIN + R)

2. Get USB Stick number, type in CMD window:

diskpart

list disk

Take note of your number, in my case the USB stick was disk 1.

3. Prepare the stick, type in the following:

select disk 1

clean

create partition primary

select partition 1

active

format fs=NTFS (faster: format stick from explorer using Quick Format)

assign

exit

The USB stick is now ready, proceeding to write bootsectors.

1. Insert your Windows Vista / 7 DVD into your drive or mount your ISO or you can extract the boot folder using WinRAR.

2. Go into the boot folder:

d:

cd boot

3. My USB stick labeled disk G:\ by the computer:

bootsect /nt60 g:

4. CloseCMD.

Copy the entire installation DVD to the root of theUSB stick, you can just use explorer for this if you like.

Reboot and boot from USB, et voila




Follow

Get every new post delivered to your Inbox.