3

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)

3
  • I can't reproduce that. If I run evince foo.pdf; evince bar.pdf I get two different windows and two different processes. Jul 29, 2010 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. Jul 29, 2010 at 23:50
  • Maybe now I can reproduce what you said, Peter Eisentraut. It looks like this behavior has changed in version 2.30 Aug 27, 2010 at 19:35

1 Answer 1

1

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.

You must log in to answer this question.

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