jabref icon indicating copy to clipboard operation
jabref copied to clipboard

JabRef (Portable/tar.gz) not opening in sway/swaywm/wayland; Debian 12

Open alaminkouser opened this issue 2 years ago β€’ 19 comments

JabRef version

5.15 (latest release)

Operating system

GNU / Linux

Details on version and operating system

No response

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

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

Steps to reproduce the behaviour

  1. Download the tar.gz file/Linux Portable
  2. Extract with tar xf <downloaded_file>
  3. run "./bin/JabRef"
  4. OR run "./lib/runtime/bin/JabRef"
  5. JabRef not opening

Appendix

...

Log File: 5.15 stable
aak@debian:~/Downloads/JabRef$ ./bin/JabRef
Messages are not initialized before accessing key: Display help on command line options
2024-07-13 14:39:47 [main] org.jabref.Launcher.main()
ERROR: Unexpected exception: java.lang.UnsupportedOperationException: Unable to open DISPLAY
        at [email protected]/com.sun.glass.ui.gtk.GtkApplication.lambda$new$5(Unknown Source)
        at java.base/java.security.AccessController.doPrivileged(Unknown Source)
        at [email protected]/com.sun.glass.ui.gtk.GtkApplication.<init>(Unknown Source)
        at [email protected]/com.sun.glass.ui.gtk.GtkPlatformFactory.createApplication(Unknown Source)
        at [email protected]/com.sun.glass.ui.Application.run(Unknown Source)
        at [email protected]/com.sun.javafx.tk.quantum.QuantumToolkit.startup(Unknown Source)
        at [email protected]/com.sun.javafx.application.PlatformImpl.startup(Unknown Source)
        at [email protected]/com.sun.javafx.application.PlatformImpl.startup(Unknown Source)
        at [email protected]/com.sun.javafx.application.LauncherImpl.startToolkit(Unknown Source)
        at [email protected]/com.sun.javafx.application.LauncherImpl.launchApplication1(Unknown Source)
        at [email protected]/com.sun.javafx.application.LauncherImpl.lambda$launchApplication$2(Unknown Source)
        at java.base/java.lang.Thread.run(Unknown Source)
^Caak@debian:~/Downloads/JabRef$ ./lib/runtime/bin/JabRef
Messages are not initialized before accessing key: Display help on command line options
2024-07-13 14:40:20 [main] org.jabref.Launcher.main()
ERROR: Unexpected exception: java.lang.UnsupportedOperationException: Unable to open DISPLAY
        at [email protected]/com.sun.glass.ui.gtk.GtkApplication.lambda$new$5(Unknown Source)
        at java.base/java.security.AccessController.doPrivileged(Unknown Source)
        at [email protected]/com.sun.glass.ui.gtk.GtkApplication.<init>(Unknown Source)
        at [email protected]/com.sun.glass.ui.gtk.GtkPlatformFactory.createApplication(Unknown Source)
        at [email protected]/com.sun.glass.ui.Application.run(Unknown Source)
        at [email protected]/com.sun.javafx.tk.quantum.QuantumToolkit.startup(Unknown Source)
        at [email protected]/com.sun.javafx.application.PlatformImpl.startup(Unknown Source)
        at [email protected]/com.sun.javafx.application.PlatformImpl.startup(Unknown Source)
        at [email protected]/com.sun.javafx.application.LauncherImpl.startToolkit(Unknown Source)
        at [email protected]/com.sun.javafx.application.LauncherImpl.launchApplication1(Unknown Source)
        at [email protected]/com.sun.javafx.application.LauncherImpl.lambda$launchApplication$2(Unknown Source)
        at java.base/java.lang.Thread.run(Unknown Source)
^C

...

Log File: 5.16 dev; 2024-07-11
aak@debian:~/Downloads/JabRef$ ./bin/JabRef
Messages are not initialized before accessing key: Display help on command line options
2024-07-13 15:03:27 [main] org.jabref.Launcher.main()
ERROR: Unexpected exception: java.lang.UnsupportedOperationException: Unable to open DISPLAY
        at [email protected]/com.sun.glass.ui.gtk.GtkApplication.lambda$new$5(Unknown Source)
        at java.base/java.security.AccessController.doPrivileged(Unknown Source)
        at [email protected]/com.sun.glass.ui.gtk.GtkApplication.<init>(Unknown Source)
        at [email protected]/com.sun.glass.ui.gtk.GtkPlatformFactory.createApplication(Unknown Source)
        at [email protected]/com.sun.glass.ui.Application.run(Unknown Source)
        at [email protected]/com.sun.javafx.tk.quantum.QuantumToolkit.startup(Unknown Source)
        at [email protected]/com.sun.javafx.application.PlatformImpl.startup(Unknown Source)
        at [email protected]/com.sun.javafx.application.PlatformImpl.startup(Unknown Source)
        at [email protected]/com.sun.javafx.application.LauncherImpl.startToolkit(Unknown Source)
        at [email protected]/com.sun.javafx.application.LauncherImpl.launchApplication1(Unknown Source)
        at [email protected]/com.sun.javafx.application.LauncherImpl.lambda$launchApplication$2(Unknown Source)
        at java.base/java.lang.Thread.run(Unknown Source)
^Caak@debian:~/Downloads/JabRef$ ./lib/runtime/bin/JabRef
Messages are not initialized before accessing key: Display help on command line options
2024-07-13 15:03:38 [main] org.jabref.Launcher.main()
ERROR: Unexpected exception: java.lang.UnsupportedOperationException: Unable to open DISPLAY
        at [email protected]/com.sun.glass.ui.gtk.GtkApplication.lambda$new$5(Unknown Source)
        at java.base/java.security.AccessController.doPrivileged(Unknown Source)
        at [email protected]/com.sun.glass.ui.gtk.GtkApplication.<init>(Unknown Source)
        at [email protected]/com.sun.glass.ui.gtk.GtkPlatformFactory.createApplication(Unknown Source)
        at [email protected]/com.sun.glass.ui.Application.run(Unknown Source)
        at [email protected]/com.sun.javafx.tk.quantum.QuantumToolkit.startup(Unknown Source)
        at [email protected]/com.sun.javafx.application.PlatformImpl.startup(Unknown Source)
        at [email protected]/com.sun.javafx.application.PlatformImpl.startup(Unknown Source)
        at [email protected]/com.sun.javafx.application.LauncherImpl.startToolkit(Unknown Source)
        at [email protected]/com.sun.javafx.application.LauncherImpl.launchApplication1(Unknown Source)
        at [email protected]/com.sun.javafx.application.LauncherImpl.lambda$launchApplication$2(Unknown Source)
        at java.base/java.lang.Thread.run(Unknown Source)
^C

alaminkouser avatar Jul 13 '24 09:07 alaminkouser

This refs https://github.com/JabRef/jabref/issues/11464, where we also had a missing DISPLAY variable.

Google found https://www.jr-it-services.de/how-to-set-environment-variables-for-x11-programs-running-under-sudo-to-use-wayland-or-xwayland/

To support us fixing the issue, could you work on a Vagrantfile similar to the one we made for Ubuntu? -- https://github.com/JabRef/jabref/tree/main/scripts/vms/ubuntu. Background is written down here: https://github.com/JabRef/jabref/tree/main/scripts/vms#virtual-machines-for-testing-jabref

koppor avatar Jul 13 '24 09:07 koppor

Maybe simply

declare -X DISPLAY=:0

helps, but IDK.

koppor avatar Jul 13 '24 09:07 koppor

It was working when I was in gnome. Let me do some research first.

And it seems I need to have a windows computer to work on Vagrantfile file. I will setup a windows computer next month.

alaminkouser avatar Jul 13 '24 10:07 alaminkouser

It was working when I was in gnome. Let me do some research first.

As far as I understood, sway is Wayland, and Gnome still has some X11.

And it seems I need to have a windows computer to work on Vagrantfile file. I will setup a windows computer next month.

Where do you get this information from?

I went to https://www.vagrantup.com/, then clicked on Download. Then I scrolled down. This is the important step. Do not miss that on that page!

They do offer Linux. Several editions. I tried to mark it in the screenshot. Maybe, it helps, to find it!

image

koppor avatar Jul 14 '24 22:07 koppor

make sure to have xwayland installed.

jonassmedegaard avatar Dec 10 '25 06:12 jonassmedegaard

@jonassmedegaard Which version did you check? According to https://openjfx.io/highlights/23/, JavaFX has build-in support for wayland? Maybe, it's "just" version 5.15. which does not run? Thus, there could be an FAQ entry added to https://github.com/JabRef/user-documentation/blob/main/en/faq/linux.md. The other possibility is that more people of the community support development. Be it working on issues listed at https://github.com/JabRef/jabref/milestones - or be it contributing in other ways - listed at https://contribute.jabref.org.

koppor avatar Dec 10 '25 07:12 koppor

And it seems I need to have a windows computer to work on Vagrantfile file. I will setup a windows computer next month.

@alaminkouser How did this work out? It's now about 16 months later. πŸ˜…

koppor avatar Dec 10 '25 07:12 koppor

I would love to be wrong, but I found this very issue because I ununstalled xwayland from my system yesterday, only to learn this morning that JabRef failed to load, with a stack track indicating that xwayland was missing. Reinstalling xwayland, loging out and then in again made JabRef work again - and double-checking now, indeed it loads xwayland.

This is the version I am using: JabRef 6.0-alpha.3--2025-10-30--11a232b Linux 6.17.11+deb14-amd64 amd64 Java 24.0.2 JavaFX 25+29

Perhaps JabRef, or JavaFX more generally, rely on some evironment variables set or unset in order to use Wayland natively?

jonassmedegaard avatar Dec 10 '25 07:12 jonassmedegaard

Seemingly, what is supported since JavaFX 23 is not native Wayland but Wayland via XWayland: https://bugs.openjdk.org/browse/JDK-8326710

jonassmedegaard avatar Dec 10 '25 07:12 jonassmedegaard

@koppor Thanks for checking in! Sorry, I actually ended up switching back to GNOME not long after, so I didn’t get around to trying it in the end. Appreciate the follow-up though!

alaminkouser avatar Dec 10 '25 07:12 alaminkouser

Action point: Add Q&A to https://github.com/JabRef/user-documentation/blob/main/en/faq/linux.md

koppor avatar Dec 11 '25 19:12 koppor

Hi, I would like to work on this issue. Could you please assign it to me?

Phaneendra2005 avatar Feb 27 '26 18:02 Phaneendra2005

/assign-me

Phaneendra2005 avatar Feb 27 '26 18:02 Phaneendra2005

Hi! I would like to work on this issue. Can you assign it to me please? :)

viictor1 avatar Mar 17 '26 19:03 viictor1

πŸ‘‹ Hey @viictor1, looks like you’re eager to work on this issue β€” great! πŸŽ‰ It also looks like you don't know how to assign issues to yourself. Please read our CONTRIBUTING.md to find out how. It will also guide you in other aspects of contributing to JabRef.

jabref-machine avatar Mar 17 '26 19:03 jabref-machine

/assign-me

viictor1 avatar Mar 17 '26 19:03 viictor1

πŸ‘‹ Hey @viictor1, thank you for your interest in this issue! πŸŽ‰

We're excited to have you on board. Start by exploring our Contributing guidelines, and set up your local development workspace by following the steps in our workspace setup guidelines to get started smoothly.

For questions on JabRef functionality, you can consult the JabRef Guru. For questions related to the codebase, please start using DeepWiki.

In case you encounter failing tests during development, please check our developer FAQs!

Still facing issues or having more questions? Feel free to ask here on GitHub or on JabRef's Gitter chat. Please don't hesitate to open a (draft) pull request early on to show the direction you are heading towards if unsure.

Happy coding! πŸš€

jabref-machine avatar Mar 17 '26 19:03 jabref-machine

⏰ Assignment Reminder

Hi @viictor1, this is a friendly reminder about your assignment to this issue.

[!WARNING] This issue will be automatically unassigned in 7 days if there's no activity.

Remember that you can ask the JabRef Guru or DeepWiki about anything regarding JabRef. Additionally, our contributing guide has hints on creating a pull request and a link to our Gitter chat.

How to keep your assignment


If you are working on it, you can prevent automatic unassignment by:

  • Submitting a draft pull request with your progress within 7 days
  • Asking for the πŸ“Œ Pinned label if you need more time

We appreciate your contribution and are here to help if needed!

github-actions[bot] avatar Mar 24 '26 12:03 github-actions[bot]

A FAQ entry is in place.

koppor avatar Mar 25 '26 20:03 koppor