To give more detail: a KDE/QT program when it starts would somehow
communicate with the session manager to arrange for it's state to be
saved and it would be restarted if the session was closed then reopened.

For a GTK+ 2 program, what is the right API to communicate with the
session manager?

In other words, how to turn this psuedocode into actual code?

if(running_under_kde == True) // communicate with session manager
{
provide_sm_with_save_state_callback(ss); // ss is a fnuction pointer
provide_sm_with_load_state_callback(ls); // ls is a fnuction pointer
}

Thanks!



On 28 Jul 2007 at 15:23, Walter Roberson wrote:
> Antoninus Twink wrote:
>>I am writing a program using GTK+ 2. I'd like to register it with KDE's
>>session manager, ksmserver, so that it will start up once KDE is
>>restarted. How should I do that?

>
> We don't know. If there is a KDE newsgroup or mailing list or web site,
> they would probably know there. GTK and KDE and session managers
> are not part of the C language, so we don't discuss them here.