DTSESSION_RES(1)
πΈ dtsession_res β the CDE dtsession resource load utility πΈ
okay so first things first, bestie: this page lives in the (user cmd) section of the manual, and it's all about a utility called dtsession_res from the Common Desktop Environment. buckle up, it's short but she's got lore π
β¨ NAME β¨
dtsession_res β the CDE dtsession resource load utility π
β¨ SYNOPSIS β¨
dtsession_res -load [-merge] [-system] [-xdefaults] [-file &<name>]
β¨ DESCRIPTION β¨
Note: the Common Desktop Environment (CDE)dtsession_resutility is used bydtsessionand theReloadResourcesaction to load session resources. It is not intended to be run directly from the command line. like, respectfully, this is not a "just try it in your terminal" situation π
The CDE dtsession_res utility uses xrdb(1) to load the session resources into the RESOURCE_MANAGER property of the root window of the display. the way it does this is so organized honestly, she gathers the session resources from these files:
/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/config/$LANG/sys.resources/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/etc/config/$LANG/sys.resources$HOME/.Xdefaults$HOME/.dt/<session dir>/dt.resources(shown in the page as&<session dir>)
Refer to the dtsession(1) man page for more info on these files and what's inside them π
The dtsession_res utility provides support for display-specific resources by converting the $DISPLAY value into a cpp(1) macro that can be used in a session resource file to limit resource definitions to a particular display. she does this by:
- converting all
'.'(dot) and':'(colon) characters to'_', - stripping off any screen specification,
- and finally prefixing
'DISPLAY_'to the result.
for example, a $DISPLAY of ':0' would be 'DISPLAY_0', and a $DISPLAY of 'blanco.gato.com:0.0' would be 'DISPLAY_blanco_gato_com_0'. iconic, no cap π¦
The resulting value can be used as part of a cpp test in a session resource file. for example:
Myapp*resource: value
#ifdef DISPLAY_blanco_gato_com_0
Myapp*resource: specialvalue1
#endif
#ifdef DISPLAY_pablo_gato_com_0
Myapp*resource: specialvalue2
#endif
π OPTIONS π
-loadβ replace the currentRESOURCE_MANAGERcontent with the session resources. out with the old, in with the new β¨-mergeβ merge the currentRESOURCE_MANAGERcontent with the session resources. best of both worlds, we love a compromise π«Ά-systemβ load or merge the system session resources. the big collective vibe π-xdefaultsβ load or merge the$HOME/.Xdefaultfile. (yes, that's.Xdefaultexactly as written here π)-file &<name>β load or merge the file specified by&<name>. you pick, she loads π
π EXAMPLES π
The dtsession_res utility is not intended to be run from the command line. refer to the ReloadResources action for info on how to reload session resources in a user's session. seriously, ReloadResources is the main character here, let her cook π₯
dtsession_res -load -system -xdefaults -file
$HOME/.dt/sessions/current/dt.resources
Replaces the RESOURCE_MANAGER with the content of the following files:
/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/config/$LANG/sys.resources,/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/etc/config/$LANG/sys.resources,$HOME/.Xdefaultsand$HOME/.dt/sessions/current/dt.resourcesfiles.
and that's the whole page, bestie, go forth and let ReloadResources do the heavy lifting π
sign-off time π β this was dtsession_res, hanging out in the user cmd manual section, and that's literally the entire footer. 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