It seems that lyx relies on a hardcoded list of viewers and, then, once okular is installed, it's opened instead of the default viewer in my setup (evince).
I think it's because of this hardcoded values:
lib/configure.py: checkViewer('a PDF previewer', ['pdfview', 'kpdf', 'okular', 'qpdfview --unique', 'evince', 'kghostview', 'xpdf', 'SumatraPDF', 'acrobat', 'acroread', 'mupdf', \
Maybe it could RDEPEND on xdg-utils and run "xdg-open" as a first option in that list to solve this
> It seems that lyx relies on a hardcoded list of viewers
I just quickly checked what happens if I run default xdg-open on my system and got gimp for opening postscript (gv is ready on my system) and fbreader for html (firefox is ready on my system).
Not saying it is xdg-open mistake, it's often using configs set up by default elsewhere, but the above does not speak strong for replacing the current lyx list of viewers, at least here.
Umm, xdg-open works fine on my case (and it's also the "official" way of opening the default app under desktops honoring XDG specs...) opening the pdf viewer I have set at as default. What desktop are you running? Did you set a default viewer for PDFs?
> What desktop are you running?
I don't know if enlightenment provides any app to configure the default apps... from commandline you should be able to run something like:
xdg-mime default evince.desktop application/pdf
(or the app you want to use by default from all the apps blaming to support pdf)