gnome-terminal run roslaunch after ssh without closing the terminal
I 'd like to write a file.sh as follows :
#!/bin/bash
gnome-terminal -x bash -c "roslaunch abc slam.launch"
sleep 2s
gnome-terminal -x bash -c "ssh ubuntu@ipaddress; sleep 4s; roslaunch bringup minimal.launch"
sleep 2s
gnome-terminal -x bash -c 'ssh ubuntu@192.168.0.108 "roslaunch lidar scan.launch"'
It runs smoothly for the 1st roslaunch, the second command just ended at login in result of ssh, the last command , it open and then closed. I tried to change some script inside, and result shown "bash: roslaunch command not found"
How should i do ? thanks !