From b1431b15541812d16ec40c22bf9064bc73d89be4 Mon Sep 17 00:00:00 2001 From: xSmurf Date: Mon, 8 Jun 2015 00:00:57 +0000 Subject: [PATCH] Fixed passing display number 0 --- oz-daemon/launch.go | 4 +--- oz-init/init.go | 8 ++++---- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/oz-daemon/launch.go b/oz-daemon/launch.go index 67a94cc..6b38e80 100644 --- a/oz-daemon/launch.go +++ b/oz-daemon/launch.go @@ -75,9 +75,7 @@ func createInitCommand(name, chroot string, uid uint32, display int, stn *networ cmd.Env = append(cmd.Env, "INIT_GATEWAY=" + stn.Gateway.String() + "/" + stn.Class) } - if display > 0 { - cmd.Env = append(cmd.Env, fmt.Sprintf("INIT_DISPLAY=%d", display)) - } + cmd.Env = append(cmd.Env, fmt.Sprintf("INIT_DISPLAY=%d", display)) return cmd } diff --git a/oz-init/init.go b/oz-init/init.go index e1ceadb..560e97d 100644 --- a/oz-init/init.go +++ b/oz-init/init.go @@ -162,10 +162,10 @@ func (st *initState) runInit() { oz.ReapChildProcs(st.log, st.handleChildExit) if st.profile.XServer.Enabled { - if st.display == 0 { - st.log.Error("Cannot start xpra because no display number was passed to oz-init") - os.Exit(1) - } + //if st.display == 0 { + // st.log.Error("Cannot start xpra because no display number was passed to oz-init") + // os.Exit(1) + //} st.xpraReady.Add(1) st.startXpraServer() }