Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Okay, this issue is kinda difficult to understand without context:

When we run Evince, it checks if there is any other instance running.

  • If there is one, the evince command exits immediately, right after passing the parameter to the running instance

  • If no other instance is running, a new one will be started, and the evince command will wait until this new instance exits.

While that behavior is quite nice, it is not helpful for shell scripts. Why? Because I have a script that writes a temporary .ps file, calls a PS/PDF viewer, and automatically deletes the temporary .ps file after the viewer exits. Unfortunately, this script only works if evince was not previously running (if evince was running, then the file is deleted too fast).

I don't want to add extra complexity to this script. It should be kept simple, because I may want to replace evince with xpdf, gv, or anything else.

I was expecting some kind of command-line parameter to evince (similar to -f to vim and gvim), but I fear there is no such option. Writing a wrapper script around evince might be a good solution, but this script should work correctly in all cases (if evince was running and if it wasn't).

Any ideas? (I know... this one is quite difficult)

share|improve this question
I can't reproduce that. If I run evince foo.pdf; evince bar.pdf I get two different windows and two different processes. – Peter Eisentraut Jul 29 '10 at 14:24
Yeah, I get two windows too. Are you running these commands on the terminal? You will notice that the first one will wait until all Evince windows get closed, while the second one will return to the shell immediately. – Denilson Sá Jul 29 '10 at 23:50
Maybe now I can reproduce what you said, Peter Eisentraut. It looks like this behavior has changed in version 2.30 – Denilson Sá Aug 27 '10 at 19:35
up vote 0 down vote accepted

It seems that previous Evince versions (up to 2.28) had the behavior I described in my question. Fortunately, version 2.30 changed that behavior to the one I wanted.

So, the answer is: update Evince to 2.30 or newer.

share|improve this answer

Your Answer


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.