Improve platform notice

This commit is contained in:
crschnick 2024-04-13 21:05:15 +00:00
parent 922633fb6e
commit 8a60b29674

View file

@ -73,6 +73,17 @@ public enum PlatformState {
// Catch more than just the headless exception in case the graphics environment initialization completely
// fails
} catch (HeadlessException h) {
var msg = OsType.getLocal().equals(OsType.LINUX) ? "No X11 DISPLAY variable was set or no headful library support was found." +
"\n\n" +
"Please note that XPipe is a desktop application that should be run on your local workstation." +
" It is able to provide the full functionality for all integrations via remote server connections, e.g. via SSH." +
" You don't have to install XPipe on any system like a server, a WSL distribution, a hypervisor, etc.," +
" to have full access to that system, a shell connection to it is enough for XPipe to work from your local machine."
: h.getMessage();
TrackEvent.warn(h.getMessage());
PlatformState.setCurrent(PlatformState.EXITED);
return Optional.of(new HeadlessException(msg));
} catch (Throwable t) {
TrackEvent.warn(t.getMessage());
PlatformState.setCurrent(PlatformState.EXITED);