1

terminal, run web browser:

  web_browser & disown

web browser opens fine.
it seems to be disowned by the terminal.

but as I use the web browser... to surf the web..

I begin to see the web browser reporting data
to that terminal.

terminal prints data about the web browser.

so I suppose "disown" is not sufficient to
completely disown the web browser ?

1 Answer 1

2

The web browser is still run with its output and input connected to your terminal.

Disown will only stop your shell from sending signals to it when it sends signals to its children.

To get rid of the output you need to redirect the output

browser  > /dev/null 2>&1 &

or

browser  > /dev/null 2> /dev/null

If you are running this in an ssh session you will also want to disconnect the input just in case so that it does not hang:

browser < /dev/null  > /dev/null 2>&1 &

and then you can also disown it

browser < /dev/null  > /dev/null 2>&1 &
disown
3
  • In contrast nohup automatically redirects stdout and/or stderr from terminal to a file; the GNU version also redirects stdin to /dev/null Feb 12, 2017 at 8:43
  • Because you got the redirection wrong, the questioner raised unix.stackexchange.com/questions/344368 . (-:
    – JdeBP
    Feb 12, 2017 at 11:16
  • Bah! I just fixed that too lol
    – Chunko
    Feb 12, 2017 at 11:20

Your Answer

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