DTSESSION(1)
π dtsession β NAME π
okay so welcome to dtsession(user cmd), bestie π
this page is literally all about dtsession β the CDE Session Manager, and it's the β¨main characterβ¨ of your entire desktop life. she runs the whole "hello you're logged in β okay bye you're logged out" era and keeps every app's vibe intact. buckle up, this one's a long one π¦
β¨ SYNOPSIS β¨
dtsession [-norestore] [-session session_name]
that's it. that's the whole launch ritual. two flags. iconic. π
π DESCRIPTION π
The dtsession client gives you X11R6 XSMP-compliant session management (and, by proxy, ICCCM 1.1-compliant session management too) during a user session β and a "user session" just means the stretch of time from login to logout. that's the whole window. πΈ
what does she actually do, you ask? glad you asked:
- she launches a window manager (yes, the actual WM β she's the plug π)
- she lets you save a session, restore a session, lock a session
- she launches screen savers
- she allocates colors for desktop-compatible clients
not her being the entire infrastructure or whatever π
π Key Supported Tasks
the dtsession client supports these key tasks, and ngl it's a list:
- Initializing a session.
- Launching a window manager.
- Restoring a home, current, display-specific home, or display-specific 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 DT clients.
- Saving a home, current, display-specific home, or display-specific current session.
- Displaying confirmation dialog at logout.
- Displaying session selection dialog at logout.
- Terminating a session.
like she does everything. periodt. π
π¦ A Session
so what even is a session? a session is the collection of applications, settings and resources that are present on the user's desktop. simple as that. β¨
session management is a set of conventions and protocols that let a special session manager (hi, that's dtsession π«Ά) save and restore a user's session. the dream is: you log into your system and get presented with the exact same set of running applications, settings and resources that were there when you logged off. nothing moved. nothing changed. immaculate continuity.
when a user logs into the desktop for the very first time, a default initial (new user) session is loaded. afterward, dtsession supports the notion of a current, a home, and a display-specific session β and a display-specific one may be either current or home. iykyk π
π± The Initial Session
first login ever? when a user logs into the desktop for the first time, dtsession will generate the user's initial session using system default values. π£
the initial session is sometimes referred to as the "new user" session" β okay not the extra quote, it's the "new user" session. refer to Session Resource Management and Session Application Management for more info. (one of those is further down this very page, stay tuned π)
π₯ The Current Session
the user's running session is always considered the current session β no cap. whether it got restored upon login from a saved home session, a saved current session, or the system default initial session, it's current. that's just how she is.
based on the user's Style Manager Startup settings, when the user exits the session, the current session is automatically saved. π so thoughtful. then when the user next logs into the desktop, dtsession lets the user select that previously saved current session as the session to start. meaning: the desktop gets restored to the same state it was in when the user last logged out. the way that works is genuinely so satisfying.
π The Home Session
other option, other vibe: have the desktop restored to the same state every single time the user logs in, regardless of what state it was in when the user logged out. frozen in time. π§β¨
the user may save the state of the current session, then β via the Style Manager Startup settings β have the desktop start that session every time the user logs in. alternatively, dtsession will let the user select the home session as the session to start at login. either route, you land in the same cozy place. π
π₯οΈ Display-specific Sessions
want a specific session for a specific display? bestie, you can have a display-specific session, it's not a myth.
to do this, copy the $HOME/.dt/sessions directory to the $HOME/.dt/sessions/display directory, where display is the real, unqualified hostname. and listen β pablo:0 is valid, pablo.gato.com:0 or local:0 is not. them's the rules. π
when the user logs in, dtsession will let them select a display-specific home or current session as the session to start. Dtsession will actually launch the session only if it is compatible with the user's login display. so yes she gatekeeps a little, but for good reason π
π The X11R6 XSMP Session Management Protocol
okay this is the big one. for an application to be saved upon logout and restarted upon login, it has to participate in a simple session management protocol, and dtsession supports the X11R6 XSMP Session Management Protocol. π₯
applications that wish 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. (one! not two! she checks! π)
when the user presses the Set Home Session button in the Style Manager, dtsession sends a SaveYourself message to the top-level window of each of its clients. that message sets the save-type to Local, shutdown to 0, interact-style to None and fast to 0.
when an application receives the message, it sends a SaveYourselfPhase2Request message to the Session Manager, which will reply with a SaveYourselfPhase2 message. only when the Window Manager receives the SaveYourselfPhase2 message will it save its state. the information saved by the Window Manager for each of its client's set of windows will include: geometry, icon state and workspace. β¨
if interact-style on the initial SaveYourself message is None, the application cannot interact with the user in any way while it's saving its state. if it's Any, the application can interact with the user for any purpose β including de-iconifying itself and changing its current workspace. πͺ
to minimize confusion, the Session Manager issues a ToolTalk message to the Window Manager requesting the recommended order to interact. the Window Manager responds with the list of SM_CLIENT_IDs and their associated workspace numbers, in workspace order. after receiving an Interact message (with interact-style set to Any), an application should go system-modal to prevent other, less well-behaved non-interacting applications from allowing user interaction while the application is interacting with its user. yes, she's asking everyone to be considerate. the audacity of the badly behaved apps, honestly π
because an application will usually save its state into a file, the Session Manager provides DtSessionSavePath as a convenience function that returns a full pathname of a file in which an application can save its state. while the application is saving its state, dtsession awaits notice from the application that it's done. to tell dtsession that the state save is complete, the application updates the WM_COMMAND property on its top-level window. π«Ά
the WM_COMMAND property on an application's top-level window serves two purposes:
- a change of this property is the indication to
dtsessionthat an application is done saving its state, anddtsessioncan proceed to the next application. - the
WM_COMMANDproperty value is expected to contain the command line thatdtsessionwill 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 don't need to save their state but still want to be restarted can simply set WM_COMMAND during application startup and forget about it. set it and forget it, that's the energy β
refer to the XmAddWmProtocols, XmAddWMProtocolCallback, and XSetCommand APIs for more information.
in addition to the "save-yourself" client session management support, the X11R6 XSMP protocol provides the following features (and these are not found in the ICCCM protocol, so like, enjoy):
- It allows applications to interact with the user during normal shut down to confirm or discard unsaved changes.
- It provides a mechanism to explicitly tell applications to exit.
- Most importantly, it provides a common framework to support applications that are not X clients and applications that exit before the session is saved but that must remain part of the session for restart purposes (for example, an input method server).
that last one is genuinely such an underrated flex π
π«Ά The ICCCM Session Management Protocol
dtsession implements the X11R6 XSMP session management protocol and provides backward compatibility by acting as a proxy for client applications that continue to use the older ICCCM session management protocol. both eras welcome at her table. π
π Restoring A Session
at session startup time, dtsession presents a dialog that lets the user select which of the following sessions to start:
- Current β Start the user's most recent session.
- Home β Start the user's home session.
- display-name - Current β Create a new display-specific session and start the first of the following sessions that exists:
- display-specific Home
- generic Home
- new user (initial) session
- display-name - Home β Create a new display-specific session and start the user's generic home session if it exists. Otherwise, start a new user session.
- Fail-safe Session β Start a fail-safe session (
Xfailsafe).
although a user's list of sessions isn't known until after the user logs in, the dialog presents all of the session choices. (she's manifesting your sessions before they exist, that's just her thing β¨)
if a user selects a session that doesn't exist, dtsession takes the following actions. if the user selects:
- Home β
dtsessionstarts a new user session. - Current β
dtsessionstarts the user's home session if it exists. if it does not, it starts a new user session.
if the user selects a display-specific session and one does not exist, dtsession posts a warning dialog stating that a new session will be created. the warning dialog contains three buttons:
- Cancel Login β Cancels the login and returns the user to the login screen.
- OK β If a display-specific Home session was selected,
dtsessioncreates a new display-specific session and starts the user's generic home session if it exists. If it does not exist, it starts a new user session.
If a display-specific Current session was selected, dtsession creates a new display-specific session and starts a display-specific home, generic home, or new user session, depending on which it finds first.
- Help β Displays help text about the warning dialog.
three buttons, three paths, no ambiguity. she's organized like that π
π¨ 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:
- load the system default resources, AND
- merge any system administrator specified resources, AND
- merge any user specified resources.
(and yes, the ANDs are load-bearing, they're literally in caps in the original, respect them π
)
the desktop default resources can be found in /nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/config/$LANG/sys.resources. these resources will be made available to each user's session via the RESOURCE_MANAGER property.
π¨ do NOT edit this file, bestie. it should not be edited as it will be unconditionally overwritten upon subsequent desktop installations. your edits will vanish into the void and you'll be sad. i'm warning you out of love ππ«Ά
Okay so system admins can totally level up the system default resources by creating this file, bestie:
/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/etc/config/$LANG/sys.resources
In that file, a system administrator can override system default resources or add extra ones. And because this file gets merged into the desktop default resources during session startup, itβs preferable to put only new or updated resource specs in there β not a whole copy of the desktop default resource file, okay? Resources specified here get made available to each userβs session through the RESOURCE_MANAGER property, and they take precedence over the desktop default resource file. Slay.
A user can also augment the desktop default and system administrator resources via their $HOME/.Xdefaults file. Resources in this file are made available to only that userβs session via the RESOURCE_MANAGER property, and they take precedence over the desktop default or system administrator resource files. Periodt.
Note: The X Toolkit Intrinsics specifies that it will load resources for an application from eitherRESOURCE_MANAGERor from$HOME/.Xdefaults, but not both. Ordinarily, that would mean the userβs$HOME/.Xdefaultsfile would be ignored. However, the session manager accommodates$HOME/.Xdefaultsby merging it into theRESOURCE_MANAGERat session startup as described above. If a user changes$HOME/.Xdefaults, those changes will not be visible to new applications until the user invokes theReloadResourcesaction. π
The ReloadResources action tells the session manager to reload the RESOURCE_MANAGER with the system, system administrator, and user specified resources. Itβs useful for making changes to system administrator or user specified resource files available to new applications. Fr fr.
See also dtresourcesfile(4) and dtsessionaction(5).
π«Ά Session Application Management π«Ά
At session startup, the session manager restarts 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 lives here:
/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/config/$LANG/sys.session
Do not edit this file β it will be unconditionally overwritten upon subsequent desktop installations. Not me warning you twice. π
See also dtsessionfile(4).
A system administrator may replace the set of applications restored as part of the userβs Initial Session by creating a file named:
/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/etc/config/$LANG/sys.session
Unlike the resource files, this one is used as a complete replacement for the desktop default file β so yes, it is valid to make a copy of the system default file and make any necessary modifications. Iconic behavior, honestly.
π Session Manager Authentication π
The Session Manager uses ICE-based authentication as described in the Inter-Client Exchange (ICE) Library v1.0. Itβs built with a table of available authentication protocols, and selection of the protocol is done via the AuthName resource.
The AuthName default is the string MIT-MAGIC-COOKIE-1. The Session Manager supports the same protocols as the Login Manager. No cap.
πͺ The Window Manager πͺ
dtsession is responsible for starting the window manager. By default, this one gets started:
/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/bin/dtwm
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. Itβs giving customization, and we love that.
π 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, bestie. Letβs vibe check them:
- The
foregroundColorresource controls whether a pixel is allocated for the foreground color. - The
dynamicColorresource specifies whether read-only colors are allocated. - The
shadowPixmapsresource specifies whether colors are allocated for top shadow or bottom shadow. - The
colorUseresource limits color allocation. - Finally, the
writeXrdbColorsresource specifies whether the*backgroundand*foregroundresources are placed in the resource database.
See the Color Server Resources section for more information. β¨
π The Color Sharing Protocol π
The CDE desktop makes use of a color sharing protocol between dtsession and the rest of the desktop (dtstyle in particular) and Motif. This protocol allows:
- Non-CDE (non Motif/XmColorObject) applications to make use of the CDE color scheme.
- Applications (Motif or not) that create their own private colormap to copy the
dtsessiondesktop pixels and avoid or limit technicolor effect. - Motif applications to easily share the desktop GUI pixels when they use a private colormap.
The color sharing protocol involves:
- The selection name (
CUSTOMIZE_DATA), type (TYPE_OF_MONITOR), and format used bydtsessionto communicate the monitor characterization todtstyle(or any other style manager). - The selection name (
CUSTOMIZE_DATA), type (PIXEL_SET), and format used bydtsessionto communicate its palette pixel ids to the ColorObject (inlibXm) and todtstyle. - Two functions (
XmeGetColorObjDataandXmeGetColorObjCells) that deliver the desktop pixels to the application in a form easily suitable for its use (XColor).
A Color Set is a set of five colors that are used to represent a single logical color in the Motif toolkit. For each background color (the logical color), there are associated top shadow, bottom shadow, foreground, and select colors, all generated from the background color. These associated colors are the mechanism for giving widgets their 3-D appearance. Obsessed with the little 3-D moment.
A Color Palette is a named set of a maximum of eight background colors. A single palette is used to color the desktop components. A list of default palettes is provided from which the user can select. The user can also add and delete palettes, as well as modify an existing palette. Main character energy for real.
dtsession, the color server, uses ICCCM X Selection based mechanisms to communicate color use, palette and color set pixel information to the desktop clients.
The name of the (CUSTOMIZE_DATA) selection is the atom Customize Data:i, where i is the screen number.
The names of the targets are the atoms Type Of Monitor and Pixel Sets.
π¦ Type of Monitor Target π¦
The Type Of Monitor target is used to convey color settings to the desktop clients, such as dtstyle or the Motif toolkit, that need this information. The content corresponds to the value of the dtsession color usage resources.
When asked to convert the screen Customize Data:i selection to the target Type Of Monitor, the format and content encoding used is the following:
type:STRINGlength:20format:8content: a series of 4 numbers, in hexadecimal format, separated by the underscore (_) character (that is, using theprintf/scanfformat%x_%x_%x_%x), and including from left to right:- The
colorUseresource, which corresponds to the type of monitor in use by the desktop.B_W = 0LOW_COLOR = 1MEDIUM_COLOR = 2HIGH_COLOR = 3
- The
shadowPixmapsresource, which controls if dithered pixmaps are used to render the shadows in the target GUI.FALSE = 0TRUE = 1
- The
foregroundColorresource, which controls whether or not a pixel was allocated for the foreground or ifWhitePixelorBlackPixelis used.DYNAMIC = 0BLACK = 1WHITE = 2
- The
dynamicColorresource, which controls whether or not the pixels allocated are read/write or read-only cells.FALSE = 0TRUE = 1
- The
This information, especially dynamicColor, is currently used only by dtstyle in CDE to implement the color manager GUI. Iykyk.
π Pixel Sets Target π
The Pixel Sets target is used to convey palette and color set pixel information to the desktop clients. The content is always 8 color set values, but depending on the color usage settings, some entries will be duplicated. For the receiver of this information, however, it simply means it can access the index as specified in the high color scheme.
When asked to convert the screen Customize Data:i selection to the target Pixel Sets, the format used is the following:
type:STRINGlength:400format:8content: a first number (%x_) for thecolorUseresource (see βType of Monitor Targetβ above for encoding) and a series of 8 (corresponding to the maximum number of color sets in CDE) sets of 5 numbers, in hexadecimal format (%x_%x_%x_%x_%x), each describing from left to right:- background pixel (
bg) - foreground pixel (
fg) - top_shadow pixel (
ts) - bottom_shadow pixel (
bs) - select_color pixel (
sc)
- background pixel (
The mapping between color set Ids and colorUse is as follows:
HIGH_COLOR- 3. Active window borders.
- 4. Inactive window borders.
- 5. Switch for workspace 1 and every fourth additional workspace (workspace 5, 9,...).
- 6. Text and list areas.
- 7. Main window background (
primaryColorSetId) and switch for workspace 4 and every fourth additional workspace (workspace 8, 12,...). - 8. Dialog box background and menu bar (
secondaryColorSetId) and switch for workspace 3 and every fourth additional workspace (workspace 7, 11,...). - 9. Switch for workspace 2 and every fourth additional workspace (workspace 6, 10, ...).
- 10. Front panel background.
MEDIUM_COLOR- 11. Active window borders.
- 12. Window bodies:
- Inactive window borders
- Main window and dialog box backgrounds and menu bar
- Front Panel background
- 13. Workspace switches and backgrounds
- 14. Text and list backgrounds πΈ
- same as 2
- same as 2
- same as 3
- same as 2
LOW_COLORandBLACK_WHITEβ bestie this is the short stack, and here's how it breaks down:- Active window borders.
- Everything else.
.. to 8: same as 2.
Okay so for each color set, the cell allocation scheme is Literally This (and dynamicColor is what decides whether the pixels get allocated read/write or read-only β big mood, very important):
HIGH_COLORΒ·shadowPixmapsFALSEΒ· foregroundDYNAMICΒ· cells(fg,bg,ts,bs,sc)Β· number5*8 = 40HIGH_COLORΒ·shadowPixmapsFALSEΒ· foregroundBLACKorWHITEΒ· cells(bg,ts,bs,sc)Β· number4*8 = 32HIGH_COLORΒ·shadowPixmapsTRUEΒ· foregroundDYNAMICΒ· cells(fg,bg,sc)Β· number3*8 = 24HIGH_COLORΒ·shadowPixmapsTRUEΒ· foregroundBLACKorWHITEΒ· cells(bg,sc)Β· number2*8 = 16MEDIUM_COLORΒ·shadowPixmapsFALSEΒ· foregroundDYNAMICΒ· cells(fg,bg,ts,bs,sc)Β· number5*4 = 20MEDIUM_COLORΒ·shadowPixmapsFALSEΒ· foregroundBLACKorWHITEΒ· cells(bg,ts,bs,sc)Β· number4*4 = 16MEDIUM_COLORΒ·shadowPixmapsTRUEΒ· foregroundDYNAMICΒ· cells(fg,bg,sc)Β· number3*4 = 12MEDIUM_COLORΒ·shadowPixmapsTRUEΒ· foregroundBLACKorWHITEΒ· cells(bg,sc)Β· number2*4 = 8LOW_COLORΒ·shadowPixmapsFALSEΒ· foregroundDYNAMICΒ· cells(fg,bg,ts,bs,sc)Β· number5*2 = 10LOW_COLORΒ·shadowPixmapsFALSEΒ· foregroundBLACKorWHITEΒ· cells(bg,ts,bs,sc)Β· number4*2 = 8LOW_COLORΒ·shadowPixmapsTRUEΒ· foregroundDYNAMICΒ· cells(fg,bg,sc)Β· number3*2 = 6LOW_COLORΒ·shadowPixmapsTRUEΒ· foregroundBLACKorWHITEΒ· cells(bg,sc)Β· number2*2 = 4B_WΒ·shadowPixmapsTRUEΒ· foregroundoppositeΒ· cellsBGΒ· number0
π Session Lock
Dtsession provides session locking, and honestly? Iconic security behavior. You can lock the current session directly by pressing the lock icon on the front panel. And if the X server supports it, the current session can also be locked after a specified period of inactivity β¨. To unlock the session, the user must enter their login password β no shortcuts, no vibes-only entry, actual password. π
By default, dtsession supports traditional local UNIX authentication for unlocking the session. Additional re-authentication functions β like the ones DCE requires β may be added by individual vendors.
πΌοΈ Screen Savers
Dtsession provides support for launching external screen savers as part of session locking from the front panel, or β if the X server supports it β after a specified period of inactivity. For the deets on how screen savers get integrated into the desktop, refer to the Screen Saver specification. π
π₯οΈ X Server Screen Saver Extensions
Real talk: dtsession's ability to provide session lock or screen saver launch after a specified period of inactivity depends on whether an X server screen saver extension is even available. dtsession supports two such extensions:
- X Consortium Sample X11 Screen Saver Extension 1.0
- HP X Screen Saver Extension
The ability of dtsession to recognize both, either or none of these extensions is vendor specific. (So likeβ¦ ask your vendor, bestie. π)
π Launching The Session Manager
dtsession should be launched from the Xsession script. Xsession is described in the login manager specification. It's recommended that Xsession be launched from dtlogin as part of the login sequence as the default β but there are alternative methods of starting Xsession:
dtloginβ the defaultdtloginconfiguration launchesXsessionwhen a user logs inproxyβ some systems will allow programs such asxinit,x11startorstartxto startXsession
π§ Starting Services Before the Session Manager
If you must start a service after login but before the Session Manager (for example, an input method server β very much a thing), start the service by placing a script in the fdirectory /nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/config/Xsession.d.
To avoid being restarted by the Session Manager when a session is started, a service that must be started before the Session Manager should explicitly set theRestartStyleHintproperty toRestartNever(possibly by setting an Xt resource). This is the "please do not perceive me" setting, fr fr.
β¨ OPTIONS β¨
The dtsession client is automatically invoked by the DT Login Manager (dtlogin). But if you want, dtsession may also be started on an existing X server. Heads up though: dtsession automatically starts a window manager. π
The following options are available:
-norestoreβ Instructsdtsessionnot to restore a previous session, and also not to save the session upon logout. Fresh start energy only. πΈ-sessionsession_nameβ Instructsdtsessionto start the specified session. Valid session names are:currenthomedisplay_name:display_number /currentdisplay_name:display_number /home
where display_name is the unqualified display host name and display_number is the display number. π¦
π RETURN
Exit values are:
0β Successful completion. Slay. π>1β Error condition occurred. Not slay. π
π EXAMPLES
dtsession -norestore
Start session manager from command line without restoring previous session. No baggage, no old tabs open, just vibes. β¨
β¨ RESOURCES β¨
Okay bestie, this is the part where you get to customize everything. Each resource has a Name, a Class, a Type, and a Default β I'm listing them all below so nothing gets lost, no cap. π
π¨ Color Server
colorUseβ classColorUse, typeString, defaultDEFAULTdynamicColorβ classDynamicColor, typeBoolean, defaultTrueforegroundColorβ classForegroundColor, typeString, defaultDYNAMICshadowPixmapsβ classShadowPixmaps, typeString, defaultDEFAULTwriteXrdbColorsβ classWriteXrdbColors, typeBoolean, defaultTrue
π Screen Lock/Screen Save
keysβ classKeys, typeunsigned char, defaultNULLpasswordTimeoutβ classpasswordTimeout, typeunsigned int, default10
π§ Miscellaneous
AuthNameβ classAuthName, typeString, defaultDEFAULTIgnoreEnvironmentβ classIgnoreEnvironment, typeString, defaultNULLqueryServerSettingsβ classQueryServerSettings, typeBoolean, defaultFalseNumSessionsBackedupβ classNumSessionsBackedup, typeunsigned int, default2saveFontPathβ classSaveFontPath, typeBoolean, defaultFalsewmStartupCommandβ classWmStartupCommand, typeexecutable path, defaultNULLtgroup dispwid="5.87in"β yes queen, that's literally how it's printed π
π AuthName
This resource tells dtsession which authentication protocol to use. The default is the string MIT-MAGIC-COOKIE-1. And fun fact: dtsession supports the exact same protocols as dtlogin. π«Ά
π colorUse - DEFAULT
This one sets how many colors the user interface gets to use. Valid types are: the color server figures out the monitor type by peeping the number of display planes on the screen, like so:
1,2βB_W4βLOW_COLOR6βMEDIUM_COLOR7+βHIGH_COLORB_Wβ a black and white system, bestie. The color palettes use two color cells for the UI. In this setup only two palettes exist:BlackWhiteandWhiteBlack. These palettes cannot dynamically change β to switch a palette, every app using it has to be restarted. This value forcesShadowPixmapstoTrue, andForegroundColorto either black or white depending on which palette you picked.LOW_COLORβ a low color system. The palettes get two color sets and use a max of 12 color cells for the UI, including black and white (color cells0and1). The number of coShadowPixmapsandForegroundColor. (Not me, that's literally what the page says π)MEDIUM_COLORβ a medium color system. The palettes get 4 color sets and use a max of 22 color cells for the UI, including black and white (color cells0and1). You can shrink the number of color cells by using the resourcesShadowPixmapsandForegroundColor.HIGH_COLORβ a high color system. The palettes get 8 color sets and use a max of 42 color cells for the UI, including black and white (color cells0and1). Again, the cell count can be reduced withShadowPixmapsandForegroundColor.
π¦ dynamicColor
Values: True or False. This one exists purely to reduce how many color cells get used up. Once you've picked a palette and you're not planning to switch it, set dynamicColor to False β iconic efficiency move. If it's False, colors cannot be dynamically changed using the DT style manager, and the palette you selected takes effect the next session. Next time the session comes up, the color server uses Read Only color cells that all clients can share, which means fewer color cells overall. Slay. β¨
πΈ foregroundColor
Values: White, Black, or Dynamic. ForegroundColor makes all text (that's the foreground, babe) use either pixel 0 or 1 (Black or White), or gives the foreground its own dedicated color cell that reacts to the background color (Dynamic) for each ColorSet. If you set it to White or Black, the number of color cells used per ColorSet drops by 1. Less is more, periodt.
π keys
This is a list of the keyholders who can unlock the screen any time the user locks it. It's a list of user ids, separated by commas. Say user kim has this resource active during a session:
Dtsession*keys: fred,keith
Then fred and keith both have the power to unlock the display whenever kim locks it. Main character energy for everyone involved. π
β³ passwordTimeout
Sets (in seconds) how long before the password dialog bounces off the screen. When the display is locked, the pointer shows a lock cursor and a dialog pops up asking for the user password. If there's zero pointer or keyboard activity for passwordTimeout seconds, the dialog is removed. It comes right back the moment any pointer or keyboard event is detected. A passwordTimeout of 0 leaves the password dialog in place for the entire time the display is locked. Default value: 10 seconds.
π§ queryServerSettings
This decides whether dtsession queries the server at logout for all its settings, or only saves the settings that were set using the DT Style Manager. Querying the server guarantees everything gets saved β but ngl, there's a performance hit when a full query happens. Default is False, which means the server will not be queried.
πΎ NumSessionsBackedup
Sets how many checkpoints to keep. When a session's checkpoint count goes over this value, the DiscardCommand properties for the oldest session get executed and the oldest checkpoint is removed. Default: 2.
π shadowPixmaps
For color systems, values are True or False. If True, topShadowColor and bottomShadowColor use the same pixel as background, and topShadowPixmap and bottomShadowPixmap are specified instead of a solid color to create that 3D look. This cuts the number of color cells per ColorSet by 2. ShadowPixmaps defaults to True on systems with 4 or fewer color planes (16 or fewer color cells), and False on systems with more than 4 color planes.
πͺ wmStartupCommand
Lets you start an alternate window manager at login. If this resource is NULL, dtsession starts /nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/bin/dtwm. An alternate startup might look like:
Dtsession*wmStartupCommand: /usr/bin/X11/mwm
Note: the command should not have any commands to a shell in it, and it should not be surrounded by quotes. Also, if you use any window manager other thandtwm, clients will be restored β but they may not be restored to the correct position. By default, this resource contains aNULLvalue. π
π FILES π
/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/config/$LANG/sys.sessionβ the desktop default set of applications for the user's Initial Session./nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/etc/config/$LANG/sys.sessionβ the System Administrator specified set of applications for the user's Initial Session./nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/config/$LANG/sys.resourcesβ the desktop default resources.$HOME/.dt/startlogβ a log of processes started by the Xsession script. This file is used only to help diagnose session startup problems.$HOME/.dt/session/session_name/db.sessionβ the CDE1.0 database file maintained for each session.$HOME/.dt/sessionlogsβ whendtsessionis started by the Xsession script, its stderr is duplicated to a session-specific file in$HOME/.dt/sessionlogs, so all stderr written by apps started bydtsessiongets logged in this file. The name of the file used ishost_name_DISPLAY=$DISPLAY, wherehost_nameis the name of the host where the session was started.$HOME/.dt/session_dir/session_name/dtsession.dbβ the CDEnext database file maintained for each session, wheresession_dirissessionsor the display name for display-specific, andsession_nameis eitherhomeorcurrent. CDEnext session databases supersede CDE1.0 session databases. Upgrade era, honestly. π/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/etc/config/$LANG/sys.resourcesβ system administrator specified resources.$HOME/.Xdefaultsβ user specified resources.
Also, bestie, Dtsession stores session information in $HOME/.dt/sessions or $HOME/.dt/sessions/display. The content of these directories should not be directly edited by the user. Hands off the database, bestie. π«
/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/app-defaults/$LANG/Dtsessionβ defaultdtsessionresources.
π SEE π
Go check out these related specs, iykyk:
dtstyleβ Customization of many session propertiesdtscreenβ Desktop screen saversdtwmβ Window managerdtloginβ Login managerdtsessionactionβ Session manager actionsdtsessiondbβ Format and location of CDEnext session database filesdtsessionfileβ Format and location of CDE 1.0 desktop session filesdtresourcesfileβ Format and location of desktop resource filesstartlogβ Log of processes started by the Xsession script
And that's the whole page, bestie! π This one signs off as dtsession(user cmd) β so go forth and customize responsibly. Mwah! πβ¨π
π¦ where this page comes from
- nixos 26.05: cde 2.5.3
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms