dbus - autokey problem
Simon McVittie
simon.mcvittie at collabora.co.uk
Fri Mar 25 12:45:55 UTC 2016
On 23/03/16 03:54, Dave Kimble wrote:
> I suspect something is not right with the way my dbus is set up.
> I have dbus-daemon (root) and dbus-daemon (user) and dbus-launch (user)
> running.
What you should normally have is:
* a /system bus/ (dbus-daemon instance with --system in argv), running
as uid "messagebus" or "dbus" or similar, and listening on
/var/run/dbus/system_bus_socket
* a /session bus/ (dbus-daemon instance with --session in argv) per
login session, running as the uid you used to log in, and listening
on some abstract Unix socket usually starting with /tmp/dbus- (it
will be different for every session). In newer distributions this
sometimes listens on a real (path-based) Unix socket
/run/user/${uid}/bus instead, but Ubuntu 14.04 is too old for that
to be relevant.
* (usually) a dbus-launch process per login session, running as the uid
you used to log in, which is responsible for starting the dbus-daemon
(in newer distributions where /run/user/${uid}/bus is used, this is
not necessary and it's OK for it to be absent)
If you have a dbus-daemon instance whose uid is root, something has
probably gone wrong somewhere.
I have no idea what autokey-gtk is for, but it has gtk in its name, so
I'm assuming it's meant to run within the scope of the X11 login
session, with the same uid as the login session itself, and connect to
the session bus. That would mean it's broadly equivalent to the
behaviour of things like GNOME Online Accounts, Telepathy, dconf, etc.
Please correct those assumptions if any of them are wrong.
Within each login session, the environment variable
DBUS_SESSION_BUS_ADDRESS will be set to something like
unix:abstract=/tmp/dbus-39863tnm. That path does not actually exist in
the filesystem, and that's OK: it is said to be an /abstract Unix socket/.
You should be able to run "dbus-monitor --session", or the d-feet, qdbus
or gdbus tools, and have them connect to the session bus. If using
dbus-monitor or another monitor-style tool, press Ctrl+C to terminate it.
> I am trying to debug a situation where autokey-gtk launches and tries
> to connect to dbus and gets a warning that /tmp/dbus-* does not exist.
Please paste a specific, searchable warning: literal text is more useful
than paraphrasing. You can censor it if you need to, e.g. replacing
usernames with alice/bob, as long as you're consistent about it.
--
Simon McVittie
Collabora Ltd. <http://www.collabora.com/>
More information about the dbus
mailing list