How to open a pdf file from the shell?

Asked by Federico on 2010-03-25

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!



Question information

English Edit question
Ubuntu yelp Edit question
No assignee Edit question
Last query:
Last reply:

This question was reopened

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.

Best of luck,

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.