This site has been retired. For up to date information, see handbook.gnome.org or gitlab.gnome.org.


[Home] [TitleIndex] [WordIndex

1. Introduction

gnome-power-manager (GnomePowerManager), NetworkManager and gnome-volume-manager only work when you are logged in. They break horribly for fast user switching, or when more than one user is logged in, or if a box has multiple connected users.

Okay, use cases for a proper multiseat / FUSA / multilogin session-system daemon:

2. PolicyKit

PolicyKit is a framework for defining policy for system-wide components and for desktop pieces to configure it. It is currently used by HAL.

3. ConsoleKit

In order to handle the no-user, single user, and multi-user cases we need to define Seats and Sessions.

What is a "session"?

A common sense definition is something like:

"The collection of processes that are direct decendents of a single authenticated, interactive login process for a real user."

Which boils down to: Group of processes lead by [what] for [whom] on [where]

Here are some of the various types of sessions (low to high):

  1. POSIX process session

  2. OS security context

  3. PAM session

  4. Instance in the accounting database

  5. D-Bus session

  6. Desktop session management

  7. All X connections to a XDisplay

  8. XDMCP Session (compressed PostScript)

Issues:

1. The problem here is that there are various ways to create new sessions (process groups) for a single user login. For example, when a program (gnome-power-manager) is daemonized it detaches from the controlling terminal and is no longer part of the same session.

2. (Add more here)

3. The prolem with PAM is that there is excellent support for defining the "who" of the session but little support for the "where" and "what".

4. There are many problems with the accounting databases, namely:

5. Not all processes are necessarily connected to the session bus. Maybe this isn't a problem. Historically and currently, non-graphical "sessions" have not started a D-Bus session. This practice can be changed.

6. This is too high level and oriented toward stateful gui applications. We need something that works as well for daemon processes.

7. Again too high level to be relied on exclusively. No framework for querying this exists. Maintaining the X connection may not be desirable: http://joeshaw.org/2006/04/11/393

8. Too specific obviously. However, it would be good to be able to contain this case.

Also I'm a little surprised that I haven't been able to find anything in the kernel audit subsystem that defines a session the way we'd like it to.

4. Other OS's

4.1. Apple OS X

Apple OSX seems to run a policy service on each user session, and an overarching system service tells each instance to stop("cpufreq") or start("laptop_panel") depending on if the console is active.

RichardHughes : I think this is simple and very sane

4.2. Vista

5. POSIX sucks?

In the POSIX user model, you have one god-like pseudo-user (root), and an unbounded number of equally unimportant ordinary users. This model only really matches one of the use cases given above (Paul's):

If we really want to fix this well, it seems like we need to make the system have a better understanding of the way people actually use their systems these days, rather than assuming that everyone is a multiuser timesharing system.

Two recent Planet GNOME postings related to user model problems like this: bolsh trying to share files between users on a machine, joeshaw wanting separate firefox profiles for two users sharing the same account.


2024-10-23 10:58