GNOME provides tools to allow your application to run smoothly from session to session. Users can log out with running applications and have those applications fully restored when they log back in. To provide this functionality, your application must connect to the session manager and save its state when the user logs out.
GNOME provides a simple API for session management in the GNOME User Interface Library. See the section GnomeClient of the GNOME UI Library Reference Manual for more information on working with the GNOME session manager.