Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PDF not opening in standard application #12356

Open
2 tasks done
lionfood opened this issue Jan 6, 2025 · 3 comments
Open
2 tasks done

PDF not opening in standard application #12356

lionfood opened this issue Jan 6, 2025 · 3 comments

Comments

@lionfood
Copy link

lionfood commented Jan 6, 2025

JabRef version

6.0-alpha

Operating system

GNU / Linux

Details on version and operating system

JabRef 6.0--2024-12-16--a3b2efb / openSUSE Leap 15.6

Checked with the latest development build (copy version output from About dialog)

  • I made a backup of my libraries before testing the latest development version.
  • I have tested the latest development version and the problem persists

Steps to reproduce the behaviour

  1. Add a PDF file to an entry
  2. Open this file while using the standard settings for the application/pdf file type (see Screenshot below)
  3. The PDF now opens in LibreOffice, while the standard PDF viewer on my system is Okular (see Screenshot below)

Even when i try to set the application manually this is being ignored and the PDF still opens in LibreOffice. Also the manual setting is gone after closing the settings dialog (without any error). But that might be a different issue...

Appendix

Screenshot of JabRef Settings

Image

Screenshot of Standard Applications Settings

Image

@lionfood
Copy link
Author

lionfood commented Jan 8, 2025

The cause seems to be a wrong interpretation of the list of applications that are assigned to open files of type application/pdf (for other file types i don't have any experience). When having three applications that can open a PDF (in this order: Okular, LibreOffice, GIMP) JabRef opens an PDF with the last list entry (here: GIMP) instead of using the first (here: Okular).

@Siedlerchr
Copy link
Member

By default Jabref tries with specified application in the settings, then java.awt Desktop openFile and if not working it tries with xdg-open

Desktop.getDesktop().open(file);

@lionfood
Copy link
Author

lionfood commented Jan 8, 2025

By default Jabref tries with specified application in the settings, then java.awt Desktop openFile and if not working it tries with xdg-open

jabref/src/main/java/org/jabref/gui/desktop/os/Linux.java

Line 43 in 5f3fbbc
Desktop.getDesktop().open(file);

Hmm, OK... Then this seems to be an error in Java itself, because JabRef is logging, that it opens the file in the standard application with Desktop integration (the case of the "native Java code")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants