Re: Session management questions



HoraPe> What's the "right way" to save the state between sessions? I'm
HoraPe> using gnome_config_* (i believe that is conceptually similar
HoraPe> to the temporary files aproach XSMP suggests), but gnomine
HoraPe> receives all the info via cmdline options...

It all depends on your application.

I had gnomine put everything on the command-line because (a) it was
simple to do, (b) that way no cleanup was necessary, and (c) gnomine
doesn't have much state other than "I was running".

If you save state somewhere other than the command-line, then you need
to provide a command to the session manager which can be used to clean
up after the session.  Use gnome_session_set_discard_command to do
this.

HoraPe> When (could|should) the program delete the state saved? (after
HoraPe> some tests my ~.gnome/same-gnome is growing too much...)

I think the program shouldn't do it at all -- it should just register
the commands to do it.  It is up to the session manager to choose
when.


If you're testing with gsm, note that it currently can't actually
delete (or even restart) a session.  If you're testing with xsm, then
I don't know what the problem is.

Tom



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