title: Open new gnome-terminal from scripts and input vars from present script.
body: <pre><code>#!/bin/bash
  
  Dpath=/home/$USER/Docker/
  IP=`sed -n 1p /home/medma/.medmadoc`
  DockerMachine=`sed -n 2p /home/$USER/.medmadoc`
  DockerPort=`sed -n 5p /home/$USER/.medmadoc`
  DockerUser=`sed -n 3p /home/$USER/.medmadoc`
  DockerPass=`sed -n 4p /home/$USER/.medmadoc`
  
  if [ ! -d $Dpath ] ; then
  mkdir -p $Dpath
  else 
  stat=`wget -O ".dockerid" http://$IP/DOCKER-STAT.txt`
  for ids in `cat .dockerid`
  do
  if [ "$ids" == "$DockerMachine" ] ; then
  gnome-terminal -x sh -c 'sshfs -p$DockerPort $DockerUser@$IP:/var/www/html $Dpath ; bash '
  nautilus $Dpath
  zenity --info --text "Mounted $DockerMachine"
  exit
  else
  :
  fi
  done
  zenity --info --text "No Such ID:$DockerMachine"
  fi
  </code></pre>
  
  <blockquote>
    <p>gnome-terminal -x sh -c 'sshfs -p$DockerPort $DockerUser@$IP:/var/www/html $Dpath ; bash '</p>
  </blockquote>
  
  <p>this command opens up a new terminal but the problem is that it does not load vars like  $DockerPort  $DockerUser $IP $Dpath from this script. </p>
  
  <p>How do I input the values in these vars from this script to the newly opened terminal ?</p>
  
  <p>Thanks !</p>