-
Notifications
You must be signed in to change notification settings - Fork 5
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
Default to headless mode #50
Comments
Thanks for reporting this! Actually Line 7 in 7970c59
Seems it is not enough. Regarding a problem with running on Ubuntu with installed elle-cli/.github/workflows/test.yaml Lines 59 to 63 in 7970c59
Agree. I left the issue unresolved. |
Ah, interesting. I am guessing the property gets lost in translation when creating the UberJar (or maybe it's set, but too late during lifecycle)? Setting display seems like a workaround. It should not be necessary if headless mode was working as expected. |
Confirmed this, see these PR tests passing on ubuntu after removing DISPLAY: #51 So my theory is: setting And here's evidence this is correct:
So far so good, headless mode property is passed, as expected.
So it does look like those I'm not familiar with lein or Clojure, but I'm sure there's multiple ways to achieve that (bundle a property file as resource, for example) Once that's done, you could remove any hack you had to do in testing, because the uberjar will always run in headless mode (which is what you want for a pure CLI tool, I think). |
Thanks for research!
I'll try to fix it. |
Fixes #50 Reported-by: Marco Primi <[email protected]>
Fixes #50 Reported-by: Marco Primi <[email protected]>
Thank you for the quick turnaround on this! @ligurio |
elle-cli
should probably run by default in (Java) headless mode, since it's a command-line application without a GUI.Currently, it does not and this creates a couple of inconveniences:
MacOS: when
Elle-cli
is running there is an application (e.g. shows in alt-tab list of running applications). And it steals focus from the currently active application. So if you have it running in background on a bunch of traces, it's impossible to do anything else, because it keeps going foreground.Linux (Ubuntu 20.04 with
java-default-headless
installed):There is a simple workaround that fixes both cases:
But it would be nice if
Elle-cli
was headless-ready out of the box.More info: https://www.baeldung.com/java-headless-mode
The text was updated successfully, but these errors were encountered: