Difference between revisions of "Transmission"

From Amahi Wiki
Jump to: navigation, search
m (Forgot part of step 3 of manual installation instructions)
 
(58 intermediate revisions by 4 users not shown)
Line 1: Line 1:
 
[[Category:Apps]]
 
[[Category:Apps]]
 
 
[http://transmissionbt.com Transmission] is a torrent client that is available on Amahi as a [http://www.amahi.org/apps/transmission one-click] app. It has a web based interface.
 
[http://transmissionbt.com Transmission] is a torrent client that is available on Amahi as a [http://www.amahi.org/apps/transmission one-click] app. It has a web based interface.
  
[[Image:Transmission_screen.png]]
+
<!--[[Image:Transmission_screen.png]]-->
 +
= Blocklist Rules =
 +
Blocklists can be added to Transmission via the user interface:
 +
* Select '''Edit Preferences''' (looks like a wrench at the bottom left)
 +
* Choose '''Peers''' tab
 +
* Select '''Enable blocklist''' checkbox
 +
* Replace <b><nowiki>http://www.example.com/blocklist</nowiki></b> with <b><nowiki>http://list.iblocklist.com/?list=bt_level1</nowiki></b>
 +
* Choose '''Update'''
  
= Automatically Download to a Share =
 
  
(Note: this will be automatic in the future)
+
You should now see "Blocklist has 0 rules" change.  Close the '''Preferences''' by selecting the '''X''' at the top right corner.
  
When you install Transmission from your Amahi dashboard, the /var/hda/files/torrents directory will be created.
+
= Automatically Download to a Share =
  
If you want remote access to your downloaded torrents, or if you want to drop .torrent files in this folder, to have Transmission automatically download them, you'll need to create a '''torrents''' share. To do this:
+
* When you install Transmission from your Amahi dashboard, the '''torrents''' share will be created automatically.
  
* Go to the '''Shares''' tab in setup, or go directly there: http://hda/setup?tab=shares
+
* Torrent files added to this share directory are also automatically added to Transmission to download. This is done every 5 minutes via '''/etc/cron.d/amahi-torrent-watch''' [http://en.wikipedia.org/wiki/Cron Cron] job.
* Click the '''New Share''' button
 
* Create a share named '''torrents'''
 
  
Note: Torrent files added to this share directory are also automatically added to Transmission to download. This is done every 5 minutes.
+
* Change the following portion of the file as desired (*/5 = 5 minutes):
  
 +
*/5 * * * *
  
= How to update Transmission to version 2.04 =
+
= Automatic download script (Amahi 7) =
  
If you're using x86_64 version of Fedora 12, execute this as one big line in terminal:
+
* To change the logging or saving of torrents, you will need to modify the script below (located in /usr/share/transmission directory):
 +
** Remove '''>> /var/log/torrentwatch.log''' to disable logging.
 +
** Change '''mv "$file" "$file".added"''' to '''"rm -f "$file"''' to prevent saving torrents with .added extension.
 +
** Change '''/var/hda/files/torrents''' to desired share path to change download location.
  
{{Code|rpm -Uvh http://dl.dropbox.com/u/3022105/Amahi/transmission/transmission-2.04-1.fc12.x86_64.rpm http://dl.dropbox.com/u/3022105/Amahi/transmission/transmission-cli-2.04-1.fc12.x86_64.rpm http://dl.dropbox.com/u/3022105/Amahi/transmission/transmission-common-2.04-1.fc12.x86_64.rpm http://dl.dropbox.com/u/3022105/Amahi/transmission/transmission-daemon-2.04-1.fc12.x86_64.rpm http://dl.dropbox.com/u/3022105/Amahi/transmission/transmission-gtk-2.04-1.fc12.x86_64.rpm}}
+
<pre>#!/bin/bash
 +
for file in /var/hda/files/torrents/*.torrent
 +
do
 +
if [ "$file" != "/var/hda/files/torrents/*.torrent" ]; then
 +
echo [`date`] "$file" added to queue. >> /var/log/torrentwatch.log
 +
/usr/bin/transmission-remote localhost:9091 -a "$file"
 +
mv "$file" "$file".added
 +
sleep 1
 +
fi
 +
done</pre>
  
Now you should have newest Transmission client.
+
= Add Transmission Web Client Password =
  
= How to add a password to Transmission Web Client =
 
  
 
+
'''NOTE:''' Do all tasks as root user
NOTE: Do all tasks as ROOT
 
  
 
1. Stop the Transmission service:  
 
1. Stop the Transmission service:  
  
{{Code|service amahi-transmission stop}}
+
service amahi-transmission stop
  
 
2. Edit the settings.json.
 
2. Edit the settings.json.
  
{{Code|nano /var/lib/transmission/.config/transmission-daemon/settings.json}}
+
nano /var/lib/transmission/.config/transmission-daemon/settings.json
  
 
3. Edit these fields, remembering the username and password
 
3. Edit these fields, remembering the username and password
  
{{Text|Text="rpc-authentication-required": true,                                         
+
<pre>"rpc-authentication-required": true,                                         
 
"rpc-bind-address": "0.0.0.0",                                               
 
"rpc-bind-address": "0.0.0.0",                                               
 
"rpc-enabled": true,                                                         
 
"rpc-enabled": true,                                                         
 
"rpc-password": "[Insert wanted password]",         
 
"rpc-password": "[Insert wanted password]",         
 
"rpc-port": 9091,                                                           
 
"rpc-port": 9091,                                                           
"rpc-username": "[Username wanted]",}}
+
"rpc-username": "[Username wanted]",</pre>
  
 
CTRL-X to save.
 
CTRL-X to save.
Line 54: Line 68:
 
4. Restart Transmission Service
 
4. Restart Transmission Service
  
service amahi-Transmission start
+
service amahi-transmission restart
  
Next, we need to make sure that the cronjob that automatically loads torrents from the torrents share uses the same user authentification.
+
5.  Next, we need to make sure that the cronjob that automatically loads torrents from the torrents share uses the same user authentification.
  
5. Edit /etc/cron.d/amahi-transmission-watch
+
* (Amahi 6) Edit '''/etc/cron.d/amahi-transmission-watch''' and change the following:
  
6. Edit the following
+
*/5 * * * *    transmission    transmission-remote localhost:9091 -a /var/hda/files/torrents/*.torrent && rm -f /var/hda/files/torrents/*.torrent
{{Text|*/5 * * * *    transmission    transmission-remote localhost:9091 -a /var/hda/files/torrents/*.torrent && rm -f /var/hda/files/torrents/*.torrent}}
 
  
add "--auch [username]:[password]" so the line becomes:
+
:: add "--auth [username]:[password]" so the line becomes:
  
{{Text|*/5 * * * *    transmission    transmission-remote localhost:9091 --auth [username]:[password] -a /var/hda/files/torrents/*.torrent && rm -f /var/hda/files/torrents/*.torrent}}
+
*/5 * * * *    transmission    transmission-remote localhost:9091 --auth [username]:[password] -a /var/hda/files/torrents/*.torrent && rm -f /var/hda/files/torrents/*.torrent
  
where the username and password are the ones you entered as rpc-username and rpc-password.
+
* (Amahi 7)  Edit '''/usr/share/transmission/torrentwatch.sh''' and change the following:
Now navigate to web address and input information and you're all set!
 
  
= Changing the file permissions of downloaded files =
+
/usr/bin/transmission-remote localhost:9091 -a "$file"
 +
 
 +
:: add "--auth [username]:[password]" so the line becomes:
 +
 
 +
/usr/bin/transmission-remote localhost:9091 --auth [username]:[password] -a "$file"
 +
 
 +
* The username and password are the ones you entered as rpc-username and rpc-password.  Now navigate to web address and input information and you're all set!
 +
 
 +
= Change Downloaded Files Permissions =
  
 
By default, transmission sets the file permissions of downloaded files so that only the transmission user can write to the downloaded files and folders. To change this, modify the settings as follows:
 
By default, transmission sets the file permissions of downloaded files so that only the transmission user can write to the downloaded files and folders. To change this, modify the settings as follows:
Line 76: Line 96:
 
1. Stop the transmission server from the Amahi Control Panel. Be sure to disable the watchdog timer as well.
 
1. Stop the transmission server from the Amahi Control Panel. Be sure to disable the watchdog timer as well.
  
2. {{Code|vim /var/lib/transmission/.config/transmission-daemon/settings.json}}
+
2. Edit '''/var/lib/transmission/.config/transmission-daemon/settings.json''':
 +
vim /var/lib/transmission/.config/transmission-daemon/settings.json
  
3. Find the line: "umask": 18, and change it to "umask": 2. This will enable all users in the transmission group to also write to the file.
+
3. Find the line: '''umask: 18''', and change it to '''umask: 2'''. This will enable all users in the transmission group to also write to the file.
  
 
4. Restart transmission from the Amahi Control Panel (Settings/Servers/Transmission Server/Restart) for the changes to take effect. Remember to check the watchdog timer as well.
 
4. Restart transmission from the Amahi Control Panel (Settings/Servers/Transmission Server/Restart) for the changes to take effect. Remember to check the watchdog timer as well.
Line 88: Line 109:
 
<u>GUI method:</u>
 
<u>GUI method:</u>
  
1. Go to System -> Administration -> Users and Groups
+
1. Go to System -> Administration -> Users and Groups<br />
 
+
2. Enter your root password<br />
2. Enter your root password
+
3. Click on Edit -> Preferences<br />
 
+
4. Make Sure "Hide System users and groups" is unchecked and close the dialog box<br />
3. Click on Edit -> Preferences
+
5. In the list of Users find "transmission" and double click<br />
 
+
6. In the Groups tab find "users" and make sure it is checked.<br />
4. Make Sure "Hide System users and groups" is unchecked and close the dialog box
 
 
 
5. In the list of Users find "transmission" and double click
 
 
 
6. In the Groups tab find "users" and make sure it is checked.
 
 
 
 
7. Close all windows.
 
7. Close all windows.
 
  
 
<u>Terminal method:</u>
 
<u>Terminal method:</u>
  
1. Open Terminal
+
1. Open Terminal<br />
 
+
2. Type  
2. Type {{Code|su}}
+
sudo su -
 
+
3. Enter your password<br />
3. Enter your root password
+
4. Type
 
+
usermod -G users transmission
4. Type {{Code|usermod -G users transmission}}
 
 
 
 
5. Close Terminal
 
5. Close Terminal
  
= Manually Install Transmission =
+
=Adding User To Transmission Group=
 
 
1. Open a terminal window and install the latest version of Transmission available in the Fedora repository as root:
 
 
 
{{Code|su
 
yum install transmission}}
 
 
 
2. Go to System -> Preferences -> Startup Applications. In the "Startup Programs" tab, click the "Add" button. In the window that pops up, fill in the values as follows:
 
 
 
{{Text|Text=- Name: Transmission
 
- Command: transmission-gtk %F
 
 
 
- Comment: Transmission BitTorrent Client}}
 
 
 
3. Launch Transmission by going to Applications -> Internet -> Transmission BitTorrent Client. Now go to Edit -> Preferences. In the "Torrents" tab, tick "Automatically add torrents from" and choose a folder in one of your shares that you'd like to use as your "torrent landing pad". For example, you could create a share called "Torrents" and have a folder in that share called "Torrent Files". Any torrent files that you copy to this folder will be automatically loaded and started by Transmission.
 
 
 
4. Also on this tab, tick "Start when added" and "Move .torrent file to trash". Untick "Show options dialog". Set your "Save to Location" to a folder in one of your shares. For example, if you have a share called "Torrents", you could use a folder in that share called "Completed Torrents".
 
 
 
[[Image:Transmission_Preferences_Torrents.png]]
 
 
 
5. Go to the "Web" tab and tick "Enable web client". It is recommended that you also tick "Use authentication" and choose a username and password for access to Transmission on your network.
 
 
 
[[Image:Transmission_Preferences_Web.png]]
 
 
 
6. Go through the rest of the tabs and set up everything as you'd like it (e.g. download & upload speed limits).
 
 
 
7. To control Transmission from other computers on your network, you can use the web interface. To access this, type the following into your browser:
 
 
 
''http://hda:9091'' (replace "hda" with the name or IP address of your Amahi server)
 
 
 
8. Another option that gives you more control over your torrents is to install Transmission Remote GUI on your client computer(s). It can be downloaded from here:
 
 
 
http://code.google.com/p/transmisson-remote-gui/downloads/list
 
  
9. Once installed, start Transmission Remote GUI and go to Tools -> Connection Options. In the "Connection" box, type "HDA" or whatever you wish. In the "Connection" tab, fill in the values as follows:
+
You may run into a problem where even after adding transmission to the users group, that you cannot delete or modify files downloaded from Transmission. If this happens, you can add the user(s) you want to modify the downloaded files by running the follow command as root replacing "admin" with the user you want to add:
  
{{Text|Text=- Remote Host: hda
+
usermod -a -G transmission admin
- Port: 9091
 
  
- User name: <user name chosen in step 5>
+
Note: You need to stop the transmission-daemon service and watchdog before running the above command, and a restart of the server may be necessary, just remember to restart the service and watchdog first.
  
- Password: <password chosen in step 5>}}
+
= Prevent Transmission Email Reports =
  
NOTE: Replace "hda" with the name or IP address of your Amahi server.
+
Transmission installs a cronjob that checks a preset folder every xx minutes for torrent files. If a torrent-file is present it will automatically start the download for you and delete the torrent file. In some cases you might receive email reports when the folder is empty. You can edit the cronjob to make sure no reports are sent when the cronjob is run.
  
[[Image:Transmission_Remote_GUI_Connection_Options_Connection.png]]
+
* cronjob can be found at '''/etc/cron.d/amahi-transmission-watch'''
  
10. In the "Paths" tab, you'll need to enter path mappings for the folders you've set torrents to download to. For example, if you're using a share called "Torrents", you'll want to enter the following:
+
* Add '''>/dev/null 2>&1''' to the end all command lines and reports will not be sent in the future.
  
{{Text|Text=/var/hda/files/Torrents=\\hda\Torrents}}
+
= Transmission with HTTPS Trackers (Ubuntu) =
  
[[Image:Transmission_Remote_GUI_Connection_Options_Paths.png]]
+
Ubuntu 12.04 64bit currently suffers from [https://bugs.launchpad.net/ubuntu/+source/gnutls26/+bug/937537 this bug] in libgnutls26 which prevents Transmission communicating with SSL trackers. In order to fix this run the following commands.
  
11. To start downloading a torrent, you can either:
+
wget <nowiki>http://ftp.uk.debian.org/debian/pool/main/g/gnutls26/libgnutls26_2.12.20-1_amd64.deb</nowiki>
  
a) Copy/download a .torrent file to the folder you specified under "Automatically add torrents from" in step 5.
+
sudo dpkg -i libgnutls26_2.12.20-1_amd64.deb
  
b) Open a .torrent file or magnet link with Transmission Remote GUI.
 
  
c) Open a .torrent file or enter a torrent URL in the Web Interface.
+
For a list of available mirrors see [http://packages.debian.org/wheezy/amd64/libgnutls26/download here]

Latest revision as of 17:19, 8 January 2017

Transmission is a torrent client that is available on Amahi as a one-click app. It has a web based interface.

Blocklist Rules

Blocklists can be added to Transmission via the user interface:

  • Select Edit Preferences (looks like a wrench at the bottom left)
  • Choose Peers tab
  • Select Enable blocklist checkbox
  • Replace http://www.example.com/blocklist with http://list.iblocklist.com/?list=bt_level1
  • Choose Update


You should now see "Blocklist has 0 rules" change. Close the Preferences by selecting the X at the top right corner.

Automatically Download to a Share

  • When you install Transmission from your Amahi dashboard, the torrents share will be created automatically.
  • Torrent files added to this share directory are also automatically added to Transmission to download. This is done every 5 minutes via /etc/cron.d/amahi-torrent-watch Cron job.
  • Change the following portion of the file as desired (*/5 = 5 minutes):
*/5 * * * *

Automatic download script (Amahi 7)

  • To change the logging or saving of torrents, you will need to modify the script below (located in /usr/share/transmission directory):
    • Remove >> /var/log/torrentwatch.log to disable logging.
    • Change mv "$file" "$file".added" to "rm -f "$file" to prevent saving torrents with .added extension.
    • Change /var/hda/files/torrents to desired share path to change download location.
#!/bin/bash
for file in /var/hda/files/torrents/*.torrent
do
if [ "$file" != "/var/hda/files/torrents/*.torrent" ]; then
echo [`date`] "$file" added to queue. >> /var/log/torrentwatch.log
/usr/bin/transmission-remote localhost:9091 -a "$file"
mv "$file" "$file".added
sleep 1
fi
done

Add Transmission Web Client Password

NOTE: Do all tasks as root user

1. Stop the Transmission service:

service amahi-transmission stop

2. Edit the settings.json.

nano /var/lib/transmission/.config/transmission-daemon/settings.json

3. Edit these fields, remembering the username and password

"rpc-authentication-required": true,                                        
"rpc-bind-address": "0.0.0.0",                                              
"rpc-enabled": true,                                                        
"rpc-password": "[Insert wanted password]",        
"rpc-port": 9091,                                                           
"rpc-username": "[Username wanted]",

CTRL-X to save.

4. Restart Transmission Service

service amahi-transmission restart

5. Next, we need to make sure that the cronjob that automatically loads torrents from the torrents share uses the same user authentification.

  • (Amahi 6) Edit /etc/cron.d/amahi-transmission-watch and change the following:
*/5 * * * *     transmission    transmission-remote localhost:9091 -a /var/hda/files/torrents/*.torrent && rm -f /var/hda/files/torrents/*.torrent
add "--auth [username]:[password]" so the line becomes:
*/5 * * * *     transmission    transmission-remote localhost:9091 --auth [username]:[password] -a /var/hda/files/torrents/*.torrent && rm -f /var/hda/files/torrents/*.torrent
  • (Amahi 7) Edit /usr/share/transmission/torrentwatch.sh and change the following:
/usr/bin/transmission-remote localhost:9091 -a "$file"
add "--auth [username]:[password]" so the line becomes:
/usr/bin/transmission-remote localhost:9091 --auth [username]:[password] -a "$file"
  • The username and password are the ones you entered as rpc-username and rpc-password. Now navigate to web address and input information and you're all set!

Change Downloaded Files Permissions

By default, transmission sets the file permissions of downloaded files so that only the transmission user can write to the downloaded files and folders. To change this, modify the settings as follows:

1. Stop the transmission server from the Amahi Control Panel. Be sure to disable the watchdog timer as well.

2. Edit /var/lib/transmission/.config/transmission-daemon/settings.json:

vim /var/lib/transmission/.config/transmission-daemon/settings.json

3. Find the line: umask: 18, and change it to umask: 2. This will enable all users in the transmission group to also write to the file.

4. Restart transmission from the Amahi Control Panel (Settings/Servers/Transmission Server/Restart) for the changes to take effect. Remember to check the watchdog timer as well.

Adding Transmission to users group

This prevents the "Error: permission denied /file_location/file_name" error when starting a torrent.

GUI method:

1. Go to System -> Administration -> Users and Groups
2. Enter your root password
3. Click on Edit -> Preferences
4. Make Sure "Hide System users and groups" is unchecked and close the dialog box
5. In the list of Users find "transmission" and double click
6. In the Groups tab find "users" and make sure it is checked.
7. Close all windows.

Terminal method:

1. Open Terminal
2. Type

sudo su -

3. Enter your password
4. Type

usermod -G users transmission

5. Close Terminal

Adding User To Transmission Group

You may run into a problem where even after adding transmission to the users group, that you cannot delete or modify files downloaded from Transmission. If this happens, you can add the user(s) you want to modify the downloaded files by running the follow command as root replacing "admin" with the user you want to add:

usermod -a -G transmission admin

Note: You need to stop the transmission-daemon service and watchdog before running the above command, and a restart of the server may be necessary, just remember to restart the service and watchdog first.

Prevent Transmission Email Reports

Transmission installs a cronjob that checks a preset folder every xx minutes for torrent files. If a torrent-file is present it will automatically start the download for you and delete the torrent file. In some cases you might receive email reports when the folder is empty. You can edit the cronjob to make sure no reports are sent when the cronjob is run.

  • cronjob can be found at /etc/cron.d/amahi-transmission-watch
  • Add >/dev/null 2>&1 to the end all command lines and reports will not be sent in the future.

Transmission with HTTPS Trackers (Ubuntu)

Ubuntu 12.04 64bit currently suffers from this bug in libgnutls26 which prevents Transmission communicating with SSL trackers. In order to fix this run the following commands.

wget http://ftp.uk.debian.org/debian/pool/main/g/gnutls26/libgnutls26_2.12.20-1_amd64.deb
sudo dpkg -i libgnutls26_2.12.20-1_amd64.deb


For a list of available mirrors see here