50

I want to open a PDF file multiple times with evince. I want to do this to be able to look at different sections of the same file at the same time. Every time I try to open the file again, it only brings up the already opened evince window with my PDF file. I also tried to open a new evince window and then opening my file by using the menu of evince.

Is there any possibility to do this?

74

In evince you can use File --> Open a Copy to open another window showing the same file.

1
  • 16
    It's a nice feature and all. But first they create a problem, by ignoring multiple invocations, then they give you a menu entry to work around the problem they created. Grr. – Adrian Ratnapala Apr 19 '14 at 7:26
9

In Ubuntu 18.04 I found no "View in new window" but did find "Open a copy" under the "File Options" button on the far right. This opens a new instance. Later I found that you won't see the content until you scroll it.

2
  • Thanks a lot for this answer! :) I think the second sentence is completely redundant though. – Line Feb 1 '19 at 9:25
  • I took that redundant sentence out then. – Rob Rutten Oct 28 '19 at 9:19
4

The accepted answer for this doesn't work for Evince anymore. To view the document multiple times in that program, select "View in new window" from the menu.

2
  • 3
    In Ubuntu 14.04 the menu of Evince is patched to have the old menus. Nevertheless your answer is (probably) correct for everyone who does not use an old or patched version of Evince. Thank you! – Wauzl May 6 '14 at 7:46
  • 1
    It might be worth updating this answer with something specifying in which cases the accepted solution does not work (any other case besides ubuntu 14.04? Perhaps some old evince version?). Otherwise this seems contradictory and confusing. – antosecret Feb 8 '17 at 20:26
3

There is no File menu in Ubuntu 18.04's Evince. The other options:

  1. Use Ctrl+N shortcut. It can be found in Keyboard Shortcuts with
    • Keyboard Shortcuts in Alt menu options search
    • Document Viewer -> Keyboard Shortcuts menu
  2. Use menu ☰ -> Open a Copy in the right upper angle, as in Rob's comment.
1

I don't like Evince's default behavior, so I clear the DBUS_SESSION_BUS_ADDRESS environment variable before invoking it. This is my wrapper script, which I have in a directory that is before /usr/bin in my $PATH:

#!/usr/bin/env bash
set -e

declare -r EX_SOFTWARE=70

# Find the right Evince.
my_id=$(stat -c %d:%i -- "$0")
while IFS= read -r p; do
    if [[ "$my_id" != "$(stat -c %d:%i -- "$p")" ]]; then
        bin=$p
        break
    fi
done < <(type -ap evince)
[[ -z $bin ]] && exit $EX_SOFTWARE

setsid -f env DBUS_SESSION_BUS_ADDRESS= "$bin" "$@" &>/dev/null <&1
1
  • Actually, this is great. I'm not sure without decoding quite what the rest of the wrapper is needed for, but a simple DBUS_SESSION_BUS_ADDRESS= evince mydoc.pdf works quite nicely for me. – andybuckley Dec 7 '20 at 23:38
0

The above solutions are not flexible if you use two monitors or like the command prompt. I'm using (in .bashrc):

function open2 () { ( ln -s "$1" "L~$1"; evince "L~$1"; \rm "L~$1" ) & }
  1. This works with one file only,
  2. \rm because I have an alias rm='rm -i',
  3. evince=atril in Ubuntu Mate

Your Answer

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

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