0

I've an application on my machine that is working with a remote one. Before I'm able to use this app, I need to run some commands on the remote one. Here for I've created an script named startUpRun.sh. In this script there are some commands for a gstreamer connection like

gst-launch-1.0 pulsesrc ! audio/x-raw,format=S16LE,channels=1,rate=16000 ! audioconvert ! rtpL16pay ! udpsink host=192.168.1.1 port=5555 &

When I execute the script during an ssh session on the remote machine this works completely fine for me and this script does what it should do.

But when I invoke this script by executing it from my machine using

 sshpass ssh -o StrictHostKeyChecking=no -t root@192.168.1.2 "source ./startUpRun.sh"

but unfortunately no gstreamer instance gets started. I've checked this multiple times using pgrep gst and top.

Does somebody have an idea what I probably missed?

  • did you try 'source ./startUpRun.sh </dev/null &>/dev/null' – Asain Kujovic Nov 28 '16 at 7:19
  • unfortunately this doesn't work for me neither.. – Martin Nov 28 '16 at 7:23
  • than 'nohup source /full/path/of/script/startUpRn.sh </dev/null >/dev/null 2>&1' ... should work. – Asain Kujovic Nov 28 '16 at 7:27
  • unfortunately, this works also not.. :-/ – Martin Nov 28 '16 at 7:35
  • what is the absolute for your script on the remote machine ? – Wissam Roujoulah Nov 28 '16 at 7:39
0

Try to remove the & from the end of the line, so that the connection stays up. You can use ssh parameters to bring the session to the background instead

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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