From 2bdefa7d24079c1c2b24c9dbc32a4fcb21d468b3 Mon Sep 17 00:00:00 2001 From: Laurent Clouet Date: Fri, 3 Jul 2020 11:15:00 +0200 Subject: [PATCH] Detect if the client is runnig headless --- .idea/jarRepositories.xml | 25 +++++++++++++++++++++++++ protocol.txt | 1 + src/com/sheepit/client/Server.java | 1 + 3 files changed, 27 insertions(+) create mode 100644 .idea/jarRepositories.xml diff --git a/.idea/jarRepositories.xml b/.idea/jarRepositories.xml new file mode 100644 index 00000000..b3e9cbd3 --- /dev/null +++ b/.idea/jarRepositories.xml @@ -0,0 +1,25 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/protocol.txt b/protocol.txt index 06f48e76..d3731128 100644 --- a/protocol.txt +++ b/protocol.txt @@ -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: diff --git a/src/com/sheepit/client/Server.java b/src/com/sheepit/client/Server.java index 1ec7f97e..b741af82 100644 --- a/src/com/sheepit/client/Server.java +++ b/src/com/sheepit/client/Server.java @@ -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());