This question already has an answer here:
I want to pass a command line program by default when I run it.
The solution I could think of was to add a custom "myprog" wrapper to my "bin" folder
#! /bin/sh /usr/bin/myprog --foo=bar $@
The good thing is that since I set up my system so the bin folder is in the PATH both for interactive shells and for GUI apps, calling myprog from anywhere will pass the --foo flag by default, including if I run myprog from the applications menu.
However, I didn't like that I had to use the absolute path to
/usr/bin/myprog in my wrapper script (if I don't it enters an infinite loop). Is there a better way to go at this?