Enable Transmission Auto Shutdown in Ubuntu - Techno Klenik


...And Linux for All

Saturday, March 26, 2016

Enable Transmission Auto Shutdown in Ubuntu

Transmission is simple torrent client. It is stable, actively maintained and very versatile. And of course,  it's available by default in some major Linux distributions (like Ubuntu for example).  However, until couple hours ago, i notice that one of key features offered by its competitor is missing. It should have auto shutdown  when download complete feature. Anyway, After i did some little research, i finally found  out how to enable Transmission auto shutdown in Ubuntu (in my case i'm using Ubuntu 15.10 and i didn't test it in other version). Okay this how i did it:

1.Drag or copy transmission launcher to Desktop, to do this go to /usr/share/applications find transmision.desktop and copy to your Desktop.

2.Change command properties. Right Click transmission.desktop under basic tab you will find command field add "gksu" to that field (make sure gksu is installed, to install it "sudo apt-get install gksu") close it. Optionally, you can drag this file to  plank if you already install it.

Please note that everytime you launch Transmission from your modified laucher, it will prompt to ask password.

3. Create custom script. Open gedit (text editor) type:  sudo poweroff  save as autoshutdown.sh (in this guide i save it on Desktop)

4. Make file executetable. Open terminal (ctr+ alt + t) type this command:
doni@Kusumanjaya:~$ sudo -i
[sudo] password for doni:
root@Kusumanjaya:~# cd /home/doni/Desktop
root@Kusumanjaya:/home/doni/Desktop# chmod +x autoshutdown.sh

note: change "/home/doni/Desktop" to the directory where you save autoshutdown.sh (on step 3)
5. Now open Transmission  go to Edit> Preferences and under Downloading check on “Call Script when torrent is completed”. Give the path of the script file you have created.

Okay, this how i enable Transmission auto shutdown. However, there is one thing that bother me. If you are downloading multiple torrent, your computer will shutdown after one of your download is complete. So this method is only applicable for single download. If you find better way please share with us. 
Don't forget to seed the torrent. Don't hit and run.

No comments:

Post a Comment