I have a scripts directory that I have added to path (specifically in the ~/.bashrc). I can run the scripts as expected from the terminal, but it says that the command is not found when I run it from the .desktop file. How can I get it to run the scripts in my folder just by the name like I can from the terminal.


Thanks for the answer!

  • Run a script from the .desktop file. In the script set up the environment and call the program.
    – waltinator
    Jan 17, 2021 at 6:54

1 Answer 1


Either do what waltinator says or use the env command directly in the desktop file:

[Desktop Entry]
Name=script name
Exec=env PATH=/custom/path:"$PATH" script.sh

You must log in to answer this question.

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