home *** CD-ROM | disk | FTP | other *** search
/ Geek Gadgets 1 / ADE-1.bin / ade-bin / x11r6.1 / man / cat1 / xsm.0 < prev    next >
Encoding:
Text File  |  1996-10-17  |  16.9 KB  |  529 lines

  1.  
  2.  
  3.  
  4. XSM(1)                               XSM(1)
  5.  
  6.  
  7. NNAAMMEE
  8.        xsm - X Session Manager
  9.  
  10. SSYYNNOOPPSSIISS
  11.        xxssmm [-display display] [-session sessionName] [-verbose]
  12.  
  13. DDEESSCCRRIIPPTTIIOONN
  14.        _x_s_m  is a session manager.  A session is a group of appli-
  15.        cations, each of which has a particular state.  _x_s_m allows
  16.        you  to create arbitrary sessions - for example, you might
  17.        have a "light" session, a  "development"     session,  or  an
  18.        "xterminal" session.  Each session can have its own set of
  19.        applications.  Within a session, you can perform a "check-
  20.        point"  to save application state, or a "shutdown" to save
  21.        state and exit the session.  When you log back in  to  the
  22.        system,    you  can  load    a  specific  session, and you can
  23.        delete sessions you no longer want to keep.
  24.  
  25.        Some session managers simply allow you to manually specify
  26.        a list of applications to be started in a session.  _x_s_m is
  27.        more powerful because it lets  you  run    applications  and
  28.        have  them automatically become part of the session.  On a
  29.        simple level, _x_s_m is useful  because  it     gives    you  this
  30.        ability    to easily define which applications are in a ses-
  31.        sion.  The true power of _x_s_m, however, can be taken advan-
  32.        tage  of when more and more applications learn to save and
  33.        restore their state.
  34.  
  35. OOPPTTIIOONNSS
  36.        --ddiissppllaayy _d_i_s_p_l_a_y
  37.            Causes _x_s_m to connect to the specified X     display.
  38.  
  39.        --sseessssiioonn _s_e_s_s_i_o_n_N_a_m_e
  40.            Causes  _x_s_m to load the specified session, bypass-
  41.            ing the session menu.
  42.  
  43.        --vveerrbboossee
  44.            Turns on debugging information.
  45.  
  46. SSEETTUUPP
  47.    ..xxsseessssiioonn ffiillee
  48.        Using _x_s_m requires a change to your _._x_s_e_s_s_i_o_n file:
  49.  
  50.        The last program executed by your _._x_s_e_s_s_i_o_n file should be
  51.        _x_s_m.   With  this  configuration, when the user chooses to
  52.        shut down the session using _x_s_m, the session will truly be
  53.        over.
  54.  
  55.        Since  the  goal     of  the  session  manager  is to restart
  56.        clients when logging into a session, your .xsession  file,
  57.        in  general,  should  not  directly start up applications.
  58.        Rather, the applications should be started within  a  ses-
  59.        sion.   When  _x_s_m shuts down the session, _x_s_m will know to
  60.        restart these applications.  Note however that  there  are
  61.  
  62.  
  63.  
  64. X Version 11           Release 6.1                1
  65.  
  66.  
  67.  
  68.  
  69.  
  70. XSM(1)                               XSM(1)
  71.  
  72.  
  73.        some  types  of applications that are not "session aware".
  74.        _x_s_m allows you to manually add these applications to  your
  75.        session (see the section titled _C_l_i_e_n_t _L_i_s_t).
  76.  
  77.  
  78.    SSMM__SSAAVVEE__DDIIRR eennvviirroonnmmeenntt vvaarriiaabbllee
  79.        If  the    _S_M___S_A_V_E___D_I_R  environment variable is defined, _x_s_m
  80.        will save all configuration files in this directory.  Oth-
  81.        erwise,    they will be stored in the user's home directory.
  82.        Session aware applications are  also  encouraged     to  save
  83.        their  checkpoint  files     in  the  _S_M___S_A_V_E___D_I_R  directory,
  84.        although the user should not depend on this convention.
  85.  
  86.  
  87.    DDeeffaauulltt SSttaarrttuupp AApppplliiccaattiioonnss
  88.        The first time _x_s_m is started, it will need  to    locate    a
  89.        list  of applications to start up.  For example, this list
  90.        might include  a     window     manager,  a  session  management
  91.        proxy,  and  an    xterm.     _x_s_m will first look for the file
  92.        _._x_s_m_s_t_a_r_t_u_p in the user's home directory.   If  that  file
  93.        does not exists, it will look for the _s_y_s_t_e_m_._x_s_m file that
  94.        was set up at installation time.     Note that _x_s_m provides a
  95.        "fail  safe"  option  when  the    user chooses a session to
  96.        start up.  The fail safe option simply loads  the  default
  97.        applications described above.
  98.  
  99.        Each  line in the startup file should contain a command to
  100.        start an application.  A sample startup    file  might  look
  101.        this:
  102.  
  103.        <start of file>
  104.        twm
  105.        smproxy
  106.        xterm
  107.        <end of file>
  108.  
  109.  
  110. SSTTAARRTTIINNGG AA SSEESSSSIIOONN
  111.        When  _x_s_m  starts  up,  it first checks to see if the user
  112.        previously saved     any  sessions.      If  no  saved     sessions
  113.        exist,  _x_s_m  starts  up    a set of default applications (as
  114.        described above in  the    section     titled     _D_e_f_a_u_l_t  _S_t_a_r_t_u_p
  115.        _A_p_p_l_i_c_a_t_i_o_n_s).    If at least one session exists, a session
  116.        menu is    presented.   The  [[--sseessssiioonn  sseessssiioonnNNaammee]]  option
  117.        forces  the  specified session to be loaded, bypassing the
  118.        session menu.
  119.  
  120.    TThhee sseessssiioonn mmeennuu
  121.        The session menu presents the user with a list of sessions
  122.        to  choose  from.   The    user  can  change  the    currently
  123.        selected session with the mouse, or by using  the  up  and
  124.        down arrows on the keyboard.  Note that sessions which are
  125.        locked (i.e. running on a different display)  can  not  be
  126.        loaded or deleted.
  127.  
  128.  
  129.  
  130. X Version 11           Release 6.1                2
  131.  
  132.  
  133.  
  134.  
  135.  
  136. XSM(1)                               XSM(1)
  137.  
  138.  
  139.        The following operations can be performed from the session
  140.        menu:
  141.  
  142.  
  143.        LLooaadd SSeessssiioonn         Pressing this button will    load  the
  144.                  currently    selected session.  Alter-
  145.                  natively,    hitting     the  Return  key
  146.                  will   also   load      the    currently
  147.                  selected session, or  the    user  can
  148.                  double  click  a  session    from  the
  149.                  list.
  150.  
  151.        DDeelleettee SSeessssiioonn         This operation will delete the  cur-
  152.                  rently  selected session, along with
  153.                  all of  the  application  checkpoint
  154.                  files  associated    with the session.
  155.                  After pressing this button, the user
  156.                  will  be asked to press the button a
  157.                  second time in order to confirm  the
  158.                  operation.
  159.  
  160.        DDeeffaauulltt//FFaaiill SSaaffee     _x_s_m  will    start up a set of default
  161.                  applications (as described above  in
  162.                  the  section  titled _D_e_f_a_u_l_t _S_t_a_r_t_u_p
  163.                  _A_p_p_l_i_c_a_t_i_o_n_s).  This is useful  when
  164.                  the user wants to start a fresh ses-
  165.                  sion, or if the  session  configura-
  166.                  tion  files  were    corrupted and the
  167.                  user wants a "fail safe" session.
  168.  
  169.        CCaanncceell             Pressing this button will cause  _x_s_m
  170.                  to     exit.     It  can  also be used to
  171.                  cancel a "Delete Session" operation.
  172.  
  173.  
  174. CCOONNTTRROOLLLLIINNGG AA SSEESSSSIIOONN
  175.        After  _x_s_m  determines which session to load, it brings up
  176.        its main window, then starts up all applications that  are
  177.        part  of     the session.  The title bar for the session man-
  178.        ager's main window will contain the name     of  the  session
  179.        that was loaded.
  180.  
  181.        The  following  options are available from _x_s_m's main win-
  182.        dow:
  183.  
  184.        CClliieenntt LLiisstt     Pressing this button brings up a  window
  185.              containing  a    list  of all clients that
  186.              are in the current  session.    For  each
  187.              client, the host machine that the client
  188.              is running on is presented.  As  clients
  189.              are  added and removed from the session,
  190.              this list  is    updated     to  reflect  the
  191.              changes.   The     user  is able to control
  192.              how these  clients  are  restarted  (see
  193.  
  194.  
  195.  
  196. X Version 11           Release 6.1                3
  197.  
  198.  
  199.  
  200.  
  201.  
  202. XSM(1)                               XSM(1)
  203.  
  204.  
  205.              below).
  206.  
  207.              By  pressing the VViieeww PPrrooppeerrttiieess button,
  208.              the user can view the session management
  209.              properties associated with the currently
  210.              selected client.
  211.  
  212.              By pressing the CClloonnee button,    the  user
  213.              can  start a copy of the selected appli-
  214.              cation.
  215.  
  216.              By pressing the KKiillll CClliieenntt button,  the
  217.              user  can  remove a client from the ses-
  218.              sion.
  219.  
  220.              By selecting a     restart  hint    from  the
  221.              RReessttaarrtt  HHiinntt menu, the user can control
  222.              the restarting of a client.  The follow-
  223.              ing hints are available:
  224.  
  225.              --  The RReessttaarrtt IIff RRuunnnniinngg hint indicates
  226.              that the client should be  restarted  in
  227.              the  next  session if it is connected to
  228.              the session manager at the  end  of  the
  229.              current session.
  230.  
  231.              -- The RReessttaarrtt AAnnyywwaayy hint indicates that
  232.              the client should be  restarted  in  the
  233.              next session even if it exits before the
  234.              current session is terminated.
  235.  
  236.              -- The RReessttaarrtt IImmmmeeddiiaatteellyy hint is  simi-
  237.              lar  to  the RReessttaarrtt AAnnyywwaayy hint, but in
  238.              addition, the client  is  meant  to  run
  239.              continuously.     If the client exits, the
  240.              session manager will try to  restart  it
  241.              in the current session.
  242.  
  243.              --  The RReessttaarrtt NNeevveerr hint indicates that
  244.              the client should not    be  restarted  in
  245.              the next session.
  246.  
  247.              Note  that all X applications may not be
  248.              "session aware".  Applications that  are
  249.              not  session  aware are ones that do not
  250.              support the X Session Management  Proto-
  251.              col  or  they can not be detected by the
  252.              Session Management Proxy (see    the  sec-
  253.              tion  titled _T_H_E _P_R_O_X_Y).  _x_s_m allows the
  254.              user to manually add  such  applications
  255.              to  the  session.   The  bottom  of  the
  256.              _C_l_i_e_n_t _L_i_s_t window contains a text entry
  257.              field    in which application commands can
  258.              be typed in.  Each command should go  on
  259.  
  260.  
  261.  
  262. X Version 11           Release 6.1                4
  263.  
  264.  
  265.  
  266.  
  267.  
  268. XSM(1)                               XSM(1)
  269.  
  270.  
  271.              its  own line.     This information will be
  272.              saved with the session at checkpoint  or
  273.              shutdown  time.   When     the  session  is
  274.              restarted, _x_s_m will restart these appli-
  275.              cations in addition to the regular "ses-
  276.              sion aware" applications.
  277.  
  278.              Pressing the  DDoonnee  button  removes  the
  279.              CClliieenntt LLiisstt window.
  280.  
  281.        SSeessssiioonn LLoogg......     The  Session  Log window presents useful
  282.              information  about  the  session.    For
  283.              example,  when     a  session is restarted,
  284.              all of the restart commands will be dis-
  285.              played in the log window.
  286.  
  287.        CChheecckkppooiinntt     By performing a checkpoint, all applica-
  288.              tions that are in the session are  asked
  289.              to save their state.  Not every applica-
  290.              tion will save its complete  state,  but
  291.              at  a    minimum,  the  session manager is
  292.              guaranteed that it will receive the com-
  293.              mand required to restart the application
  294.              (along with all command  line    options).
  295.              A  window  manager  participating in the
  296.              session should guarantee that the appli-
  297.              cations  will come back up with the same
  298.              window configurations.
  299.  
  300.              If the session     being    checkpointed  was
  301.              never    assigned a name, the user will be
  302.              required  to  specify    a  session  name.
  303.              Otherwise,  the  user    can  perform  the
  304.              checkpoint  using  the     current  session
  305.              name, or a new session name can be spec-
  306.              ified.     If the     session  name    specified
  307.              already  exists,  the user will be given
  308.              the opportunity to specify  a    different
  309.              name  or to overwrite the already exist-
  310.              ing session.  Note that a session  which
  311.              is locked can not be overwritten.
  312.  
  313.              When  performing  a checkpoint, the user
  314.              must specify a SSaavvee TTyyppee  which  informs
  315.              the applications in the session how much
  316.              state they should save.
  317.  
  318.              The LLooccaall type indicates that the appli-
  319.              cation should save enough information to
  320.              restore the state as seen by  the  user.
  321.              It  should  not affect the state as seen
  322.              by other users.  For example, an  editor
  323.              would create a temporary file containing
  324.              the contents of its editing buffer,  the
  325.  
  326.  
  327.  
  328. X Version 11           Release 6.1                5
  329.  
  330.  
  331.  
  332.  
  333.  
  334. XSM(1)                               XSM(1)
  335.  
  336.  
  337.              location of the cursor, etc...
  338.  
  339.              The   GGlloobbaall  type  indicates    that  the
  340.              application should  commit  all  of  its
  341.              data  to  permanent, globally accessible
  342.              storage.  For example, the editor  would
  343.              simply save the edited file.
  344.  
  345.              The  BBootthh type indicates that the appli-
  346.              cation should do  both     of  these.   For
  347.              example,   the     editor     would    save  the
  348.              edited file,  then  create  a    temporary
  349.              file  with information such as the loca-
  350.              tion of the cursor, etc...
  351.  
  352.              In addition to the SSaavvee TTyyppee,    the  user
  353.              must specify an IInntteerraacctt SSttyyllee.
  354.  
  355.              The  NNoonnee type indicates that the appli-
  356.              cation should not interact with the user
  357.              while saving state.
  358.  
  359.              The   EErrrroorrss  type  indicates    that  the
  360.              application may interact with    the  user
  361.              only if an error condition arises.
  362.  
  363.              The AAnnyy type indicates that the applica-
  364.              tion may interact with the user for  any
  365.              purpose.   Note that _x_s_m will only allow
  366.              one application  to  interact    with  the
  367.              user at a time.
  368.  
  369.  
  370.              After    the  checkpoint is completed, _x_s_m
  371.              will, if  necessary,  display    a  window
  372.              containing   the  list     of  applications
  373.              which did not report a     successful  save
  374.              of state.
  375.  
  376.        SShhuuttddoowwnn         A  shutdown  provides all of the options
  377.              found in a checkpoint, but in    addition,
  378.              can  cause  the  session  to exit.  Note
  379.              that if the interaction style is  EErrrroorrss
  380.              or  AAnnyy,  the    user may cancel the shut-
  381.              down.    The  user  may    also  cancel  the
  382.              shutdown  if  any  of    the  applications
  383.              report an unsuccessful save of state.
  384.  
  385.              The user may choose to shutdown the ses-
  386.              sion    with  our  without  performing    a
  387.              checkpoint.
  388.  
  389.  
  390.  
  391.  
  392.  
  393.  
  394. X Version 11           Release 6.1                6
  395.  
  396.  
  397.  
  398.  
  399.  
  400. XSM(1)                               XSM(1)
  401.  
  402.  
  403. HHOOWW _X_S_M RREESSPPOONNDDSS TTOO SSIIGGNNAALLSS
  404.        _x_s_m will respond to a SIGTERM signal by performing a shut-
  405.        down  with  the    following  options: fast, no interaction,
  406.        save type local.     This allows the  user's  session  to  be
  407.        saved  when  the system is being shutdown.  It can also be
  408.        used to perform a remote shutdown of a session.
  409.  
  410.        _x_s_m will respond to  a  SIGUSR1    signal    by  performing    a
  411.        checkpoint  with     the  following     options: no interaction,
  412.        save type local.     This signal can be  used  to  perform    a
  413.        remote checkpoint of a session.
  414.  
  415.  
  416. TTHHEE PPRROOXXYY
  417.        Since not all applications have been ported to support the
  418.        X Session Management Protocol, a proxy service  exists  to
  419.        allow  "old" clients to work with the session manager.  In
  420.        order for the proxy to detect  an  application  joining    a
  421.        session, one of the following must be true:
  422.  
  423.        -  The  application maps a top level window containing the
  424.        WWMM__CCLLIIEENNTT__LLEEAADDEERR     property.   This  property  provides    a
  425.        pointer    to  the     client     leader window which contains the
  426.        WWMM__CCLLAASSSS, WWMM__NNAAMMEE, WWMM__CCOOMMMMAANNDD, and WWMM__CCLLIIEENNTT__MMAACCHHIINNEE prop-
  427.        erties.
  428.  
  429.        or ...
  430.  
  431.        -  The  application maps a top level window which does not
  432.        contain the WWMM__CCLLIIEENNTT__LLEEAADDEERR property.  However, this  top
  433.        level  window  contains the WWMM__CCLLAASSSS, WWMM__NNAAMMEE, WWMM__CCOOMMMMAANNDD,
  434.        and WWMM__CCLLIIEENNTT__MMAACCHHIINNEE properties.
  435.  
  436.        An application that support the WWMM__SSAAVVEE__YYOOUURRSSEELLFF     protocol
  437.        will  receive  a WWMM__SSAAVVEE__YYOOUURRSSEELLFF client message each time
  438.        the session manager issues a checkpoint or shutdown.  This
  439.        allows  the  application to save state.    If an application
  440.        does not support the WWMM__SSAAVVEE__YYOOUURRSSEELLFF protocol,    then  the
  441.        proxy  will provide enough information to the session man-
  442.        ager to restart the application (using WWMM__CCOOMMMMAANNDD), but no
  443.        state will be restored.
  444.  
  445.  
  446. RREEMMOOTTEE AAPPPPLLIICCAATTIIOONNSS
  447.        _x_s_m  requires  a     remote     execution  protocol  in order to
  448.        restart applications on remote machines.      Currently,  _x_s_m
  449.        supports     the  _r_s_t_a_r_t  protocol.      In  order to restart an
  450.        application on remote  machine  XX,  machine  XX  must  have
  451.        _r_s_t_a_r_t installed.  In the future, additional remote execu-
  452.        tion protocols may be supported.
  453.  
  454. SSEEEE AALLSSOO
  455.        smproxy(1), rstart(1)
  456.  
  457.  
  458.  
  459.  
  460. X Version 11           Release 6.1                7
  461.  
  462.  
  463.  
  464.  
  465.  
  466. XSM(1)                               XSM(1)
  467.  
  468.  
  469. AAUUTTHHOORRSS
  470.        Ralph Mor, X Consortium
  471.        Jordan Brown, Quarterdeck Office Systems
  472.  
  473.  
  474.  
  475.  
  476.  
  477.  
  478.  
  479.  
  480.  
  481.  
  482.  
  483.  
  484.  
  485.  
  486.  
  487.  
  488.  
  489.  
  490.  
  491.  
  492.  
  493.  
  494.  
  495.  
  496.  
  497.  
  498.  
  499.  
  500.  
  501.  
  502.  
  503.  
  504.  
  505.  
  506.  
  507.  
  508.  
  509.  
  510.  
  511.  
  512.  
  513.  
  514.  
  515.  
  516.  
  517.  
  518.  
  519.  
  520.  
  521.  
  522.  
  523.  
  524.  
  525.  
  526. X Version 11           Release 6.1                8
  527.  
  528.  
  529.