Question: How do I set my settings such that even if I close my lid (Laptop) 
My downloads don't stop or pause in utransmission
I have set the setting in power options to not suspend after closing lid still doesn't have Time out is off as well in power option 
but this doesn't help 
also wifi goes off when I close the lid . 

I just want my torrents running even if I close the lid or keep the laptop untouched for a long time

Answer: 
`/etc/environment` takes a proper re-login to take effect, because it is processed by PAM at login. Further, as @przemo noted, it is not run or sourced as a script, so variables are not expanded. Put such variables in a `.sh` file in `/etc/profile.d/`:

```bsh
sudo tee -a /etc/profile.d/my_vars.sh <<"EOF"
export M2_HOME=/usr/local/apache-maven/apache-maven-3.1.1
export M2=$M2_HOME/bin
export PATH=$M2:$PATH
export JAVA_HOME=/usr/local/jdk1.6.0_45
export PATH=$JAVA_HOME:$PATH
EOF

```

This will also take a re-login to take full effect, but you can test it out immediately by running a login shell:

```
$ bash -l
$ echo $PATH
/usr/local/jdk1.6.0_45:/usr/local/apache-maven/apache-maven-3.1.1/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games

```

As Gunnar has pointed out, the default assignment to `PATH` should remain in `/etc/environment`, and shouldn't be added to the above script. See [this community wiki page](https://help.ubuntu.com/community/EnvironmentVariables#A.2BAC8-etc.2BAC8-profile.d.2BAC8.2A.sh) for more information.
`/etc/environment` is not a script file, you cannot use variables, for further reading I recommend <https://help.ubuntu.com/community/EnvironmentVariables>