0

Suppose I launch Firefox from my apps. Is the stdout and stderr redirected to a specific file or is it redirected to /dev/null? If it is indeed redirected to a specific file, I'd also like to know how to how to run applications from the terminal (e.g. nohup, & disown) without knowing where to redirect stdout and stdin. In other words, how would I tell the desktop to launch an app, instead of launching it from terminal myself as a detached process. Of course, if the redirection is to /dev/null, then nohup APP >/dev/null 2>&1 and & disown is sufficient.

1 Answer 1

1

Typically the standard output & error from desktop environment components is redirected to ~/.xsession-errors or a similar file by default (may vary between distributions), and when you start an application like Firefox via GUI, it would inherit that redirection.

The standard input of a GUI application would typically be /dev/null.

But you can do whatever you want.

Redirecting to /dev/null is a valid option and a common choice, particularly if you aren't interested of any debug output a GUI application might produce on stdout/stderr, or know that the application in question won't produce any.

1
  • We're trying to relaunch the GUI from a post-install script. I guess I can always use a GUI command line argument to inform the app to relaunch. Thanks for giving me ideas.
    – Elijah
    Feb 25 at 15:50

You must log in to answer this question.

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