Hi,

Stef Walter wrote:
> This may be a dumb question, but I'm wondering if we support (or it is a
> goal to support) multiple sessions for the same user in GNOME.
> 
> As far as I can tell a lot of GNOME software doesn't currently take that
> into account. I'm working on gnome-keyring-daemon, and I'm wondering if
> I need to keep multiple sessions in mind or just take the much simpler
> approach of one session per user.
> 

Everything needs to hang off either the session dbus daemon or the X 
server, then it should Just Work for multiple sessions. By "hang off" I 
mean some arrangement such that the user gets 1 daemon for each X server 
or dbus bus, and such that the 1 daemon exits when either the X server 
or the dbus bus exits. The lifetime of the  X server and the dbus bus 
should be the same (they should exit together) in a properly-configured 
GNOME setup, so it does not matter which one you use.

The only other, possibly-sane alternative is per-machine or 
per-(user,machine) or per-(session,machine) scoping (i.e. have a socket 
in /tmp, or hang off the system dbus daemon, possibly including username 
or dbus session uuid in the socket or bus name). However, this is wrong 
for most purposes, so be careful. And you have to be sure there's some 
way to exit the daemon when there are no active sessions.

Historical GNOME problems in this area have come from gconfd and Bonobo 
components getting the scoping wrong; they should have been per-session, 
but were not.

The temptation is to think that per-user scoping is possible, but it 
isn't. One reason is that there's no way to coordinate copies of the 
daemon on multiple machines. You can't reliably have a network 
connection between machines, and fcntl() locking in the home directory 
does not reliably work in the real world due to NFS and AFS. (If you 
need to do locking to support multiple daemons operating on one homedir, 
I suggest the approach used by the dbus cookie file code.)

Havoc

_______________________________________________
desktop-devel-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/desktop-devel-list

Reply via email to