|
NAMExsm - X Session ManagerSYNOPSISxsm [-display display] [-session sessionName] [-verbose]DESCRIPTIONxsm is a session manager. A session is a group of applications, each of which has a particular state. xsm 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 "checkpoint" 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. xsm is more powerful because it lets you run applications and have them automatically become part of the session. On a simple level, xsm is useful because it gives you this ability to easily define which applications are in a session. The true power of xsm, however, can be taken advantage of when more and more applications learn to save and restore their state. OPTIONS
SETUP.xsession fileUsing xsm requires a change to your .xsession file:The last program executed by your .xsession file should be xsm. With this configuration, when the user chooses to shut down the session using xsm, 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 session. When xsm shuts down the session, xsm will know to restart these applications. Note however that there are some types of applications that are not "session aware". xsm allows you to manually add these applications to your session (see the section titled Client List). SM_SAVE_DIR environment variableIf the SM_SAVE_DIR environment variable is defined, xsm will save all configuration files in this directory. Otherwise, they will be stored in the user's home directory. Session aware applications are also encouraged to save their checkpoint files in the SM_SAVE_DIR directory, although the user should not depend on this convention.Default Startup ApplicationsThe first time xsm 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. xsm will first look for the file .xsmstartup in the user's home directory. If that file does not exist, it will look for the system.xsm file that was set up at installation time. Note that xsm 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>
STARTING A SESSIONWhen xsm starts up, it first checks to see if the user previously saved any sessions. If no saved sessions exist, xsm starts up a set of default applications (as described above in the section titled Default Startup Applications). If at least one session exists, a session menu is presented. The -session option forces the specified sessionName session to be loaded, bypassing the session menu.The session menuThe 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.The following operations can be performed from the session menu:
CONTROLLING A SESSIONAfter xsm 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 manager's main window will contain the name of the session that was loaded.The following options are available from xsm's main window:
HOW XSM RESPONDS TO SIGNALSxsm will respond to a SIGTERM signal by performing a shutdown 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.xsm 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. THE PROXYSince 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 WM_CLIENT_LEADER property. This property provides a pointer to the client leader window which contains the WM_CLASS, WM_NAME, WM_COMMAND, and WM_CLIENT_MACHINE properties. or ... - The application maps a top level window which does not contain the WM_CLIENT_LEADER property. However, this top level window contains the WM_CLASS, WM_NAME, WM_COMMAND, and WM_CLIENT_MACHINE properties. An application that support the WM_SAVE_YOURSELF protocol will receive a WM_SAVE_YOURSELF 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 WM_SAVE_YOURSELF protocol, then the proxy will provide enough information to the session manager to restart the application (using WM_COMMAND), but no state will be restored. REMOTE APPLICATIONSxsm requires a remote execution protocol in order to restart applications on remote machines. Currently, xsm supports the rstart protocol. In order to restart an application on remote machine X, machine X must have rstart installed. In the future, additional remote execution protocols may be supported.SEE ALSOsmproxy(1), rstart(1)AUTHORSRalph Mor, X ConsortiumJordan Brown, Quarterdeck Office Systems
Visit the GSP FreeBSD Man Page Interface. |