3

I'm using this command: gnome-open file_name.xxx(xxx file extension) command but it's not working. I'm using Ubuntu 14.04.

kos
  • 41,268
alhelal
  • 2,741

1 Answers1

7

You could either try xdg-open (xdg-open - opens a file or URL in the user's preferred application):

xdg-open /path/to/file.pdf

Or you directly launch Evince, the default Ubuntu document viewer, and open the file with it:

evince /path/to/file.pdf

Note that you must always quote path names with special characters like spaces or colons - or escape each of those characters using a backslash:

xdg-open '/path/with:some/special characters/strange filename.pdf'
xdg-open "/path/with:some/special characters/strange filename.pdf"
xdg-open /path/with\:some/special\ characters/strange\ filename.pdf'

evince '/path/with:some/special characters/strange filename.pdf'
evince "/path/with:some/special characters/strange filename.pdf"
evince /path/with\:some/special\ characters/strange\ filename.pdf'

You may chose the variant you prefer.

Byte Commander
  • 110,243