0

For some reason I can't open this pdf file with gnome-open command.

cd /media/c-drive/Users/Tommy/Desktop/JobEssays/
gnome-open "./My\ Resume.pdf"

I get this error.

Error showing url: Error when getting information for file '/media/c-drive/Users/Tommy/Desktop/JobEssays/My\ Resume.pdf': No such file or directory

My default document viewer is "Document Viewer"

Edit: I get "Unable to init server: Could not connect: Connection refused Cannot parse arguments: Cannot open display: " when removing the quotes or backslash from gnome-open.

0

You have to either remove the quotes or remove the backslash. You can use either/or but not both when specifying a file.

When you use the quotes you are telling the system, in this case, that the backslash is part of the file name. If you didn't use quote, the backslash would function as an escape character that would prevent the space in the filename from being separated as multiple words.

  • I get "Unable to init server: Could not connect: Connection refused Cannot parse arguments: Cannot open display: " when removing the quotes or backslash. – Tommy Saechao Sep 15 '16 at 6:02
  • @TommySaechao What command did you use to connect to the computer. Most likely you used, ssh. Try logging to the computer using ssh -X. – L. D. James Sep 15 '16 at 6:21
  • I am directly running Ubuntu through an installation onto my hard drive. – Tommy Saechao Sep 15 '16 at 19:39
  • @TommySaechao gnome-open is a tool to call on the system's X default program to open a source. In this case your source is a pdf. If your X environment is working, you can just open up the directory from Nautilus and double click on the file. You can also try a different cli for the file... what do you get when you use xdg-open instead of gnome-open? – L. D. James Sep 15 '16 at 20:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.