Where does evince store its per-document state (position, etc)?

17

4

I'm using evince to view my documents under Linux. One thing bothers me, however. It seems to magically remember the position and settings of the window for every document. I searched all over (the hidden directories in my home folder, system files, gconf) for where it might be saving those settings, but I can't find anything. Does anyone know where those settings are?

Amphetaman

Posted 2011-10-13T22:40:06.577

Reputation: 171

Answers

8

The settings are stored under ~/.local/share/gvfs-metadata/, but this knowledge is of little use since you cannot do anything practical with the binary files therein.

To read or edit the per-document settings, use the following gvfs tools, passing them the path to the document of which you want the settings:

  • Reading: gvfs-info /path/to/file. Example line of output: metadata::evince::n-copies: 5

  • Editing: gvfs-set-attribute /path/to/file metadata::evince::n-copies 1

  • Removing: gvfs-set-attribute /path/to/file -t unset metadata::evince::n-copies (credits to Christophe Drevet-Droguet for this one!)

Paths can be relative to the current dir.

L. Levrel

Posted 2011-10-13T22:40:06.577

Reputation: 336

1

To reset all evince settings for a document: see http://askubuntu.com/a/819597/88086

– Christophe Drevet-Droguet – 2016-09-01T13:13:55.653

@ChristopheDrevet-Droguet Thanks! Answer edited. – L. Levrel – 2016-09-01T20:03:06.927

8

Things have changed since the previous answer was given (October 2011). The window settings of Evince are now being stored in binary, in the directory ~/.local/share/gvfs-metadata/.

Norbert

Posted 2011-10-13T22:40:06.577

Reputation: 89

These seem to be binary files. Any way of figuring out what the settings actually are? – Faheem Mitha – 2014-10-02T23:33:16.010

1@Faheem, see the new answer that was just posted. – Arjan – 2015-12-23T17:22:10.863

4

The per document settings are stored in the file ~/.gnome2/evince/ev-metadata.xml.

lesmana

Posted 2011-10-13T22:40:06.577

Reputation: 14 930