note: This question might have been asked before ( I think I saw it somewhere), but a quick search did not reveal anything.
I would like to tell the difference when a command is run from a shell.
Emacs can be initialized with the -nw
flag to disable the gui window, and I want this to be the default behaviour. However if emacs
is run from a non-shell environment, ( e.g. from the Open With
in your filemanager, a desktop configured hotkey, or even from bashrun ), it should not be called with the -nw
flag.
update: This should be a global change, running sudo emacs
in Terminal should'nt suddenly open a gui. Where do I make these changes?