I've been trying to get a .desktop file to open a new full screen terminal, run "curl wttr.in" (wttr.in is a weather forecast service that works well with the terminal) , and leave the window open. I have managed to get other commands to run in a new full screen terminal from a .desktop file, but "curl wttr.in" doesn't work. The closest I have gotten to making it work is a .sh script with the following contents, which (executed on its own) does exactly what I want perfectly:
#!/bin/bash
gnome-terminal --window --maximize -- ./wttr.sh
$SHELL
wttr.sh contains
curl wttr.in
sleep 60
But even putting the path to that script (which I did make executable) as the Exec of a .desktop opens a full screen terminal with the following message and nothing else:
"There was an error creating the child process for this terminal Failed to execute child process "./wttr.sh": Failed to execve: No such file or directory"
I've tried doing it the more normal ways, like putting the program right at the end of the gnome-terminal thing, but that hasnt worked either.
I am using Ubuntu 22.04.2 LTS
This is my first time making one of these posts, so if there's something I could do better, feel free to let me know.
./wttr.sh
relies on $PWD being correct otherwise "No such file" errors are to be expected), why not define the path fully?