How to install Green pdf viewer on Ubuntu 16.04

Introduction

Green is one of the best pdf reader available for framebuffer environment, without even having X Window. Even though that is not maintained anymore, it is still way better than fbi. Simply because of two facts:

  1. It is super fast
  2. It has a small memory footprint

The above reasons should be sufficient enough to encourage any framebuffer/tty lover to give a try to Green.

Installation

Since Green is not maintained anymore, no official package is available for it. Hence, you need to compile and build it by yourself. Don’t be scared the process is fairly easy and fun.

Let’s get started.

The first thing is to clone the repository from Github like this:

$ git clone https://github.com/schandinat/green.git

Prior jumping to the compilation process, need to ensure a couple of dependencies are installed, otherwise, the process fails. To do so, run the below command to install necessary dependencies:


$ sudo apt install libpoppler-glib-dev libsdl1.2-dev

Then need to compile the code.


$ make

If everything goes smoothly, the last step is to install Green on the machine by running:


$ sudo make install

Now you should be able to fire up Green via command line in tty or framebuffer environment even without X installed.

When opening Green, it is highly possible that you will encounter with the following error:


SDL_Init failed: Unable to open a console terminal

To get rid of the error you either run Green with sudo or add GPM and its configuration which is a more elegant way.

For the latter, I highly recommend you to follow the instruction provided by gotbletu in below video:

Leave a Reply

Your email address will not be published. Required fields are marked *