flathub / org.libreoffice.LibreOffice

https://flathub.org/apps/details/org.libreoffice.LibreOffice
30 stars 20 forks source link

Showing java.awt.Window fails with java.awt.HeadlessException "No X11 DISPLAY variable was set" #219

Open stbergmann opened 1 year ago

stbergmann commented 1 year ago

At least with the latest

LibreOffice - The LibreOffice productivity suite

          ID: org.libreoffice.LibreOffice
         Ref: app/org.libreoffice.LibreOffice/x86_64/stable
        Arch: x86_64
      Branch: stable
     Version: 7.5.1.2
     License: MPL-2.0
      Origin: flathub
  Collection: org.flathub.Stable
Installation: user
   Installed: 734.1 MB
     Runtime: org.freedesktop.Platform/x86_64/22.08
         Sdk: org.freedesktop.Sdk/x86_64/22.08

      Commit: d274776052d02d15376b2c36c33777f5901b780a3ef6e1534558c4f8f61e2ae7
      Parent: 8319f513d81f9644bcf78fd01ae0d38f5edff0c42ae108b7a8e0fc5ab1a747d1
     Subject: Re-enable Skia (fb8d164e)
        Date: 2023-03-02 14:02:09 +0000

on both Fedora 37 and 38 beta GNOME/Wayland, e.g. "Tools - Macro - Organize Macros - BeanShell... - Application Macros - Calc - CopyRange.bsh - Edit" fails with

Exception in thread "AWT-EventQueue-0" java.awt.HeadlessException: 
No X11 DISPLAY variable was set, but this program performed an operation which requires it.
    at java.desktop/java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:208)
    at java.desktop/java.awt.Window.<init>(Window.java:548)
    at java.desktop/java.awt.Frame.<init>(Frame.java:423)
    at java.desktop/javax.swing.JFrame.<init>(JFrame.java:224)
    at com.sun.star.script.framework.provider.beanshell.ScriptEditorForBeanShell.initUI(ScriptEditorForBeanShell.java:273)
    at com.sun.star.script.framework.provider.beanshell.ScriptEditorForBeanShell.<init>(ScriptEditorForBeanShell.java:259)
    at com.sun.star.script.framework.provider.beanshell.ScriptEditorForBeanShell.<init>(ScriptEditorForBeanShell.java:52)
    at com.sun.star.script.framework.provider.beanshell.ScriptEditorForBeanShell$1.run(ScriptEditorForBeanShell.java:211)
    at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:313)
    at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:770)
    at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
    at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:715)
    at java.base/java.security.AccessController.doPrivileged(Native Method)
    at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
    at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:740)
    at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
    at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
    at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
    at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
    at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
    at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)

on stderr rather than opening a "BeanShell Debug Window: CopyRange.bsh" editor window.

Erick555 commented 1 year ago

I guess this part doesn't support wayland while fallback-x11 option removes X11 access from wayland apps.