 |
Index for Section 1 |
|
 |
Alphabetical listing for D |
|
 |
Bottom of page |
|
dtsession(1)
CDE
NAME
dtsession - the CDE Session Manager
SYNOPSIS
dtsession [options]
The dtsession client is automatically invoked by the desktop login manager
dtlogin(1) through the Xsession script. It may also be started through the
Xsession script on an existing X server.
The dtsession session manager automatically starts a window manager.
DESCRIPTION
The dtsession client provides ICCCM 1.1 compliant session management
functionality during a user's session, the time from login to logout. It
launches a window manager and allows for saving a session, restoring a
session, locking a session, launching screen savers and allocating colors
for desktop compatible clients.
Key Supported Tasks
The dtsession client supports the following key tasks:
· Initializing a session
· Launching a window manager
· Restoring a home or current session
· Providing session locking on command or timeout
· Providing session screen saving on command or timeout
· Acting as a color allocation server for other desktop clients
· Saving a home or current session
· Displaying confirmation dialog at logout
· Displaying session selection dialog at logout
· Terminating a session
Sessions
A session is the collection of applications, settings and resources that
are present on the user's desktop. Session management is a set of
conventions and protocols that allow a special session manager such as
dtsession to save and restore a user's session. A user is able to log into
their system and be presented with the same set of running applications,
settings and resources as were present when the user logged off. When a
user logs into the desktop for the first time, a default initial session is
loaded. Afterward, dtsession supports the notion of a current and a home
session.
The Initial Session
When a user logs into the desktop for the first time, dtsession will
generate the user's initial session using system default values. Refer to
Session Resource Management and Session Application Management for more
information.
The Current Session
The user's session that is running is always considered the current
session, whether restored upon login from a saved home session, a saved
current session or the system default initial session. Based on the user's
Style Manager Startup settings, when the user exits the session, the
current session is automatically saved. When the user next logs into the
desktop, the previously saved current session is restarted. This means that
the desktop will be restored to same state as it was when the user last
logged out.
The Home Session
Another option is having the desktop be restored to the same state every
time the user logs in, regardless of its state when the user logged out.
The user may save the state of the current session, then through the Style
Manager Startup settings, have the desktop start that session every time
the user logs in.
Display-Specific Sessions
To run a specific session for a specific display, a user may create a
display-specific session. To do this, the user can copy the
$HOME/.dt/sessions directory to $HOME/.dt/display where display is the
real, unqualified hostname (for example, pablo:0 is valid, pablo.gato.com:0
or local:0 is not). When the user logs in on display pablo:0, that
display-specific session will take precedence.
The ICCCM Session Management Protocol
For an application to be saved upon logout and restarted upon login, it
must participate in a simple session management protocol. Dtsession
supports the ICCCM 1.1 Session Management Protocol.
Applications that want to save their state can take part in the
WM_SAVE_YOURSELF protocol. To do this, an application needs to set the
WM_SAVE_YOURSELF property on one and only one of its top-level windows.
When a session is saved, dtsession will send the application's top-level
window a WM_SAVE_YOURSELF client message. At this point the application can
proceed to quietly save its state. The application cannot interact with the
user in any way as it is saving its state. As an application will likely
save its state into a file, the session manager provides a convenience
function DtSessionSavePath() which returns a full pathname of a file in
which an application can save its state. While the application is saving
its state, dtsession is awaiting notice from the application that it is
done. To tell dtsession that the state save is complete, the application
needs to update the WM_COMMAND property on its top-level window.
The WM_COMMAND property on an application's top-level window serves two
purposes. First, a change of this property is the indication to dtsession
that an application is done saving its state and dtsession can proceed to
the next application. Second, the WM_COMMAND property value is expected to
contain the command line that dtsession will use to restart the application
at session startup. If an application is launched with a full pathname,
then it should use the full pathname when setting WM_COMMAND. Applications
that do not need to save their state, but want to be restarted, can simply
set WM_COMMAND during application startup and forget about it.
Refer to the XmAddWmProtocols(), XmAddWMProtocolCallback() and
XSetCommand() API's for more information.
Restoring a Session
At session startup time, dtsession will determine which session to restore.
The following describes the precedence:
1. Display-specific Current or Home Session
2. Current or Home Session
3. Initial Session
Session Resource Management
The session manager uses the X Server RESOURCE_MANAGER property on which to
make available desktop resources to all applications. The session manager
will load the RESOURCE_MANAGER in the following manner:
1. Load the system default resources
2. Merge any system administrator specified resources
3. Merge any user specified resources
The desktop default resources can be found in
/usr/dt/config/$LANG/sys.resources. These resources will be made available
to each user's session through the RESOURCE_MANAGER property. This file
should not be edited as it will be unconditionally overwritten upon
subsequent desktop installations.
A system administrator may augment the system default resources by creating
/etc/dt/config/$LANG/sys.resources. In this file, a system administrator
may override system default resources or specify additional resources. As
this file is merged into the desktop default resources during session
startup, it is preferable that only new or updated resource specifications
be placed in this file, rather than a copy being made of the desktop
default resource file. Resources specified in this file will be made
available to each user's session through the RESOURCE_MANAGER property.
Resources specified in this file take precedence over those specified in
the desktop default resource file.
A user may augment the desktop default and system administrator resources
through their $HOME/.Xdefaults file. Resources specified in this file will
be made available to only that user's session through the RESOURCE_MANAGER
property. Resources specified in this file take precedence over those
specified in the desktop default or system administrator resource files.
The X Toolkit Intrinsics specifies that it will load resources for an
application from either RESOURCE_MANAGER or from $HOME/.Xdefaults, but not
both. Ordinarily, this would mean that the user's $HOME/.Xdefaults file
would be ignored. However, the session manager accommodates
$HOME/.Xdefaults by merging it into the RESOURCE_MANAGER at session startup
as described above. If a user changes their $HOME/.Xdefaults, their changes
will not be visible to new applications until the user invokes the
ReloadResources action.
The ReloadResources action will instruct the session manager to reload the
RESOURCE_MANAGER with the system, system administrator and user specified
resources. This is useful to make available to new applications changes
made to system administrator or user specified resource files.
See also dtresourcesfile(4) and dtsessionaction(5).
Session Application Management
At session startup, the session manager will restart any applications that
were saved as part of the session. The system default set of applications
to be restored as part of the user's Initial Session can be found in
/usr/dt/config/$LANG/sys.session. This file should not be edited as it will
be unconditionally overwritten upon subsequent desktop installations.
See also dtsessionfile(4).
A system administrator may replace the set of applications that are
restored as part of the user's Initial Session by creating a file named
/etc/dt/config/$LANG/sys.session. Unlike the resource files, this file will
be used as a complete replacement for the desktop default file, so it is
valid to make a copy of the system default file and make any necessary
modifications.
The Window Manager
Dtsession is responsible for starting the window manager. By default
/usr/dt/bin/dtwm is started. An alternate window manager can be specified
with the wmStartupCommand resource. Refer to the Workspace Manager
specification for more information.
The Style Manager
The style manager provides the interface by which a user can change various
desktop and X server settings for the current session. Refer to the Style
Manager specification for more information.
The Color Server
Dtsession serves as the color server for the desktop and provides a set of
resources that can be used to configure it. The foregroundColor resource
controls whether a pixel is allocated for the foreground color. The
dynamicColor resource specifies whether read-only colors are allocated. The
shadowPixmaps resource specifies whether colors are allocated for top
shadow or bottom shadow. The colorUse resource limits color allocation.
Finally, the writeXrdbColors resource specifies whether the *background and
*foreground resources are placed in the resource database. See the Color
Server Resources section and the Color Model specification for more
information.
Session Lock
Dtsession provides session locking. The current session can be locked
directly by pressing the lock icon on the front panel. If supported by the
X server, the current session can be locked after a specified period of
inactivity. To unlock the session, the user must enter their login
password.
By default, dtsession supports traditional local UNIX authentication for
unlocking the session. Additional reauthentication function such as that
required by DCE may be added by individual vendors.
Screen Savers
Dtsession provides support for the launching of external screen savers as a
part of session locking from the front panel or, if supported by the X
server, after a specified period of inactivity. Refer to the Screen Saver
specification for information as to how screen savers are integrated into
the desktop.
X Server Screen Saver Extensions
Dtsession's ability to provide session lock or screen saver launch after a
specified period of inactivity depends upon the availability of an X server
screen saver extension. Dtsession supports the X Consortium Sample X11
Screen Saver Extension 1.0.
Launching the Session Manager
Dtsession should be launched from the Xsession script. Xsession is
described in the login manager specification. It is recommended that
Xsession be launched from dtlogin as part of the login sequence as is the
default but there are alternative methods of starting Xsession:
dtlogin The default dtlogin configuration launches Xsession when a
user logs in
proxy Some systems will allow programs such as xinit, x11start or
startx to start Xsession
OPTIONS
The dtsession client automatically is invoked by the desktop Login Manager
dtlogin(1). dtsession may also be started on an existing X server.
dtsession automatically starts a window manager.
-norestore
This option instructs dtsession not to restore a previous session nor save
the session upon logout.
RETURN VALUE
Exit values are:
0 Successful completion.
>1 Error condition occurred.
EXAMPLES
dtsession -norestore
Start session manager from command line without restoring previous session.
RESOURCES
Color Server
Name ClassClass Type Default
_____________________________________________________
colorUse ColorUse String DEFAULT
dynamicColor DynamicColor Boolean True
foregroundColor ForegroundColor String DYNAMIC
shadowPixmaps ShadowPixmaps String DEFAULT
writeXrdbColors WriteXrdbColors Boolean True
Screen Lock/Screen Save
Name ClassClass Type Default
___________________________________________________________
keys Keys unsigned char NULL
passwordTimeout passwordTimeout unsigned int 10
Miscellaneous
Name ClassClass Type Default
_____________________________________________________________________
queryServerSettings QueryServerSettings Boolean False
saveFontPath SaveFontPath Boolean False
wmStartupCommand WmStartupCommand executable path NULL
colorUse - DEFAULT
This resource specifies the number of colors to use for the user interface.
Valid types are: Color server will determine type of monitor based upon
number of display planes of the screen as follows:
1,2 or 3 planes
B_W
Specifies a black-and-white system. The color palettes will use
two color cells for the user interface. In this configuration
only two color palettes are available: BlackWhite and
WhiteBlack. These palettes cannot dynamically change. To
change a palette, all applications using that color palette
must be restarted. This resource value forces ShadowPixmaps to
True, and ForegroundColor to either black or white depending on
the palette chosen.
4 or 5 planes
LOW_COLOR
Specifies a low-color system. The color palettes will have two
color sets and use a maximum of 12 color cells for the user
interface, including black and white (color cells 0 and 1). The
number of co ShadowPixmaps and ForegroundColor.
6 planes MEDIUM_COLOR
Specifies a medium-color system. The color palettes will have
four color sets and use a maximum of 22 color cells for the
user interface, including black and white (color cells 0 and
1). The number of color cells can be reduced by using the
resources ShadowPixmaps and ForegroundColor.
7+ planes HIGH_COLOR
Specifies a high-color system. The color palettes will have
eight color sets and use a maximum of 42 color cells for the
user interface, including black and white (color cells 0 and
1). The number of color cells can be reduced by using the
resources ShadowPixmaps and ForegroundColor.
dynamicColor
This resource can have values of True or False. The dynamicColor resource
is used to reduce the number of color cells being used. Once a palette has
been selected and it is not likely to be changed, dynamicColor can be set
to False. If set to False colors cannot be dynamically changed using the
desktop style manager. A selected palette will take effect the next
session. The next time the session comes up, the color server uses Read
Only color cells that can be shared by all clients, thus reducing the
number of color cells used.
foregroundColor
This resource can have values of White, Black or Dynamic. ForegroundColor
causes all text (foreground) to use either pixel 0 or 1 (Black or White) or
to have a color cell dedicated to foreground and changes in response to the
background color (Dynamic) for each ColorSet. If set to White or Black, the
number of color cells used per ColorSet is reduced by 1.
keys
This resource is a list of keyholders who have the ability to unlock the
screen any time it is locked by the user. The list is a list of user id's
separated by commas. For example if user kim has the following resource
active during a session:
Dtsession*keys: fred,keith
Users fred and keith have the ability to unlock the display when kim locks
it.
passwordTimeout
This resource specifies (in seconds) the amount of time before the password
dialog is removed from the screen. When the display is locked, the pointer
shows a lock cursor, and a dialog appears which asks for the user password.
If no activity from the pointer or keyboard is detected for passwordTimeout
seconds, the dialog is removed from the screen. The dialog is redisplayed
as soon as a pointer or keyboard event is detected. An passwordTimeout of 0
leaves the password dialog in place for the entire time the display is
locked. The default value is 10 seconds.
queryServerSettings
This resource specifies whether dtsession queries the server at logout for
all its settings or saves only those settings set by using the desktop
Style Manager. Querying the server ensures that all settings are saved;
however, there is a degradation in performance when a full query is done.
The default value is False, which means that the server will not be
queried.
shadowPixmaps
For color systems, this resource can have a value of True or False. If
True, topShadowColor and bottomShadowColor use the same pixel as background
and topShadowPixmap and bottomShadowPixmap are specified instead of solid
color to create the 3D look. This reduces the number of color cells per
ColorSet by 2. ShadowPixmaps defaults to True for systems with 4 or less
color planes (16 or less color cells), and False for systems with more than
4 color planes.
wmStartupCommand
This resource allows for an alternate window manager to be started at
login. If this resource is NULL , dtsession starts /usr/dt/bin/dtwm. An
alternate startup might look like: Dtsession*wmStartupCommand:
/usr/bin/X11/mwm
The command should not have any commands to a shell in it, and that it
should not be surrounded by quotes. Also, if any other window manager other
than dtwm is used, clients will be restored, but may not be restored to the
correct position. By default, this resource contains a NULL value.
FILES
/usr/dt/config/$LANG/sys.session
The desktop default set of applications for the user's
Initial Session.
/etc/dt/config/$LANG/sys.session
System Administrator specified set of applications for the
user's Initial Session.
/usr/dt/config/$LANG/sys.resources
The desktop default resources.
/etc/dt/config/$LANG/sys.resources
System administrator specified resources.
$HOME/.Xdefaults
User-specified resources.
Dtsession stores session information in $HOME/.dt/display or
$HOME/.dt/sessions. The content of these directories should not be directly
edited by the user.
/usr/dt/app-defaults/$LANG/Dtsession
Default dtsession resources.
SEE ALSO
See related specifications:
dtstyle Customization of many session properties
dtscreen Desktop screen savers
dtwm Window manager
dtlogin Login manager
dtsessionaction
Session manager actions
dtsessionfile Format and location of desktop session files
dtresourcesfile
Format and location of desktop resource files
 |
Index for Section 1 |
|
 |
Alphabetical listing for D |
|
 |
Top of page |
|