Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Chrome can view PDF file, so I decide to make it as my default PDF viewer. However, I do not know how to open PDF file in chrome via my terminal emulator.

I have tried a command google-chrome example.pdf, but it failed while the address is not file:///path/to/example.pdf/ but http://example.pdf/.

My English is not good, so you can edit the question if necessary.

Thank you!

Updated: Sorry for I did not mention that the solution must be effective for GNU/Linux.

share|improve this question
Did you try "google-chrome file:///path/to/example.pdf"? – Jan Doggen Aug 22 '13 at 8:00
@JanDoggen It works, but it is too boring while I can not press tab to complete it quickly. Is there any better method? – acgtyrant Aug 22 '13 at 9:19
Works for me. What Chrome version are you running? Try google-chrome ./example.pdf, perhaps — example.pdf looks like a domain name but as soon as you add a / it looks like a file name. – Gilles Aug 22 '13 at 9:39
@acgtyrant I don't know Linux, but can't you make script saying "google-chrome file:///path/to/%1.pdf" (like a Windows batch file) ? – Jan Doggen Aug 22 '13 at 9:51
@Gilles google-chrome ./example.pdf still turns in to http://./texlive-zh-cn.pdf. @JanDoggen No, I do not have any idea:) – acgtyrant Aug 22 '13 at 10:34

Right click on pdf file and change opens with application to chrome and apply the changes. For more information see this link Also using command line it can be done.Just use below command line

<path to chrome.exe> <path to pdf file>
share|improve this answer
Sorry for I did not mention that the background is for Linux, however thanks anyway. – acgtyrant Aug 22 '13 at 9:26

You must log in to answer this question.

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