14

Let me preface this by saying I'm new to Linux, but I'm willing to try anything you wizards can conjure up (preferably a keyboard shortcut though)!

When I use Evince 3.10.3 in full screen mode I'm greeted with this nice-looking, but semi-annoying toolbar that takes up some of my screen real estate at the top...:

That Beautiful Toolbar That's Getting in My Way...

In the Evince documentation I see that the section on the Toolbar says to Show, hide, or edit the toolbar; when I go to the page all I see is a layout of the corresponding functions of the toolbar, but no information is given as to how I can hide the toolbar:

Okay, This Looks Good! Wait, Where's The Tip & Trick?!

How do I hide the toolbar in Evince version 3.10.3, or a version that includes this similar setup with the toolbar?

P.S. Sometimes the toolbar magically fades away. I just want a way to invoke this behavior on demand. Thanks!

5
  • have you tried F5 , which is presentation mode ? there's no toolbar there Commented Feb 18, 2015 at 21:19
  • 2
    I have tried F5, which does remove the toolbar, but unfortunately zooming is disabled in presentation mode as well. I want to be able to zoom to page-width.
    – cody.codes
    Commented Feb 18, 2015 at 21:28
  • there is similar post asked in earlier release as well, except without any workaround.
    – user37165
    Commented Jul 30, 2015 at 8:55
  • 1
    The toolbar 'magically fades away' when the mouse is not near it. As you are using Gnome you can use the Pixel Saver or Maximus two extensions to hide the titlebars of most apps, like Chrome does (sort of). Also, what theme are you using :)
    – Wilf
    Commented Nov 22, 2015 at 19:59
  • Atril Document viewer is essentially Eveince withouth gnome and pressing "T" the toolbar goes away Commented Sep 2, 2023 at 20:15

8 Answers 8

5

The short answer is, you can't.

Evince 3.4.0 (on 12.04) had the option to hide the toolbar from the menu View > Toolbar then select Fullscreen from the menu or via F11 key will hide the toolbar in fullscreen mode.

Apparently, this feature has been removed from newer version of Evince and it has been reported as bug on launchpad and in mailing list as well.

Perhaps this might be fixed with newer version, but who knows.

Immediate workarounds would be either:

  • using window manager as suggested by @zarnaik
  • use other PDF viewer such as MuPDF, etc.

I have used MuPDF on Xubuntu 14.04, and it seems to achieve what you want: no toolbar and able to zoom to any width, while viewing in fullscreen.

3

I came across the exact same problem you did. I have not been able to sucessfully hide the toolbar, though I have come up with a way to emulate the behaviour.

I simply maximise the evince window. Then using keyboard shortcuts Alt + Space to open up the window context menu.

resize

Follow this by z to select resiz̲e in the menu (in English, may differ depending on language used). Once in resize-mode you should be able to use the arrow key Up to enlarge the window. You simply elongate it until both menu and toolbar are "outside" of the screen.

Alternatively, you simply drag down the window a little and lengthen it as needed. then drag it back up.

It may be possible that evince appears under any dock or task bar you have running, this can be fixed by setting the window layer to always on top.

always on top

I am not familiar with the dock/task bar you use, so results may vary. Let me know if it works out for you. (I use openbox with tint2 dock)

1
  • 1
    Very nice work around Commented Sep 28, 2017 at 15:28
2

Hiding the toolbar is not possible in evince either in Ubuntu 14.04 or 16.04, nor in upstream/vanilla evince (unmodified by Ubuntu), though if you're desperate, you can patch the source and recompile.

In vanilla evince, in full-screen mode, the toolbar autohides, which is somewhat helpful, if not entirely sufficient (semi-intelligent behaviour never does exactly what you desire, plus it would be very convenient to be able to hide the toolbar not in full-screen mode as well — arguably that is when the screen-space savings are particularly important).

Unfortunately, for evince as packaged in Ubuntu (14.04 and 16.04), even that is not possible. It seems that the (otherwise very useful) Ubuntu-specific patches returning a normal menu-bar and normal location of the toolbar, break the auto-hiding behaviour, exacerbating the problem.

Bug reports

The relevant bugs (ubuntu-specific and upstream) are here:

https://bugs.launchpad.net/ubuntu/+source/evince/+bug/1522527

https://bugs.launchpad.net/ubuntu/+source/evince/+bug/1409291

https://bugzilla.gnome.org/show_bug.cgi?id=714996

Patches

Working patches were provided (by Reinis Danne) in the GNOME bug report, but they were not accepted. Direct links for 3.12, the contemporary master branch and 3.14.

Luckily, these patches can still be manually applied (copy-pasting the code) to evince 3.18, as found in Ubuntu 16.04. Applying them directly with patch appears not to work, probably due to slight changes in the surrounding code.

To get the source:

apt-get source evince
cd evince-3.18.2/

If this doesn't work, uncomment the deb-src lines in /etc/apt/sources.list.

Apply the following patch (adapted from the ones provided by Reinis Danne, linked above and provided here for completeness):

--- a/shell/ev-application.c    2018-01-02 23:00:00.502095551 +0100
+++ b/shell/ev-application.c    2018-01-03 23:15:00.713553169 +0100
@@ -1059,9 +1059,24 @@
 }

 static void
+app_toggle_toolbar_cb (GSimpleAction *action,
+                       GVariant      *parameter,
+                       gpointer       user_data)
+{
+        EvApplication *application = user_data;
+        EvWindow      *window      = EV_WINDOW (gtk_application_get_active_window (GTK_APPLICATION (application)));
+        GActionMap    *action_map  = G_ACTION_MAP (window);
+        GAction       *gaction     = g_action_map_lookup_action (action_map, "toggle-toolbar");
+
+        g_action_activate (gaction, NULL);
+}
+
+
+static void
 ev_application_startup (GApplication *gapplication)
 {
         const GActionEntry app_menu_actions[] = {
+       { "toggle-toolbar", app_toggle_toolbar_cb, NULL, NULL, NULL },
        { "new",  app_new_cb, NULL, NULL, NULL },
                 { "help", app_help_cb, NULL, NULL, NULL },
                 { "about", app_about_cb, NULL, NULL, NULL }
@@ -1095,6 +1110,7 @@
           "win.caret-navigation",       "F7", NULL,
           "win.zoom-in",                "plus", "<Ctrl>plus", "KP_Add", "<Ctrl>KP_Add", "equal", "<Ctrl>equal", NULL,
           "win.zoom-out",               "minus", "<Ctrl>minus", "KP_Subtract", "<Ctrl>KP_Subtract", NULL,
+          "win.toggle-toolbar",         "<Ctrl>H", NULL,
           "win.show-side-pane",         "F9", NULL,
           "win.fullscreen",             "F11", NULL,
           "win.presentation",           "F5", NULL,
--- a/shell/ev-window.c 2018-01-02 23:00:00.502095551 +0100
+++ b/shell/ev-window.c 2018-01-02 23:14:36.995706943 +0100
@@ -4907,6 +4907,27 @@
 }

 static void
+ev_window_view_cmd_toggle_toolbar (GSimpleAction *action,
+                                   GVariant      *state,
+                                   gpointer       user_data)
+{
+        EvWindow        *ev_window = user_data;
+        EvWindowPrivate *priv      = ev_window->priv;
+
+        gboolean toolbar;
+        gboolean presentation;
+
+        presentation = EV_WINDOW_IS_PRESENTATION (ev_window);
+
+        toolbar = ((priv->chrome & EV_CHROME_TOOLBAR) != 0  ||
+                   (priv->chrome & EV_CHROME_RAISE_TOOLBAR) != 0) && !presentation;
+
+        update_chrome_flag (ev_window, EV_CHROME_TOOLBAR, !toolbar);
+
+        set_widget_visibility (priv->toolbar, !toolbar);
+}
+
+static void
 ev_window_view_cmd_toggle_sidebar (GSimpleAction *action,
                   GVariant      *state,
                   gpointer       user_data)
@@ -5697,6 +5718,7 @@
    { "continuous", NULL, NULL, "true", ev_window_cmd_continuous },
    { "dual-page", NULL, NULL, "false", ev_window_cmd_dual },
    { "dual-odd-left", NULL, NULL, "false", ev_window_cmd_dual_odd_pages_left },
+   { "toggle-toolbar", NULL, NULL, "true", ev_window_view_cmd_toggle_toolbar },
    { "show-side-pane", NULL, NULL, "false", ev_window_view_cmd_toggle_sidebar },
    { "inverted-colors", NULL, NULL, "false", ev_window_cmd_view_inverted_colors },
    { "fullscreen", NULL, NULL, "false", ev_window_cmd_view_fullscreen },
--- a/shell/evince-menus.ui 2018-01-02 23:00:00.502095551 +0100
+++ b/shell/evince-menus.ui 2018-01-03 23:16:02.969635772 +0100
@@ -21,6 +21,12 @@
   <menu id="appmenu">
     <section>
       <item>
+        <attribute name="label" translatable="yes">_Toggle toolbar</attribute>
+        <attribute name="action">app.toggle-toolbar</attribute>
+        <attribute name="accel">&lt;Primary&gt;H</attribute>
+      </item>
+    </section>    <section>
+      <item>
         <attribute name="label" translatable="yes">_New Window</attribute>
         <attribute name="action">app.new</attribute>
       </item>
@@ -41,6 +47,10 @@
   <menu id="view-menu">
     <section>
       <item>
+        <attribute name="label" translatable="yes">_Toolbar</attribute>
+   <attribute name="action">win.toggle-toolbar</attribute>
+      </item>
+      <item>
         <attribute name="label" translatable="yes">_Continuous</attribute>
         <attribute name="action">win.continuous</attribute>
       </item>

with patch -p1 < name_of_patch_file.patch or using quilt (and ideally read the patch before/after applying it — it's actually quite comprehensible, especially in context).

Finally, compile evince with the standard ./configure; make; sudo make install to install the patched evince to /usr/local/. To install elsewhere, for example to avoid having to use sudo, use ./configure --prefix=/full/path/to/alternative/location/.

The patched evince will have the option of hiding the toolbar with Ctrl+h. The menu-bar will not be hidden, which may or may not be what you want.

Hiding the menu-bar

In addition to the above patch, you would need to add:

gtk_application_window_set_show_menubar (GTK_APPLICATION_WINDOW (ev_window), !toolbar);

to the end of the definition of ev_window_view_cmd_toggle_toolbar in shell/ev-window.c and change:

gtk_application_window_set_show_menubar (GTK_APPLICATION_WINDOW (window), !presentation);

to:

gtk_application_window_set_show_menubar (GTK_APPLICATION_WINDOW (window), !presentation && toolbar);

in the definition of update_chrome_visibility, also in shell/ev-window.c.

Security

I'd also recommend adding a /etc/apparmor.d/usr.local.bin.evince apparmor profile based on usr.bin.evince and subscribing to the Ubuntu security notices, since you won't be receiving security fixes to your version of evince. Alternatively, you might consider using something like apt-src.

2
  • For ease of application, both full patches are here: gist.github.com/aplaice/5b2b75c410ee32ad57335466713b75e8
    – aplaice
    Commented Jan 4, 2018 at 23:11
  • For later versions of Evince, it seems that Reinis Danne (the original author of the patch described in this answer) has a soft fork of Evince allowing toggling of toolbars here, but I haven't tested it yet.
    – aplaice
    Commented Dec 29, 2020 at 14:48
2

If you come here in 2023, I maintain patches for evince with the functionality of hiding the menu bar (toolbar) with a keyboard shortcut and many more. (https://github.com/fabian-thomas/evince-patches)

1

I am using maximus without title bar everywhere.

I solved zoom issue with magnifier in accessibility option. Shortcut: Alt+Scroll

1

The default Document Viewer application (evince) in Ubuntu has true full screen mode. From the Evince toolbar select View -> Presentation. In presentation mode there is no visually distracting toolbar or scrollbar on the screen. It looks like viewing an image in full screen mode, perfect for viewing the .pdf digital booklets that are sometimes bundled with albums that can be downloaded from iTunes or 7digital.

To exit from presentation mode press either the Esc key or F11.

2
  • 2
    But the problem is you can have full width in presentation mode. The characters look so small
    – Ashok Koyi
    Commented Jul 18, 2018 at 7:27
  • Presentation mode looks nice for viewing the digital booklets that come with albums downloaded from iTunes or 7digital.
    – karel
    Commented Jul 18, 2018 at 8:15
0

With Evince in Ubuntu 22.04.1 LTS in February 2023, I use

  • F5 to enter into full screen mode without a toolbar and
  • Esc to exit from full screen mode into window mode.

If I remember correctly, these hotkeys have worked for several years in the Evince versions via apt (and the main repository) of Ubuntu Desktop and the Ubuntu community flavours.

-1

It's easy to get your thinking locked up to search for "a PDF reader" forgetting that you are most likely have a browser, and browsers like Chrome and Firefox have rather good PDF reading abilities(select cut,copy/past, bookmarking, scrolling continuously ... in contrast to MuPDF who is useful to just display a PDF as image and still broke it on scrolling) in addition to what you want that is a clear full screen without any distractions. As a bonus you can use browser features such as selecting/right click then search google for ... Try it.

You must log in to answer this question.

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