From 2e246a1a9888bd9318dbb3f5c9f800e0c964c330 Mon Sep 17 00:00:00 2001 From: Carl Kittelberger Date: Mon, 2 Nov 2015 12:46:30 +0100 Subject: [PATCH] Do not require an isolated GUI anymore. This commit allows the TS3Bot to boot in an environment where there is no way to boot an isolated graphical environment. In that case TS3Bot will try to use the already existing display and the desktop manager that runs on it already. This adds some undefined error cases which still need to be found and fixed, so be warned: This commit is very, VERY experimental! --- services/pulseaudio.iced | 1 - services/ts3client.iced | 6 ++++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/services/pulseaudio.iced b/services/pulseaudio.iced index fc10f9b..3f1c1eb 100644 --- a/services/pulseaudio.iced +++ b/services/pulseaudio.iced @@ -10,7 +10,6 @@ pacmdPath = require_bin "pacmd" module.exports = class PulseAudioService extends services.Service dependencies: [ - "xvfb" ] constructor: -> super "PulseAudio", start: (cb) -> diff --git a/services/ts3client.iced b/services/ts3client.iced index 093ba57..a179b09 100644 --- a/services/ts3client.iced +++ b/services/ts3client.iced @@ -16,8 +16,6 @@ ts3client_binpath = require_bin path.join(config.get("ts3-install-path"), "ts3cl module.exports = class TS3ClientService extends services.Service dependencies: [ - "xvfb", - "blackbox", "pulseaudio" ] constructor: -> super "TS3Client", @@ -26,6 +24,10 @@ module.exports = class TS3ClientService extends services.Service cb? new Error "XDG runtime directory needs to be set." return + if not process.env.DISPLAY? or process.env.DISPLAY.trim() == "" + cb? new Error "There is no display to run TeamSpeak3 on." + return + if typeof args == "function" cb = args args = null