Prev | Current Page 193 | Next

Chris Tyler

"X Power Tools"


When a user logs out of her session (and indicates that she wants to save the session,
if given the option), the SM sends a message to all registered clients to tell them to
save their state. The clients can optionally communicate with the user at this point,
which permits the client to ask the user for the filename under which data should be
saved. When the next session starts, the SM uses the command that was specified by
the client to restart it with the same ID.
Note that the session manager does not save the actual state of the client (other than
the ID number). It??™s up to the client to save its state. This is typically done with hidden
files in the user??™s home directory, but the programmer can choose another
method. It??™s up to the application programmer to decide how much state information
is saved; some programs may save only the name of the currently open file,
while others may save many details such as the window size and position, cursor
position, and undo history.
KDE and GNOME each provide session managers. The standard X distribution also
provides a session manager, known as xsm, but it is perhaps more of a proof-of-concept
than a workable session manager for daily use.


Pages:
181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205