-
-
Notifications
You must be signed in to change notification settings - Fork 89
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 viewer MIME/DE/xdg-open defaults are ignored #3313
Comments
Thanks for the suggestion, I think you are right in that the current default is Evince if it is installed. We could have an entry like 'system default' which is selected by default if it is a supported PDF viewer. However, I don't know of a good way to check if Also I just want to check if you aware of run configuration templates: https://hannah-sten.github.io/TeXiFy-IDEA/running-a-latex-file.html#template-run-configurations |
Thank you for teaching me about run configuration templates. I just found out that there are both per-project and global versions. I remembered the command to find what $ xdg-mime query default application/pdf
okularApplication_pdf.desktop
$ # After changing the file association:
$ xdg-mime query default application/pdf
org.gnome.Evince.desktop This is part of the |
Thanks a lot! That command works for me as well, that should be easy enough to implement, indeed simple string matching should be sufficient. If it gives output then we can take the system default as default pdf viewer in the run configuration template. I just remembered why it is not a good idea to use xdg-open by default: for forward search we need custom things, e.g. for Evince you need to communicate via the dbus. |
Type of JetBrains IDE (IntelliJ, PyCharm, etc.) and version
IntelliJ IDEA 2023.2.2 (Ultimate Edition)
Build #IU-232.9921.47, built on September 12, 2023
Operating System
Ubuntu 23.10
TeXiFy IDEA version
0.9.1
What I did (steps to reproduce)
Minimal example to reproduce the problem
Expected behavior
It should open Okular without me having to reconfigure it in the Run Configuration because it should autodetect my settings. If you want to parse the desktop environment, there is the
XDG_CURRENT_DESKTOP=KDE
environment variable. More generally, I have Okular at the top of my file associations, which is respected byxdg-open
and part (the removed association of Evince) of it is stored at$XDG_CONFIG_DIRECTORY/mimeapps.list
. Please detect the config in either place so people on both DEs will be happy.Actual behavior
Evince is set to the default. Unlike Firefox, where removing the MIME association for zips causes it to use the KDE version, not even that works for TeXiFy. The only way to fix this is to change the Run Configuration. Uninstalling Evince could also work but I do not want to.
(if applicable) The full stacktrace of the exception thrown
No exception was thrown.
The text was updated successfully, but these errors were encountered: