I can’t seem to get it to send correctly.
With typical dbus i could send: “dbus-send --system --print-reply --dest=org.freedesktop.login1 /org/freedesktop/login1 “org.freedesktop.login1.Manager.Reboot” boolean:true”
I am trying to achieve the same as that command but with godbus. Here’s my code:
conn, err := dbus.SystemBus()
if err != nil {
panic(err)
}
conn.Emit("/org/freedesktop/login1", "org.freedesktop.login1.Manager.Reboot", "boolean:'true'")
if err != nil {
fmt.Println(err)
}
I’m not using it, but from the docs it looks like the emit should look like conn.Emit("/org/freedesktop/login1", "org.freedesktop.login1.Manager.Reboot", true).
If that doesn’t work, please tell us the error message you get when printing err.