diff --git a/config.go b/config.go index c9c82b6..af1e681 100644 --- a/config.go +++ b/config.go @@ -41,7 +41,7 @@ func NewDefaultConfig() *Config { LogXpra: false, EnvironmentVars: []string{ "USER", "USERNAME", "LOGNAME", - "LANG", "LANGUAGE", "_", + "LANG", "LANGUAGE", "_", "TZ=UTC", }, DefaultGroups: []string{ "audio", "video", diff --git a/oz-daemon/daemon.go b/oz-daemon/daemon.go index a5b00b8..ca9783e 100644 --- a/oz-daemon/daemon.go +++ b/oz-daemon/daemon.go @@ -260,6 +260,10 @@ func (d *daemonState) sanitizeEnvironment(p *oz.Profile, oldEnv []string) []stri newEnv := []string{} for _, EnvItem := range d.config.EnvironmentVars { + if strings.Contains(EnvItem, "=") { + newEnv = append(newEnv, EnvItem) + continue + } for _, OldItem := range oldEnv { if strings.HasPrefix(OldItem, EnvItem+"=") { newEnv = append(newEnv, EnvItem+"="+strings.Replace(OldItem, EnvItem+"=", "", 1)) diff --git a/oz-init/init.go b/oz-init/init.go index 5aeac63..0ec6131 100644 --- a/oz-init/init.go +++ b/oz-init/init.go @@ -545,6 +545,9 @@ func (st *initState) bindWhitelist(fsys *fs.Filesystem, wlist []oz.WhitelistItem if wl.ReadOnly { flags |= fs.BindReadOnly } + if wl.Path == "" { + continue + } if err := fsys.BindPath(wl.Path, flags, st.user); err != nil { return err } @@ -557,6 +560,9 @@ func (st *initState) applyBlacklist(fsys *fs.Filesystem, blist []oz.BlacklistIte return nil } for _, bl := range blist { + if bl.Path == "" { + continue + } if err := fsys.BlacklistPath(bl.Path, st.user); err != nil { return err } diff --git a/profile.go b/profile.go index e991591..9fd3bc5 100644 --- a/profile.go +++ b/profile.go @@ -62,7 +62,7 @@ type XServerConf struct { WindowIcon string `json:"window_icon"` EnableTray bool `json:"enable_tray"` EnableNotifications bool `json:"enable_notifications"` - UsePulseAudio bool `json:"use_pulse_audio"` + UsePulseaudio bool `json:"use_pulseaudio"` DisableClipboard bool `json:"disable_clipboard"` AudioMode AudioMode `json:"audio_mode"` } @@ -124,7 +124,7 @@ func NewDefaultProfile() *Profile { Enabled: true, EnableTray: false, EnableNotifications: false, - UsePulseAudio: false, + UsePulseaudio: false, AudioMode: PROFILE_AUDIO_NONE, }, } diff --git a/xpra/server.go b/xpra/server.go index 0290adf..2e79408 100644 --- a/xpra/server.go +++ b/xpra/server.go @@ -10,7 +10,6 @@ import ( var xpraServerDefaultArgs = []string{ "--no-mdns", //"--pulseaudio", - "--no-pulseaudio", "--input-method=keep", } @@ -36,5 +35,10 @@ func prepareServerArgs(config *oz.XServerConf, display uint64, workdir string) [ "start", fmt.Sprintf(":%d", display), ) + if config.UsePulseaudio { + args = append(args, "--pulseaudio") + } else { + args = append(args, "--no-pulseaudio") + } return args } diff --git a/xpra/xpra.go b/xpra/xpra.go index 66b0f81..745c6ae 100644 --- a/xpra/xpra.go +++ b/xpra/xpra.go @@ -38,7 +38,6 @@ var xpraDefaultArgs = []string{ //"--no-xsettings", "--cursors", "--encoding=rgb", - "--no-pulseaudio", } func getDefaultArgs(config *oz.XServerConf) []string {