1

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.

2
  • You've not told us your OS/release details, but why use a relative path (ie. ./wttr.sh relies on $PWD being correct otherwise "No such file" errors are to be expected), why not define the path fully?
    – guiverc
    Mar 12, 2023 at 6:28
  • @guiverc originally I was doing that by just keeping them in the same directory because ./someotherdirectory wasn't working... I just realized the dot is part of the path. That's an embarrassing mistake. It works now! Thanks for pointing that out.
    – BeeEss
    Mar 12, 2023 at 15:31

1 Answer 1

1

I had misunderstood what the dot in ./ did, writing out the full path in both the .sh and the desktop file fixed the issue.

1
  • Good Question. Good Answer. Welcome to AskUbuntu.
    – Frobozz
    Mar 13, 2023 at 22:54

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .