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 at 6:54

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.