Re: session management support



Moin moin,

unfortunately you mail got lost in some email-noise, so I noticed it
not before yesterday...

    Tom> that doesn't bother me too much.  We should hide this code in
    Tom> a library, so that new Gnome programs don't have to do
    Tom> anything complicated to make it work.

Yes, we should hide this code.  I'm not sure, if the initialization
commands are needed outside the properties programms.  If not, we
could include the code into the common desktop property sources.

    Tom> There's a race condition here if multiple `-init' instance of
    Tom> the same program are run simultaneously.

We can make sure, that the '-init' stuff is only executed, if '-init'
was restared with a valid (i.e. registered) client id.  So we 'only'
have to make sure, that the same '-init' programm isn't registered
twice or more.

    Tom> However, I believe we can work around it using a hack like
    Tom> this: instead of setting the property to our client-id, we
    Tom> append our client-id (followed by a newline) to the property.

    Tom> Then we re-fetch the property.  If our client-id is the first
    Tom> one on the property list, we proceed -- this means we
    Tom> acquired the "lock".  Otherwise, we just exit.


    Tom> We have to apply this trick in all the cases, I think.

    Carsten> [...]

    Tom> Maybe a way around the wait is to merge the `-init' case in
    Tom> with the default case here.  Does this make sense?  The idea
    Tom> is:

    Tom> If started without -init/-exit, then register with session
    Tom> manager.  Just before the program exits, register a new
    Tom> client with the session manager; this client will be set up
    Tom> to run with `-init' in place.  However, if the session is
    Tom> saved before we exit, don't do this -- instead just handle
    Tom> the initialization ourselves locally next time we start up.
    Tom> Thus, no wait.


    Tom> What do you think?

Sounds good to me.  I don't see any problems with it right now.  We
only have to make sure, that the right state is restored with an
'-init' call after a new login, even if we handle more than one
session.

Carsten


-- 
-------------------------------------------------------------------------------
Carsten Schaar                         email: nhadcasc@fs-maphy.uni-hannover.de



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