Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I wish to set up Transmission so that it always runs on my home wi-fi network, but does not when I'm connected to any other networks.

Is there a way to set things up so that this is the case?

Thank you.

share|improve this question

1 Answer 1

up vote 4 down vote accepted

Write a script, call it check_transmission, save it in ~/bin/check_transmission

#!/bin/bash

# Set your HOME_ESSID here, make note of single and double quotes
HOME_ESSID='ESSID:"your_wireless_home_network_name"'

# Get your current MY_ESSID (network name)
MY_ESSID=$(iwconfig | awk '/ESSID {print $4}')

# Test if you are on your home network and if so
# Start Transmission
[ ${MY_ESSID} == ${HOME_ESSID} ] && transmission &

Make it executable

chmod u+x ~/check_transmission

Run gnome-session-properties and add it to your startup programs

(Use the "Add" button , put /home/your_user/check_transmission in the dialog)

enter image description here

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.