home *** CD-ROM | disk | FTP | other *** search
-
-
-
- XSM(1) XSM(1)
-
-
- NNAAMMEE
- xsm - X Session Manager
-
- SSYYNNOOPPSSIISS
- xxssmm [-display display] [-session sessionName] [-verbose]
-
- DDEESSCCRRIIPPTTIIOONN
- _x_s_m is a session manager. A session is a group of appli-
- cations, each of which has a particular state. _x_s_m allows
- you to create arbitrary sessions - for example, you might
- have a "light" session, a "development" session, or an
- "xterminal" session. Each session can have its own set of
- applications. Within a session, you can perform a "check-
- point" to save application state, or a "shutdown" to save
- state and exit the session. When you log back in to the
- system, you can load a specific session, and you can
- delete sessions you no longer want to keep.
-
- Some session managers simply allow you to manually specify
- a list of applications to be started in a session. _x_s_m is
- more powerful because it lets you run applications and
- have them automatically become part of the session. On a
- simple level, _x_s_m is useful because it gives you this
- ability to easily define which applications are in a ses-
- sion. The true power of _x_s_m, however, can be taken advan-
- tage of when more and more applications learn to save and
- restore their state.
-
- OOPPTTIIOONNSS
- --ddiissppllaayy _d_i_s_p_l_a_y
- Causes _x_s_m to connect to the specified X display.
-
- --sseessssiioonn _s_e_s_s_i_o_n_N_a_m_e
- Causes _x_s_m to load the specified session, bypass-
- ing the session menu.
-
- --vveerrbboossee
- Turns on debugging information.
-
- SSEETTUUPP
- ..xxsseessssiioonn ffiillee
- Using _x_s_m requires a change to your _._x_s_e_s_s_i_o_n file:
-
- The last program executed by your _._x_s_e_s_s_i_o_n file should be
- _x_s_m. With this configuration, when the user chooses to
- shut down the session using _x_s_m, the session will truly be
- over.
-
- Since the goal of the session manager is to restart
- clients when logging into a session, your .xsession file,
- in general, should not directly start up applications.
- Rather, the applications should be started within a ses-
- sion. When _x_s_m shuts down the session, _x_s_m will know to
- restart these applications. Note however that there are
-
-
-
- X Version 11 Release 6.1 1
-
-
-
-
-
- XSM(1) XSM(1)
-
-
- some types of applications that are not "session aware".
- _x_s_m allows you to manually add these applications to your
- session (see the section titled _C_l_i_e_n_t _L_i_s_t).
-
-
- SSMM__SSAAVVEE__DDIIRR eennvviirroonnmmeenntt vvaarriiaabbllee
- If the _S_M___S_A_V_E___D_I_R environment variable is defined, _x_s_m
- will save all configuration files in this directory. Oth-
- erwise, they will be stored in the user's home directory.
- Session aware applications are also encouraged to save
- their checkpoint files in the _S_M___S_A_V_E___D_I_R directory,
- although the user should not depend on this convention.
-
-
- DDeeffaauulltt SSttaarrttuupp AApppplliiccaattiioonnss
- The first time _x_s_m is started, it will need to locate a
- list of applications to start up. For example, this list
- might include a window manager, a session management
- proxy, and an xterm. _x_s_m will first look for the file
- _._x_s_m_s_t_a_r_t_u_p in the user's home directory. If that file
- does not exists, it will look for the _s_y_s_t_e_m_._x_s_m file that
- was set up at installation time. Note that _x_s_m provides a
- "fail safe" option when the user chooses a session to
- start up. The fail safe option simply loads the default
- applications described above.
-
- Each line in the startup file should contain a command to
- start an application. A sample startup file might look
- this:
-
- <start of file>
- twm
- smproxy
- xterm
- <end of file>
-
-
- SSTTAARRTTIINNGG AA SSEESSSSIIOONN
- When _x_s_m starts up, it first checks to see if the user
- previously saved any sessions. If no saved sessions
- exist, _x_s_m starts up a set of default applications (as
- described above in the section titled _D_e_f_a_u_l_t _S_t_a_r_t_u_p
- _A_p_p_l_i_c_a_t_i_o_n_s). If at least one session exists, a session
- menu is presented. The [[--sseessssiioonn sseessssiioonnNNaammee]] option
- forces the specified session to be loaded, bypassing the
- session menu.
-
- TThhee sseessssiioonn mmeennuu
- The session menu presents the user with a list of sessions
- to choose from. The user can change the currently
- selected session with the mouse, or by using the up and
- down arrows on the keyboard. Note that sessions which are
- locked (i.e. running on a different display) can not be
- loaded or deleted.
-
-
-
- X Version 11 Release 6.1 2
-
-
-
-
-
- XSM(1) XSM(1)
-
-
- The following operations can be performed from the session
- menu:
-
-
- LLooaadd SSeessssiioonn Pressing this button will load the
- currently selected session. Alter-
- natively, hitting the Return key
- will also load the currently
- selected session, or the user can
- double click a session from the
- list.
-
- DDeelleettee SSeessssiioonn This operation will delete the cur-
- rently selected session, along with
- all of the application checkpoint
- files associated with the session.
- After pressing this button, the user
- will be asked to press the button a
- second time in order to confirm the
- operation.
-
- DDeeffaauulltt//FFaaiill SSaaffee _x_s_m will start up a set of default
- applications (as described above in
- the section titled _D_e_f_a_u_l_t _S_t_a_r_t_u_p
- _A_p_p_l_i_c_a_t_i_o_n_s). This is useful when
- the user wants to start a fresh ses-
- sion, or if the session configura-
- tion files were corrupted and the
- user wants a "fail safe" session.
-
- CCaanncceell Pressing this button will cause _x_s_m
- to exit. It can also be used to
- cancel a "Delete Session" operation.
-
-
- CCOONNTTRROOLLLLIINNGG AA SSEESSSSIIOONN
- After _x_s_m determines which session to load, it brings up
- its main window, then starts up all applications that are
- part of the session. The title bar for the session man-
- ager's main window will contain the name of the session
- that was loaded.
-
- The following options are available from _x_s_m's main win-
- dow:
-
- CClliieenntt LLiisstt Pressing this button brings up a window
- containing a list of all clients that
- are in the current session. For each
- client, the host machine that the client
- is running on is presented. As clients
- are added and removed from the session,
- this list is updated to reflect the
- changes. The user is able to control
- how these clients are restarted (see
-
-
-
- X Version 11 Release 6.1 3
-
-
-
-
-
- XSM(1) XSM(1)
-
-
- below).
-
- By pressing the VViieeww PPrrooppeerrttiieess button,
- the user can view the session management
- properties associated with the currently
- selected client.
-
- By pressing the CClloonnee button, the user
- can start a copy of the selected appli-
- cation.
-
- By pressing the KKiillll CClliieenntt button, the
- user can remove a client from the ses-
- sion.
-
- By selecting a restart hint from the
- RReessttaarrtt HHiinntt menu, the user can control
- the restarting of a client. The follow-
- ing hints are available:
-
- -- The RReessttaarrtt IIff RRuunnnniinngg hint indicates
- that the client should be restarted in
- the next session if it is connected to
- the session manager at the end of the
- current session.
-
- -- The RReessttaarrtt AAnnyywwaayy hint indicates that
- the client should be restarted in the
- next session even if it exits before the
- current session is terminated.
-
- -- The RReessttaarrtt IImmmmeeddiiaatteellyy hint is simi-
- lar to the RReessttaarrtt AAnnyywwaayy hint, but in
- addition, the client is meant to run
- continuously. If the client exits, the
- session manager will try to restart it
- in the current session.
-
- -- The RReessttaarrtt NNeevveerr hint indicates that
- the client should not be restarted in
- the next session.
-
- Note that all X applications may not be
- "session aware". Applications that are
- not session aware are ones that do not
- support the X Session Management Proto-
- col or they can not be detected by the
- Session Management Proxy (see the sec-
- tion titled _T_H_E _P_R_O_X_Y). _x_s_m allows the
- user to manually add such applications
- to the session. The bottom of the
- _C_l_i_e_n_t _L_i_s_t window contains a text entry
- field in which application commands can
- be typed in. Each command should go on
-
-
-
- X Version 11 Release 6.1 4
-
-
-
-
-
- XSM(1) XSM(1)
-
-
- its own line. This information will be
- saved with the session at checkpoint or
- shutdown time. When the session is
- restarted, _x_s_m will restart these appli-
- cations in addition to the regular "ses-
- sion aware" applications.
-
- Pressing the DDoonnee button removes the
- CClliieenntt LLiisstt window.
-
- SSeessssiioonn LLoogg...... The Session Log window presents useful
- information about the session. For
- example, when a session is restarted,
- all of the restart commands will be dis-
- played in the log window.
-
- CChheecckkppooiinntt By performing a checkpoint, all applica-
- tions that are in the session are asked
- to save their state. Not every applica-
- tion will save its complete state, but
- at a minimum, the session manager is
- guaranteed that it will receive the com-
- mand required to restart the application
- (along with all command line options).
- A window manager participating in the
- session should guarantee that the appli-
- cations will come back up with the same
- window configurations.
-
- If the session being checkpointed was
- never assigned a name, the user will be
- required to specify a session name.
- Otherwise, the user can perform the
- checkpoint using the current session
- name, or a new session name can be spec-
- ified. If the session name specified
- already exists, the user will be given
- the opportunity to specify a different
- name or to overwrite the already exist-
- ing session. Note that a session which
- is locked can not be overwritten.
-
- When performing a checkpoint, the user
- must specify a SSaavvee TTyyppee which informs
- the applications in the session how much
- state they should save.
-
- The LLooccaall type indicates that the appli-
- cation should save enough information to
- restore the state as seen by the user.
- It should not affect the state as seen
- by other users. For example, an editor
- would create a temporary file containing
- the contents of its editing buffer, the
-
-
-
- X Version 11 Release 6.1 5
-
-
-
-
-
- XSM(1) XSM(1)
-
-
- location of the cursor, etc...
-
- The GGlloobbaall type indicates that the
- application should commit all of its
- data to permanent, globally accessible
- storage. For example, the editor would
- simply save the edited file.
-
- The BBootthh type indicates that the appli-
- cation should do both of these. For
- example, the editor would save the
- edited file, then create a temporary
- file with information such as the loca-
- tion of the cursor, etc...
-
- In addition to the SSaavvee TTyyppee, the user
- must specify an IInntteerraacctt SSttyyllee.
-
- The NNoonnee type indicates that the appli-
- cation should not interact with the user
- while saving state.
-
- The EErrrroorrss type indicates that the
- application may interact with the user
- only if an error condition arises.
-
- The AAnnyy type indicates that the applica-
- tion may interact with the user for any
- purpose. Note that _x_s_m will only allow
- one application to interact with the
- user at a time.
-
-
- After the checkpoint is completed, _x_s_m
- will, if necessary, display a window
- containing the list of applications
- which did not report a successful save
- of state.
-
- SShhuuttddoowwnn A shutdown provides all of the options
- found in a checkpoint, but in addition,
- can cause the session to exit. Note
- that if the interaction style is EErrrroorrss
- or AAnnyy, the user may cancel the shut-
- down. The user may also cancel the
- shutdown if any of the applications
- report an unsuccessful save of state.
-
- The user may choose to shutdown the ses-
- sion with our without performing a
- checkpoint.
-
-
-
-
-
-
- X Version 11 Release 6.1 6
-
-
-
-
-
- XSM(1) XSM(1)
-
-
- HHOOWW _X_S_M RREESSPPOONNDDSS TTOO SSIIGGNNAALLSS
- _x_s_m will respond to a SIGTERM signal by performing a shut-
- down with the following options: fast, no interaction,
- save type local. This allows the user's session to be
- saved when the system is being shutdown. It can also be
- used to perform a remote shutdown of a session.
-
- _x_s_m will respond to a SIGUSR1 signal by performing a
- checkpoint with the following options: no interaction,
- save type local. This signal can be used to perform a
- remote checkpoint of a session.
-
-
- TTHHEE PPRROOXXYY
- Since not all applications have been ported to support the
- X Session Management Protocol, a proxy service exists to
- allow "old" clients to work with the session manager. In
- order for the proxy to detect an application joining a
- session, one of the following must be true:
-
- - The application maps a top level window containing the
- WWMM__CCLLIIEENNTT__LLEEAADDEERR property. This property provides a
- pointer to the client leader window which contains the
- WWMM__CCLLAASSSS, WWMM__NNAAMMEE, WWMM__CCOOMMMMAANNDD, and WWMM__CCLLIIEENNTT__MMAACCHHIINNEE prop-
- erties.
-
- or ...
-
- - The application maps a top level window which does not
- contain the WWMM__CCLLIIEENNTT__LLEEAADDEERR property. However, this top
- level window contains the WWMM__CCLLAASSSS, WWMM__NNAAMMEE, WWMM__CCOOMMMMAANNDD,
- and WWMM__CCLLIIEENNTT__MMAACCHHIINNEE properties.
-
- An application that support the WWMM__SSAAVVEE__YYOOUURRSSEELLFF protocol
- will receive a WWMM__SSAAVVEE__YYOOUURRSSEELLFF client message each time
- the session manager issues a checkpoint or shutdown. This
- allows the application to save state. If an application
- does not support the WWMM__SSAAVVEE__YYOOUURRSSEELLFF protocol, then the
- proxy will provide enough information to the session man-
- ager to restart the application (using WWMM__CCOOMMMMAANNDD), but no
- state will be restored.
-
-
- RREEMMOOTTEE AAPPPPLLIICCAATTIIOONNSS
- _x_s_m requires a remote execution protocol in order to
- restart applications on remote machines. Currently, _x_s_m
- supports the _r_s_t_a_r_t protocol. In order to restart an
- application on remote machine XX, machine XX must have
- _r_s_t_a_r_t installed. In the future, additional remote execu-
- tion protocols may be supported.
-
- SSEEEE AALLSSOO
- smproxy(1), rstart(1)
-
-
-
-
- X Version 11 Release 6.1 7
-
-
-
-
-
- XSM(1) XSM(1)
-
-
- AAUUTTHHOORRSS
- Ralph Mor, X Consortium
- Jordan Brown, Quarterdeck Office Systems
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- X Version 11 Release 6.1 8
-
-
-