DTSESSION_RES(1)

πŸ“¦
version 2.5.3 Β· 2 versions
, in nixos 26.05

🌸 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_res utility is used by dtsession and the ReloadResources action 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:

  1. converting all '.' (dot) and ':' (colon) characters to '_',
  2. stripping off any screen specification,
  3. 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 current RESOURCE_MANAGER content with the session resources. out with the old, in with the new ✨
  • -merge β€” merge the current RESOURCE_MANAGER content 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/.Xdefault file. (yes, that's .Xdefault exactly 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/.Xdefaults and
  • $HOME/.dt/sessions/current/dt.resources files.

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