method to shutdown xpra server

master
brl 10 years ago
parent 2b2de2fa31
commit 7318568b02

@ -1,6 +1,7 @@
package xpra
import (
"fmt"
"github.com/subgraph/oz"
"os/exec"
)
@ -52,3 +53,13 @@ func getDefaultArgs(config *oz.XServerConf) []string {
return args
}
func (x *Xpra) Stop() ([]byte, error) {
cmd := exec.Command("/usr/bin/xpra",
"--socket-dir="+x.WorkDir,
"stop",
fmt.Sprintf(":%d", x.Display),
)
cmd.Env = []string{"TMPDIR=" + x.WorkDir}
return cmd.Output()
}

Loading…
Cancel
Save