s.send('xclock&\n')
time.sleep(1)
s.send('XCLOCK_PID=$!\n')
time.sleep(30)
s.send('echo "killing $XCLOCK_PID"\n')
s.send('kill $XCLOCK_PID\n\n')
time.sleep(5)
Remote executing of program via xterm run using paramiko python ssh library