Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- style1:(available)
- gnome-session-properties
- Name:StartUp
- Command:bash /home/r2slam/Desktop/StartUp/main.sh
- ./bashrc
- export LD_LIBRARY_PATH=/opt/Basler_blaze/lib/gentlproducer/gtl #/ProducerBlaze.cti
- =============================================
- style2:(start up roscore on the background)
- add the file(etc/rc.local)
- $sudo gedit ./rc.local
- #!/usr/bin/bash
- source /opt/ros/noetic/setup.bash
- source /home/r2slam/catkin_ws/devel/setup.bash
- source /home/r2slam/catkin_ws1/devel/setup.bash
- #su r2slam
- #roscore &
- #echo "$USER"
- #echo "success to start the bash by rc.local" > /home/r2slam/test.log
- #cd /home/r2slam/Desktop/StartUp
- #gnome-terminal -t "roscore" -- bash -c "./main.sh;exec bash;"
- #su r2slam
- #gnome-terminal -t "roscore" -- bash -c "./main.sh;"
- #echo "Hele me" >> /home/r2slam/test.log
- #echo "USER" >> /home/r2slam/test.log
- #echo "$USER" >> /home/r2slam/test.log
- #echo "$USER" >> /home/r2slam/test.log
- #cd /home/r2slam/Desktop/StartUp
- #sh ./touch.sh
- #sh \home\r2slam\Desktop\StartUp\main.sh
- exit 0
- =========================
- (main.sh)
- #!/usr/bin/bash
- #sleep 5 # wait 3 seconds
- #sh roscore.sh
- #echo -e ${string}
- #sleep 5 # wait 3 seconds
- #sh roscore.sh
- #echo -e ${string}
- echo "Hello World" > /home/r2slam/Desktop/StartUp/hello.txt
- source /opt/ros/noetic/setup.bash
- source /home/r2slam/catkin_ws/devel/setup.bash
- source /home/r2slam/catkin_ws1/devel/setup.bash
- #gnome-terminal
- cd /home/r2slam/Desktop/StartUp
- #roscore &
- gnome-terminal -t "roscore" -- bash -c "./roscore.sh;exec bash;"
- #gnome-terminal -t "roscore" -- bash -c "./roscore.sh;"
- #sh ./roscore.sh
- #sh ./touch.sh
- sleep 100
- exit 0
- =============================
- (roscore.sh)
- #!/usr/bin/bash
- echo "roscore ..."
- string="Hello,World!\n"
- sleep 5
- /opt/ros/noetic/bin/roscore
- sleep 20
- #sleep 3
- =============================
- (touch.sh)
- #!/usr/bin/bash
- touch 123.txt
Add Comment
Please, Sign In to add comment