I discussed with Shoda-san and we looked better into the issue about python scritp launching from MEDM (see entry #1651). We couldn' t solve the problem.
So I decided that the best solution is to use only a bash script, as for the moment we simply need to change loops gains.
I prepared two bash scripts to open and close the loops repectively ( open_loops.sh, close_loops.sh), just using "caput" command. The scripts are located in /home/controls/FDSscripts.
I modified the shell command MEDM to launch them and now we can close and open the loops by pressing the button, even when we open MEDM from desktop icon.