Missing user bus?

Havoc Pennington hp at redhat.com
Sat Sep 24 05:47:25 PDT 2005


You can't actually make a per-user bus, because you can't open a socket
on a user's forehead ;-)

What you can try to do is a "per-home-directory" bus but it's a
minefield of nasty bugs and problems, because home directories have a
real pain-in-the-ass tendency to be on NFS, AFS, or Samba shares (for
example) and so you can't put sockets in there. If you use a TCP socket,
people have firewalls between their machines and it breaks left and

You can make a "per-user-machine-pair" bus - "/tmp/dbus-username" - but
that's also a big nightmare of security headaches (see the ORBit
function that creates the ORBit per-user tmpdir) and it's also not
exactly per-user.

Anyway as John says there's a thread in the archives. But FWIW gconf was
done per-homedir and the current per-session bus is basically based on
my conclusion that I couldn't get per-homedir to work properly. Where
"work properly" means "I don't get stacks of bug reports"

I think two models are better:
 - the classic unix config file model; each session has a bus, 
   the per-session stuff writes out config files, last session 
   to write "wins" (you can be smart here and load a write from
   another session if you see it before you have other changes
   queued up)
 - the imap/ldap model; the sysadmin sets up a central server that
   the user accesses from all systems, avoiding network homedir
   and firewall issues; a "peer-to-peer" approach of one user
   machine talking to another doesn't work as well as this
   client-server approach


More information about the dbus mailing list