I would like to know how to write the Exec
command of a .desktop file to open a new terminal and execute a shell script in it. The shell script is working and accessible by all users. When launching the script from the terminal everything works, but it doesn't when trying to launch the script from a .desktop file.
Here are some combinations I have already tried:
Exec=gnome-terminal -x sh -c 'echo hello'
Exec=sh -c 'gnome-terminal echo hello'
Exec=sh -c 'echo hello'
Exec=echo hello
The .desktop terminal option is set to true.
Best Answer
The content of your desktop file should look like (see how to create a .desktop file using a text editor):
Or:
In the first case, the
Terminal
field is set tofalse
(perhaps contrary to your expectations) and in second case is set totrue
, but the result is in both cases the same.