diff --git a/dbus/run.go b/dbus/run.go index a4c04dc..eef0d14 100644 --- a/dbus/run.go +++ b/dbus/run.go @@ -9,7 +9,7 @@ import ( // Start launches the D-Bus proxy and sets up the Wait method. // ready should be buffered and should only be received from once. -func (p *Proxy) Start(ready chan error) error { +func (p *Proxy) Start(ready chan error, output bool) error { p.lock.Lock() defer p.lock.Unlock() @@ -25,8 +25,10 @@ func (p *Proxy) Start(ready chan error) error { // xdg-dbus-proxy does not need to inherit the environment h.Env = []string{} - h.Stdout = os.Stdout - h.Stderr = os.Stderr + if output { + h.Stdout = os.Stdout + h.Stderr = os.Stderr + } if err := h.StartNotify(ready); err != nil { return err } diff --git a/internal/app/share.dbus.go b/internal/app/share.dbus.go index 2902502..e94d648 100644 --- a/internal/app/share.dbus.go +++ b/internal/app/share.dbus.go @@ -102,7 +102,7 @@ func (tx *appSealTx) startDBus() error { tx.dbusWait = make(chan struct{}) // background dbus proxy start - if err := tx.dbus.Start(ready); err != nil { + if err := tx.dbus.Start(ready, true); err != nil { return (*StartDBusError)(wrapError(err, "cannot start message bus proxy:", err)) } verbose.Println("starting message bus proxy:", tx.dbus)