Shell Script with curl works on terminal but not as menu launcher.
by portaro from LinuxQuestions.org on (#4XECR)
Hello friends Happy New Year.
I have a question because I have a problem to apply a simple script as a launcher click to execute in terminal and auto use curl that have wttr.in as target.
If I directly put this command on terminal he works a'
Code:$ bash -x /home/joao/.config/tempo.shThis tempo.sh have this lines a'
Code:#!/usr/bin/env bash
curl https://wttr.in/chavesThe problem when I try to do a launcher to execute the script he simply open the terminal and do nothing. Here is the launcher sintax a'
Code:[Desktop Entry]
Name=Tempo-Chaves
Exec=bash -c /home/joao/.config/tempo.sh
Comment=
Icon=
NoDisplay=false
Type=Application
Terminal=true
Categories=Utility;I already try chage the Exec line with this a'
Exec=/usr/bin/bash -c /home/joao/.config/tempo.sh
Exec=/usr/bin/env bash -c /home/joao/.config/tempo.sh
Exec=lxterminal -e "bash -c '/home/joao/.config/tempo.sh;$bash' "
...
So now i'm curious why script works if I directly use the command with path on terminal but not as a launcher.
Thanks.


I have a question because I have a problem to apply a simple script as a launcher click to execute in terminal and auto use curl that have wttr.in as target.
If I directly put this command on terminal he works a'
Code:$ bash -x /home/joao/.config/tempo.shThis tempo.sh have this lines a'
Code:#!/usr/bin/env bash
curl https://wttr.in/chavesThe problem when I try to do a launcher to execute the script he simply open the terminal and do nothing. Here is the launcher sintax a'
Code:[Desktop Entry]
Name=Tempo-Chaves
Exec=bash -c /home/joao/.config/tempo.sh
Comment=
Icon=
NoDisplay=false
Type=Application
Terminal=true
Categories=Utility;I already try chage the Exec line with this a'
Exec=/usr/bin/bash -c /home/joao/.config/tempo.sh
Exec=/usr/bin/env bash -c /home/joao/.config/tempo.sh
Exec=lxterminal -e "bash -c '/home/joao/.config/tempo.sh;$bash' "
...
So now i'm curious why script works if I directly use the command with path on terminal but not as a launcher.
Thanks.