okular opens dvi instaed of pdf

Hi,

one question on the behavior of okular. From a LaTeX-process, along with dvips and ps2pdf, I obtain the files foo.dvi and foo.pdf. Opening the latter with

okular foo.pdf

opens the dvi-file. If I delete the dvi, the shown command opens foo.pdf, but this is certainly not the way to handle things permanently.

How can I convince okular to open foo.pdf, as long as foo.dvi lives in the same folder?

Regards,
Konstantin

You could try Configure Desktop>Advanced>File Associations and remove the association between Okular and dvi files, possibly by replacing it with xdvi.

I think the name displayed in the okular titlebar is misleading you. It actually shows the filename that the PDF file is derived from.

I just tried it with a PDF file that I generate from DVI via Postscript and it also displayed something.dvi. However even when I delete something.dvi it still displayed this titlebar. So I conclude that it is displaying one of the PDF file properties.

Look at the properties of the PDF file with:

pdftk <yourfile>.pdf dump_data output -

and it will become obvious. Naturally substitute your filename for <yourfile>.

Thanks,

that solved the problem, aka resolved my confusion. Okular was opening everything correctly, just the title of the pdf was misleadingly “foo.dvi” – which is of course my fault, or the one of my ps2pdf process.

Thanks,
Konstantin