0

Always when I want to execute my script, I need to confirm that I want to run it in terminal. Is there a way to easily skip that, or set this as default?

I am using Nemo file manager (Mint)

Kusalananda
  • 333,661
Unixe
  • 1
  • This question is offtopic as it is not about Unix and Linux, but more about your file manager. You might find some help here: https://superuser.com/questions/763554/how-to-make-it-so-bash-runs-instead-of-asking-where-to-run-upon-selection-from-f – Panki Oct 05 '18 at 07:53
  • 2
    @Panki This question seems fine to me. Users can ask about "Applications packaged in *nix distributions". There's even a tag for nemo. I'm not even sure if this is related to nemo, or just the DE itself. – Sparhawk Oct 05 '18 at 08:08

1 Answers1

0

Instead of putting your executable scripts on the Desktop, create a separate directory for them. Traditionally this has been $HOME/bin but I understand it's now something like $HOME/.local/bin. Either way, you can also add this directory to your $PATH in ~/.bash_profile or other startup file.

As an example, consider an executable script, $HOME/bin/thing.

Now, instead of having your executable on the Desktop, you create a launcher. You can do this either graphically by right-clicking on the Desktop and following the prompts to run $HOME/bin/thing in a Terminal or you can create the file manually:

cat <<'X' >"$HOME/Desktop/Thing.desktop"
[Desktop Entry]
Comment=
Terminal=true
Name=Thing
Exec=bin/thing
Type=Application
X

(You could substitute Exec=.local/bin/thing if appropriate.)

Chris Davies
  • 116,213
  • 16
  • 160
  • 287