Description of problem: The Java java.awt.Desktop#open(File) hangs without opening the supplied file, it finally opens only when the Java process exits Version-Release number of selected component (if applicable): java-11-openjdk-11.0.11.0.9-2.fc34.x86_64 and java-1.8.0-openjdk-1.8.0.292.b10-3.fc34.x86_64 gtk2-2.24.33-4.fc34.x86_64 gtk3-3.24.29-1.fc34.x86_64 Tested with both GTK using the Java System property jdk.gtk.version=2 and jdk.gtk.version=3 How reproducible: Always Steps to Reproduce: 1. Compile this test class import java.awt.Desktop; import java.io.File; public abstract class TestOpen { public static void main(String[] args) throws Exception { if (args.length != 1) { System.err.println("File argument required"); } Desktop.getDesktop().open(new File(args[0])); Thread.sleep(60000); } } 2. Run the test class with a file path argument, for example a PDF 3. Wait for the PDF to open in the default associated application only after the 60 seconds timeout ends. Actual results: The file is opened after the 60 seconds timeout ends, that is when the Java process exits. Expected results: The file should open as fast as possible, while the Java process is still running. Additional info: The action of opening the associated application is delegated to GTK by Java native code like: gtk->gdk_threads_enter(); success = gtk->gtk_show_uri(NULL, url_c, GDK_CURRENT_TIME, NULL); gtk->gdk_threads_leave(); It could be a threading issue or a bug in GTK
*** This bug has been marked as a duplicate of bug 1961119 ***