22

The system bus works fine

(dbus-init-bus :system)

returns nil, as it should.

However, connection to the session bus

(dbus-init-bus :session)

raises

(dbus-error "No connection to bus" :session)

qdbus in the command line works just fine with both buses. It even works from within eshell, if that is of any concern.

Neither emacs nor emacs --daemon connect.

Reactormonk
  • 21,472
  • 14
  • 74
  • 123

2 Answers2

2

Which version of Emacs are you using? One version (before 2012-05-25) only looks for the DBUS_SESSION_BUS_ADDRESS environment variable, while a more recent one uses a library function that also looks in ~/.dbus/session-bus I think.

Martin Vidner
  • 2,307
  • 16
  • 31
1

Did you try this before running emacs: eval $(dbus-launch) export DBUS_SESSION_BUS_ADDRESS