Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I would like to run programs (for example, opening PDFs in Evince) from my bash shell. However, when I do this the simplest way (evince filename.pdf), the shell doesn't let me input anything until I close Evince. Additionally, after I close Evince, I get some error messages, which I would ideally prefer not to have.

How can I structure the command to make this happen?

share|improve this question
    
try as follows: evince filename.pdf & The ampersand (&) is the key to doing that. –  MariusMatutiae Feb 17 at 21:00

1 Answer 1

up vote 2 down vote accepted

You can start evince using the following command:

$ evince filename.pdf &> /dev/null &

  • &> /dev/null will redirect both standard errors and standard output to /dev/null so that you will not see warnings and errors appearing in your terminal
  • the last & at the end of the command will start the process in a background job so that you can still work with your terminal without closing evince.
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.