4

I use my laptop with external screens whose resolution and position differ depending on whether I am at work or at home. Most Xorg applications cope with this quite well. Evince however does not, and frequently opens with a window size that exceeds by far the screen on which it displays.

I am not sure whether this is a specificity of evince or of all windows with what I think is a gnome "header bar" (which includes part of the GUI of application) rather than a traditional titlebar.

Note that I'm running XFCE 4.16.

My questions are:

  • is this a bug, and if so, is it a gnome, xfce or evince bug?
  • are there tweaks to make sure evince doesn't open in a larger-than-screen size?

[EDIT] Testing a few things empirically, it seems that evince keeps window location and size for each pdf file separately.

Following @meuh's comments, I tested gsettings queries and settings:

  • It doesn't list a size in pixels, relevant ones are fullscreen, window-ratio, and sizing-mode options which has value free.
  • Setting fullscreen to true, evince does open fullscreen (not maximised, real F11 fullscreen) for pdf files which (seemingly) have never been opened with evince, but keeps last size and position for those which have.

So my updated question is whether it is possible to override this memory of position and size, globally or conditionally.

Joce
  • 1,092

1 Answers1

1

I managed to solve this problem using devilspie2. In my case, I created the following configuration file ~/.config/devilspie2/myconfig.lua:

if get_application_name() == "Document Viewer" then
    maximize();
end

Where "Document Viewer" is the name of the evince window on my system. This name may change depending on your system (start devilspie in debug mode to get the correct name).

After that, just configure devilspie2 to start with your session and evince should automatically work as you expect.

Devilspie2 tutorial: https://www.linux-magazine.com/Issues/2017/205/Tutorial-Devilspie2