From 409bdb568aacadf9c739c8cc0bd03e67065dc654 Mon Sep 17 00:00:00 2001 From: brl Date: Fri, 5 Jun 2015 18:34:37 -0400 Subject: [PATCH] 1) fixed a typo Sprint -> Sprintf. 2) add DISPLAY to env vars --- xpra/client.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/xpra/client.go b/xpra/client.go index dace512..09560b3 100644 --- a/xpra/client.go +++ b/xpra/client.go @@ -26,10 +26,11 @@ func NewClient(config *oz.XServerConf, display uint64, cred *syscall.Credential, x.Process.SysProcAttr = &syscall.SysProcAttr{ Credential: cred, } - x.Process.Env = append(os.Environ(), + x.Process.Env = []string{ + "DISPLAY=:0", fmt.Sprintf("TMPDIR=%s", workdir), fmt.Sprintf("XPRA_SOCKET_HOSTNAME=%s", hostname), - ) + } return x } @@ -46,7 +47,7 @@ func prepareClientArgs(config *oz.XServerConf, display uint64, workdir string, l args = append(args, fmt.Sprintf("--window-icon=%s", config.WindowIcon)) } args = append(args, - fmt.Sprint("--socket-dir=%s", workdir), + fmt.Sprintf("--socket-dir=%s", workdir), "attach", fmt.Sprintf(":%d", display), )