I have a script file script1.sh
as shown below:
#!/usr/bin/env bash
cd /home/userA/scripts
. r1.sh
when I manually open a terminal and run it using . script.sh
it works fine.
But when I created the below .desktop launcher to run it says that ROSRUN command not found
.
This is the .desktop
file:
[Desktop Entry]
Version=1.0
Type=Application
Terminal=true
Icon[en_AU]=/home/userA/Pics/pic1.png
Name[en_AU]=automatic
Exec=/home/userA/Desktop/script1.sh
Comment[en_AU]=comment
Name=automatic
Comment=comment
Icon=/home/userA/Pics/pic1.png
And this is how r1.sh
looks like:
#!/bin/bash
rosrun r1 r1 \
-p1 $p1 \
-p2 $p2 \
-p3 $p3
So if anyone could please advise what may be the reason behind this happening. As I don't know why it runs smoothy without this error appearing when manually opening a terminal and running it, and why the error appears when I use .desktop
launcher instead?
Exec=/home/userA/Desktop/script1.sh
what do you want me to do?Exec=
. And your desktop file seems to lack a[
in the first line, if this isn't a C&P mistake.