Re: Session management stuff

Carsten> some of you may have noticed, that the session management
Carsten> stuff has changed slightly some weeks ago.  The main changes
Carsten> are:

Carsten> * The gnome command line options are saved
Carsten>   automatically. This means, that an application, called with
Carsten>   a '--display' command line option, will be restarted with
Carsten>   this option.

I think this is the wrong thing to do.  The --display option is one
that you particularly *do not* want to save.  Saving it means that
your session will require a particular display in order to run.
Instead, sessions should be display-independent.  In general programs
should use the display passed in via the DISPLAY environment variable.
This will let you log out on one machine, log in on another, and see
your same saved session.  I think this capability is very important in
some environments (for instance, university labs).

I think that we should just encourage each program to properly
generate a command-line that will be correct for the current state.
That is, I think we should remove the auto-saving feature.  It's hard
to think of a situation where its use would be correct in all cases.

I've changed gnome-session to set DISPLAY in the environment before
loading any sessions.

Carsten> * Some environment variables are saved automatically
Carsten>   (unfortunately right now gnome-session doesn't store them.
Carsten>   If this will be done, the session management stuff will
Carsten>   support multihead environments without any problems.)

I've changed gnome-session to save and restore the environment.  (I
haven't tested it yet, though.)  The restored environment is first
merged with gnome-sessions' environment before execing the child.

However, gnome-client.c currently saves the DISPLAY environment
variable.  This is the wrong thing to do.  I notice that it also saves
HOME, PATH, and LD_LIBRARY_PATH.  I think all of these are actually
harmful to save.  Suppose the user's home directory changes?  Then his
saved session will be bad.  Suppose he installs a new program and adds
a directory to his PATH?  Oops, the panel in the session won't find
it, because it's PATH value is fixed.

With this in mind, I've removed all the currently-saved environment
variables.  I'll check this in when I check in the other code.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]