I am using the ranger terminal based file manager to navigate and view files.
When I navigate to a folder which contains pdf files, and position the cursor on a PDF file ranger reads the file and then displays it in its preview pane .
My understanding is that the ranger program delegates to "rifle" the tasks of
- recognising what type of file it is – in this case PDF
- launching a program which handles that filetype
- instructing the program to load the file currently under the cursor
I now want to open the file being previewed in the text based program that is rendering the preview in the above image. However when I press l to launch ranger/rifle uses "evince", a GUI program.
Looking in
file: ~/.config/ranger/rifle.conf
#-------------------------------------------
# Documents
#-------------------------------------------
ext pdf, has llpp, X, flag f = llpp "$@"
ext pdf, has zathura, X, flag f = zathura -- "$@"
ext pdf, has mupdf, X, flag f = mupdf -- "$@"
ext pdf, has apvlv, X, flag f = apvlv -- "$@"
ext pdf, has xpdf, X, flag f = xpdf -- "$@"
ext pdf, has evince, X, flag f = evince -- "$@"
ext pdf, has atril, X, flag f = atril -- "$@"
ext pdf, has okular, X, flag f = okular -- "$@"
ext pdf, has epdfview, X, flag f = epdfview -- "$@"
ext pdf, has qpdfview, X, flag f = qpdfview "$@"
This configuration indicates that evince
will be used when a file is "opened" but what program is being used to generate the preview?
- I am using Ubuntu 16.04
Best Answer
According to the webpage, it uses
pdftotext
for pdf previews. (You could read the source code to be certain).