Passing file descriptors over DBUS
jg at freedesktop.org
Fri Sep 9 04:48:48 PDT 2005
On Thu, 2005-09-08 at 14:22 -0400, Havoc Pennington wrote:
> On Thu, 2005-09-08 at 10:15 -0400, Jim Gettys wrote:
> > The basic idea is to have the desktop initially in control of all input
> > devices (hotplug can do its thing), be able to query the user as to
> > whether to add them to the X server, and if so, then pass the open file
> > descriptor to the X server.
> Would it be simpler to have a socket or other filename for the device,
> and just use dbus to coordinate/control who opens it at any given time?
Dunno. One question this begs is where initialization for devices
belongs, or whether the desktop system should be responsible for this
I suspect some input devices will need calibration data loaded,
potentially firmware, and setting of operating modes.... Who should be
responsible for this?
Also, how do we get ownership set up properly for the device nodes?
If the device is not being used by X, it should be owned by the user;
X is currently running as root, but we'd like to fix this someday...
> Maybe the ORBit security model (put a randomly-generated filename in an
> unreadable directory so it acts as a security cookie)?
> Not that I've thought about it all that much, but pushing fds through
> dbus is going to be a moderately complicated patch I think and also pose
> interesting questions about what happens when connecting to the bus over
More information about the dbus