Hi, each time y try to open a pdf file, the file gets opened but only a grey window appears. The only way I have found to open them is by running a pdf viewer first and opening the file through it.
Is there any way to make the file opening automatically with the right (pdf reader) program?
This happens automatically for other software but not for pdf files.
There is a xdg-mime command that can be used to associate files with applications.
Have you tried using Firefox to open your PDF? Pressing ctrl-o while Firefox has focus should bring up the Open File dialog box.
It depends which desktop or file manager you are on. Try ‘right click’ ‘open with’ and / or ‘set default application’
Gregory’s idea of using Firefox is a good one - I use it for PDFs as it works well and I don’t have to use an additional program.
I do use evince, but for more comfortable reading I also use Firefox since there’s a way to display white pages (eye burners) as sepia.
I can feel that we’re slowly sliding away from the original problem.
Which pdf viewer are You opening, and is it the same one that displays a gray window if invoked by double-clicking the file?
Which PDF viewer are you using? Are all the PDF’s from the same source? There are lots of non-compliant PDF files. Sometimes I have to try several viewers to find one that lets me view a PDF. In addition to Firefox, Fedora has a package for mupdf
.
Initially I didn’t think to use firefox but of course that is one option. However sometimes it is preferable to decouple pdfs from the browser and also acrobat reader (for example) allows many more editing options. I managed to install the acrobat reader, but I can’t still open the document by just double clicking on it.
I may have to use the xdg-mime command
Not sure how to find the ‘set default application’ option, I am using the xfce desktop
I don’t know if the pdf viewer that activates when I double-click is the same as the one sometime I invoke to open a pdf document…how can I know that? I can only see a gray square
You have a couple of options to set the default.
-
Gregory recommended you use xdg-mime which is a command line way to configure ‘open with’.
-
I recommended that in your file browser (I use Thunar) that you click the ‘right’ mouse button on the file you want to open and a menu should come up with ‘open with’ as an option.
Try my way (2) first as it is easier, and then if you need help with xdg-mime maybe someone can tell you the exact command if you tell us what PDF reader you want to use.
Menu->Settings->Default Applications->Others
Which ‘Menu’ are you referring to? The one that appears when right-clicking on the desktop’s background? because in that menu I can’t find no Settings->Default Applications submenu
The xfce desktop has a menu on the menubar to the far left. In the default configuration it is the upper left corner.