|
|
@ -1,12 +1,16 @@
|
|
|
|
package xpra
|
|
|
|
package xpra
|
|
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
import (
|
|
|
|
|
|
|
|
"crypto/md5"
|
|
|
|
"fmt"
|
|
|
|
"fmt"
|
|
|
|
"github.com/op/go-logging"
|
|
|
|
"io"
|
|
|
|
"github.com/subgraph/oz"
|
|
|
|
|
|
|
|
"os"
|
|
|
|
"os"
|
|
|
|
"os/exec"
|
|
|
|
"os/exec"
|
|
|
|
"syscall"
|
|
|
|
"syscall"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
"github.com/subgraph/oz"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
"github.com/op/go-logging"
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
var xpraClientDefaultArgs = []string{
|
|
|
|
var xpraClientDefaultArgs = []string{
|
|
|
@ -40,13 +44,20 @@ func prepareClientArgs(config *oz.XServerConf, display uint64, workdir string, l
|
|
|
|
args = append(args, xpraClientDefaultArgs...)
|
|
|
|
args = append(args, xpraClientDefaultArgs...)
|
|
|
|
if !config.EnableTray {
|
|
|
|
if !config.EnableTray {
|
|
|
|
args = append(args, "--no-tray")
|
|
|
|
args = append(args, "--no-tray")
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
|
|
|
|
args = append(args, "--tray")
|
|
|
|
if exists(config.TrayIcon, "Tray icon", log) {
|
|
|
|
if exists(config.TrayIcon, "Tray icon", log) {
|
|
|
|
args = append(args, fmt.Sprintf("--tray-icon=%s", config.TrayIcon))
|
|
|
|
args = append(args, fmt.Sprintf("--tray-icon=%s", config.TrayIcon))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
if exists(config.WindowIcon, "Window icon", log) {
|
|
|
|
if exists(config.WindowIcon, "Window icon", log) {
|
|
|
|
args = append(args, fmt.Sprintf("--window-icon=%s", config.WindowIcon))
|
|
|
|
args = append(args, fmt.Sprintf("--window-icon=%s", config.WindowIcon))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if config.Border {
|
|
|
|
|
|
|
|
h := md5.New()
|
|
|
|
|
|
|
|
io.WriteString(h, workdir)
|
|
|
|
|
|
|
|
args = append(args, "--border=#" + fmt.Sprintf("%x", h.Sum(nil)[0:3]))
|
|
|
|
|
|
|
|
}
|
|
|
|
args = append(args,
|
|
|
|
args = append(args,
|
|
|
|
fmt.Sprintf("--socket-dir=%s", workdir),
|
|
|
|
fmt.Sprintf("--socket-dir=%s", workdir),
|
|
|
|
"attach",
|
|
|
|
"attach",
|
|
|
|