-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Respect localization for main directory (e.g., ~/Dokkumente
)
#8010
Comments
As the error mesage says you need to check the main file directory in the preferences. It has to be a valid absolute path |
I solved it by export my reference and set the reference as default and then put the old reference into it. It works, that's so strange. |
Facing the same issue on version 5.8. I tried uninstalling and installing it, but nothing worked. In Preference -> File, there is no option to set the Main file directory. @Siedlerchr could you please mention where to set the main file directory in the preference? |
@kvnptl Hi, the setting for the main file directory is now under Linked Files |
Thanks. It was pointing to |
I think this should stay open, the error message is misleading. |
It seems like the issue here is that the native default fallback directory is invalid inside a snap |
This is the path I got by default "/home/houssem/snap/jabref/2265/Documents". The problem here is that "Documents" folder doesn't exist under "2265". Environnementsnap 2.58.2 |
Yes, this is correct. The home dir is set via this property. And the directory is coming from here:
So I think we need to check if the path contains "snap" and then either create the subdirectory (don't know if possible) or just return "home" or set it to another env var: https://snapcraft.io/docs/environment-variables Can you attach files outside the snap directory? |
I just skimmed over this issue, and I believe that there is another issue in regards to this error. I believe that there is an issue in regards to non-english XDG directories. On my machine the default "Documents" folder is called I won't exclude the possibility of my setup being broken, but to me it seems like JabRef does not honor XDG Directories? I am using Jabref 5.9. |
It is because, we hard-coded "Documents" at Linux.java
This code was introduced in #9222. Does your XDG environment have the environement variable I tried to craft a fix at #9835 Can you try the portable edition from https://github.com/JabRef/jabref/actions/runs/4866174963? (I could not upload it to builds.jabref.org - hope the link above works) |
Thanks @dermalikmann for your issue report. I use arch linux on my laptop too and i was able to reproduce the problem. This was in my case the same issue #8010 (comment) had. Would you be so kind to check three things to triangulate the issue a bit better: |
The hardcoded variant is just the fallback option, if no XDG_DOCUMENTS_DIR can be found.
So this could be a bigger problem with resolving enviroment variables. |
We need to be aware that in snaps this can look different or at least the vars are mapped to internal dirs |
Sorry for the delayed response @calixtus in regards to the ENV:
it seems that the user-dirs dont get sourced by my default env. AFAIK, this usually should happen through /etc/profile(.d/), but it seems that it in fact does not. @calixtus if you are running arch too, could you check if you have any script in there that access the user dirs conf? \ @koppor I have problems clean up my JabRef configuration 🤔 I deleted ~/.local/share/JabRef and ~/.local/share/jabref, bun when i run the portable version, it still loads my configuration. Am i missing something? |
@HoussemNasri I think, the title changed wrong to "Refer to the Documents directory by Environnement variable e.g., XDG_DOCUMENTS_DIR instead of hardcoding it", because this is the way it is currently implemented:
See also #9835 (comment) 😅 The issue is that this variable is sometimes empty. We are investigating why this could be the case. Moreover, we should check on non-English macOS if everything works. Not sure if we will manage that... |
Checked /etc/profile.d but did not find something. The preferences are usually stored here: ~/.java/.userPrefs/org/jabref. So for a 'fresh' install you need to remove that directory. |
@koppor Hmm I see, feel free to change it to something more precise. |
~/Dokkumente
)
Interestingly, the XDG_DOCUMENTS_DIR does also not show up when i look it up in my env vars, only by calling |
The longer I think about it, I realize calling calling Silly us for looking in the system environment vars for that XDG_DOCUMENT_DIR... |
Thx for the info with ~/.java/.userPrefs |
@dermalikmann Please try the build at https://builds.jabref.org/pull/9837/merge/. JabRef should also display the path at "Help -> View Event Log" |
JabRef version
5.3 (latest release)
Operating system
GNU / Linux
Details on version and operating system
ArchLinux linux-lts
Checked with the latest development build
Steps to reproduce the behaviour
1. Open the `preference2. change any option3. bug shows4.See #8010 (comment)
Appendix
...
Log File
``` Paste an excerpt of your log file here ```The text was updated successfully, but these errors were encountered: