change Example "ConnectSessionBus" to "SystemBus" cause
whidbey opened this issue · 1 comments
whidbey commented
the default example:
`
func main() {
conn, err := dbus.ConnectSystemBus() //Here I changed..
if err != nil {
panic(err)
}
defer conn.Close()
env := os.Environ()
fmt.Println(env)
f := foo("Bar!")
conn.Export(f, "/com/github/guelfey/Demo", "com.github.guelfey.Demo")
conn.Export(introspect.Introspectable(intro), "/com/github/guelfey/Demo",
"org.freedesktop.DBus.Introspectable")`
and When build and run,show the flowing error.
panic: Connection ":1.9" is not allowed to own the service "com.github.guelfey.Demo" due to security policies in the configuration file
whidbey commented
create a conf on /usr/share/dbus_1/system.d resove my problem; thanks