[Bug 3572] "Headless check failed" when I run "javaws myjnlpfile" inside xrdp/openbox

bugzilla-daemon at icedtea.classpath.org bugzilla-daemon at icedtea.classpath.org
Thu May 24 16:35:51 UTC 2018


https://icedtea.classpath.org/bugzilla/show_bug.cgi?id=3572

--- Comment #14 from JiriVanek <jvanek at redhat.com> ---
Please can you try this one? (on top of the previous one):
diff -r 5290684409aa netx/net/sourceforge/jnlp/config/Defaults.java
--- a/netx/net/sourceforge/jnlp/config/Defaults.java    Thu May 24 17:55:31
2018 +0200
+++ b/netx/net/sourceforge/jnlp/config/Defaults.java    Thu May 24 18:34:19
2018 +0200
@@ -412,6 +412,11 @@
                         BasicValueValidators.getRangedIntegerValidator(0,
10000),
                         String.valueOf(500)
                 },
+                {
+                        DeploymentConfiguration.IGNORE_HEADLESS_CHECK,
+                        BasicValueValidators.getBooleanValidator(),
+                        String.valueOf(false)
+                },
                 //JVM arguments for plugin
                 {
                         DeploymentConfiguration.KEY_PLUGIN_JVM_ARGUMENTS,
diff -r 5290684409aa
netx/net/sourceforge/jnlp/config/DeploymentConfiguration.java
--- a/netx/net/sourceforge/jnlp/config/DeploymentConfiguration.java     Thu May
24 17:55:31 2018 +0200
+++ b/netx/net/sourceforge/jnlp/config/DeploymentConfiguration.java     Thu May
24 18:34:19 2018 +0200
@@ -222,6 +222,8 @@

     public static final String KEY_BROWSER_PATH = "deployment.browser.path";
     public static final String KEY_UPDATE_TIMEOUT =
"deployment.javaws.update.timeout";
+    
+    public static final String IGNORE_HEADLESS_CHECK =
"deployment.headless.ignore";

     /*
      * JVM arguments for plugin
diff -r 5290684409aa netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java
--- a/netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java        Thu May 24
17:55:31 2018 +0200
+++ b/netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java        Thu May 24
18:34:19 2018 +0200
@@ -739,18 +739,24 @@
         //if (GraphicsEnvironment.isHeadless()) // jdk1.4+ only
         //    headless = true;
         try {
-            if
("true".equalsIgnoreCase(System.getProperty("java.awt.headless"))){
+            if
("true".equalsIgnoreCase(System.getProperty("java.awt.headless"))) {
                 headless = true;
             }
             if (!headless) {
-                try {
-                    if (GraphicsEnvironment.isHeadless()) {
-                        throw new HeadlessException();
+                boolean noCheck =
Boolean.valueOf(JNLPRuntime.getConfiguration().getProperty(DeploymentConfiguration.IGNORE_HEADLESS_CHECK));
+                if (noCheck) {
+                    headless = false;
+                   
OutputController.getLogger().log(DeploymentConfiguration.IGNORE_HEADLESS_CHECK
+ " set to " + noCheck + ". Avoding headless check.");
+                } else {
+                    try {
+                        if (GraphicsEnvironment.isHeadless()) {
+                            throw new HeadlessException();
+                        }
+                    } catch (HeadlessException ex) {
+                        headless = true;
+                        OutputController.getLogger().log(ex);
+                       
OutputController.getLogger().log(OutputController.Level.MESSAGE_ALL,
Translator.R("HEADLESS_MISSCONFIGURED"));
                     }
-                } catch (HeadlessException ex) {
-                    headless = true;
-                    OutputController.getLogger().log(ex);
-                   
OutputController.getLogger().log(OutputController.Level.MESSAGE_ALL,
Translator.R("HEADLESS_MISSCONFIGURED"));
                 }
             }
         } catch (SecurityException ex) {



and then set deployment.headless.ignore=true in
~/.config/icedtea-web/deployment.properties


TYVVVVM!

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20180524/5f3dc0da/attachment.html>


More information about the distro-pkg-dev mailing list