How to open a pdf file from the shell?

Asked by Federico

Hi everybody,

Please, I need your help to understand how to open a *.pdf file from the shell. I have tried with Xpdf( $ xpdf) or Ghostscript, ($ gv) but the error message is near always the same: " Unable to open the display " or " Can't open the display " ; nothing more. I really don't know what to do!

Thanks a lot for your helpfulness!

Greetings!

Federico

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu yelp Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
George Standish (george-standish-deactivatedaccount) said :
#1

The reason Xpdf and Ghostscript are giving you the error message "Unable to open the display" is because these are NOT console/terminal programs, they require X in order to run.

I don't believe you're going to be able to display PDFs on the console in the same manner you would inside X.

If you are just looking to see the text inside the PDFs have a look at this link (I've personally never tried popplerutils), which converts the PDF to TXT - which could be show on the console.

http://shibuvarkala.blogspot.com/2008/11/howto-convert-pdf-to-txt-in-ubuntu.html

Best of luck,
George

Can you help with this problem?

Provide an answer of your own, or ask Federico for more information if necessary.

To post a message you must log in.