Skip to content
This repository has been archived by the owner on Apr 22, 2021. It is now read-only.

Commit

Permalink
Detect if the client is runnig headless
Browse files Browse the repository at this point in the history
  • Loading branch information
Laurent Clouet committed Jul 3, 2020
1 parent 0674539 commit 2bdefa7
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .idea/jarRepositories.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions protocol.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Parameters as GET:
* extras (optional): Extra data used for the configuration.
* hostname (optional): Hostname of the machine, useful for distinguishing multiple machines with the same hardware configuration. Only used for display on the website.
* ui (optional): User interface used by the client, useful for statistics
* headless: Is the machine is running headless (Eevee is not compatible with headless)

Answer in case of error:
<?xml version="1.0" encoding="utf-8" ?>
Expand Down
1 change: 1 addition & 0 deletions src/com/sheepit/client/Server.java
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,7 @@ public Error.Type getConfiguration() {
.add("hostname", user_config.getHostname())
.add("ui", client.getGui().getClass().getSimpleName())
.add("extras", user_config.getExtras())
.add("headless", java.awt.GraphicsEnvironment.isHeadless() ? "1" : "0")
.build();

this.log.debug("Server::getConfiguration url " + remoteURL.build().toString());
Expand Down

0 comments on commit 2bdefa7

Please sign in to comment.