64

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?

David Foerster
  • 36,890
  • 56
  • 97
  • 151
Wauzl
  • 1,763

7 Answers7

85

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

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.

8

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.
savfod
  • 181
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

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

Margaret
  • 121
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
zx485
  • 2,865
0

I propose two other workarounds for opening "$FILE" with evince:

  1. Run evince as a "$USER", but it does need super user permissions and can be done once per "$USER":

    sudo -u "$USER" evince "$FILE"
    
  2. Run evince in preview mode which has less features, but it does NOT need super user permissions and can be done multiple times per "$USER":

    evince --preview "$FILE"
    

For this latter case you can add the following alias (e.g. prevince) for the command evince --preview to add in you personal ~/.bashrc:

   alias prevince='evince --preview'

such that the following command can be used instead:

   preevince "$FILE"