Small fixes

master
xSmurf 9 years ago
parent 3f466e9d8e
commit 50556b1bf7

@ -41,7 +41,7 @@ func NewDefaultConfig() *Config {
LogXpra: false,
EnvironmentVars: []string{
"USER", "USERNAME", "LOGNAME",
"LANG", "LANGUAGE", "_",
"LANG", "LANGUAGE", "_", "TZ=UTC",
},
DefaultGroups: []string{
"audio", "video",

@ -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))

@ -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
}

@ -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,
},
}

@ -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
}

@ -38,7 +38,6 @@ var xpraDefaultArgs = []string{
//"--no-xsettings",
"--cursors",
"--encoding=rgb",
"--no-pulseaudio",
}
func getDefaultArgs(config *oz.XServerConf) []string {

Loading…
Cancel
Save