From 2b7da8705f1fbb9125f6aa4c1ac84fdca9cb0113 Mon Sep 17 00:00:00 2001 From: icedream Date: Wed, 4 Nov 2015 23:33:44 +0100 Subject: [PATCH] Require a DISPLAY to be set instead of Xvfb to be running for the window manager. --- services/xwm.iced | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/services/xwm.iced b/services/xwm.iced index 6be4219..6114e2b 100644 --- a/services/xwm.iced +++ b/services/xwm.iced @@ -8,7 +8,6 @@ xwmBinPath = require_bin "x-window-manager", false module.exports = class XWindowManagerService extends services.Service dependencies: [ - "xvfb" ] constructor: -> super "XWindowManager", start: (cb) -> @@ -16,6 +15,14 @@ module.exports = class XWindowManagerService extends services.Service cb? new Error "A window manager not available." return + if not process.env.XDG_RUNTIME_DIR? or process.env.XDG_RUNTIME_DIR.trim() == "" + 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 @process cb? null, @process return @@ -25,10 +32,6 @@ module.exports = class XWindowManagerService extends services.Service proc = null doStart = null doStart = () => - await services.find("xvfb").start defer(err) - if err - throw new Error "Dependency xvfb failed." - proc = spawn xwmBinPath, [], stdio: ['ignore', 'pipe', 'pipe'] detached: true