From 38ef2b4d0caf48a5f6bb9d472b76764cbf14d23d Mon Sep 17 00:00:00 2001 From: Ophestra Umiker Date: Mon, 9 Sep 2024 03:16:54 +0900 Subject: app/dbus: manage dbus proxy and pass address to child This commit adds code that starts and registers the D-Bus proxy, as well as cleanup code that tracks and closes the daemon once our child exits. A few more flags were added to pass D-Bus config to xdg-dbus-proxy. Signed-off-by: Ophestra Umiker --- internal/app/run.go | 3 +++ 1 file changed, 3 insertions(+) (limited to 'internal/app/run.go') diff --git a/internal/app/run.go b/internal/app/run.go index 46e0270d..4e4e578d 100644 --- a/internal/app/run.go +++ b/internal/app/run.go @@ -166,6 +166,9 @@ func (a *App) commandBuilderMachineCtl() (args []string) { if executable, err := os.Executable(); err != nil { state.Fatal("Error reading executable path:", err) } else { + if a.enablements.Has(state.EnableDBus) { + innerCommand.WriteString(dbusSessionBusAddress + "=" + "'" + dbusAddress + "' ") + } innerCommand.WriteString("exec " + executable + " -V") } args = append(args, innerCommand.String()) -- cgit v1.3.1