DTSEARCHPATH(1)

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

πŸŽ€ dtsearchpath (user cmd) πŸŽ€

🌸 NAME 🌸

Okay bestie, this is dtsearchpath β€” the user cmd that sets desktop search paths. That's the whole vibe.

πŸ¦‹ SYNOPSIS πŸ¦‹

dtsearchpath [-u username] [-v] [-o] [-csh] [-ksh]

πŸ’– DESCRIPTION πŸ’–

The dtsearchpath command line utility sets local and remote locations that desktop components should search for Application Manager groups, for filetype and action definitions, for desktop icons, and for help files. It's giving β€œtell everyone where to look” energy.

The /nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/bin/Xsession startup script sources the user's $HOME/.dtprofile script and any scripts located under /nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/etc/config/Xsession.d and /nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/config/Xsession.d. After sourcing the Xsession.d files, the Xsession script will invoke /nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/bin/dtsearchpath to set and export the environment variables DTAPPSEARCHPATH, DTDATABASESEARCHPATH, DTHELPSEARCHPATH, XMICONSEARCHPATH, and XMICONBMSEARCHPATH (see the ENVIRONMENT heading in this man page for a more detailed description). Slay, environment setup.

πŸ” Search Path Syntax πŸ”

Each of the exported search path variables is supported by, that is, built from, two comma-separated search path environment variables. For example: DTAPPSEARCHPATH is supported by DTSPSYSAPPHOSTS and DTSPUSERAPPHOSTS. XMICONSEARCHPATH is supported by DTSPSYSICON and DTSPUSERICON.

The input search path environment variables fall into two categories β€” those that support the host:/path syntax and those that do not. If the name of the input environment variable contains the string HOSTS, it will support host:/path syntax. The syntax for search paths that support host:/path is:

search path element
[ host | pathname | hostname+pathname ]
host
&<hostname>:
pathname
/&<absolute path>

The syntax for search paths that do not support host:/path is:

search path element
[ pathname ]
pathname
/&<absolute path>

✨ Examples ✨

To set the Icon search path to include the /usr/local/games/icons subdirectory, the following line would appear in a script in the /nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/etc/config/Xsession.d/ subdirectory:

DTSPSYSICON=/usr/local/games/icons

To set the Database search path to include host marlin, the following line would appear in a script in the /nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/etc/config/Xsession.d/ subdirectory:

DTSPSYSDATABASEHOSTS=marlin:

To set the Application Manager path to include the applications on host steelhead under subdirectory /usr/local, and under the default help location on host halibut, the following line would appear in a script in the /nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/etc/config/Xsession.d/ subdirectory:

DTSPSYSAPPHOSTS=steelhead:/usr/local,halibut:

The dtsearchpath command line utility parses these path elements and transforms them into a form suitable for the desktop components.

If a host element is included, then the Tooltalk library's filename mapping capabilities will control how a path to files on that host are constructed. For example, the path to file /tmp/file on host goby may be constructed as /net/goby/tmp/file or as /nfs/goby/tmp/file.

🌈 Default Locations 🌈

By default, dtsearchpath sets up three search locations for each subsystem. In search order, they are:

  • The user's personal location, under $HOME/.dt.
  • The system administrator's configuration location, under /nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/etc/appconfig.
  • The factory default location, under /nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/appconfig.

πŸ‘‘ Precedence πŸ‘‘

When searching a path for a particular item, such as an icon file, the desktop will always be satisfied by the first item found. For example, when searching for an icon whose basename is beeper, if that icon exists in both the /nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/etc/appconfig/icons and the /nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/appconfig/icons subdirectories, then the icon under /nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/etc/appconfig/icons will be found first and used, because that element appears first in the XMICONSEARCHPATH. The search terminates when the first match occurs. First match wins, periodt.

Each of the DTSPSYS search path environment variables has a corresponding DTSPUSER environment variable which will take precedence over the system setting. The DTSPUSER values will be prepended to the DT search path whereas the DTSPSYS values will come after the $HOME/.dt configuration location but before the factory default location. The relationship between the system administrator's customization and the default /nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/etc configuration location is up to the user of the DTSPSYS value.

πŸ’… OPTIONS πŸ’…

  • -u user β€” causes dtsearchpath to return the search paths for the specified user. This option is useful for system administrators who need to understand the search paths for a particular user.
  • -v β€” the verbose option causes dtsearchpath to print to standard output the values of the search environment formatted for easier human reading. By default, the command runs silently.
  • -o β€” this flag is sitting in the synopsis, but this part of the page doesn't describe it. No invented lore, bestie.
  • -csh β€” causes dtsearchpath to return values suitable for evaluation by a C Shell script. By default, the command returns values suitable for evaluation by a Bourne Shell script.
  • -ksh β€” causes dtsearchpath to return values suitable fore evaluation by a Korn Shell script. By default, the command returns values suitable for evaluation by a Bourne Shell script.

🫢 RETURN VALUES 🫢

  • 0 β€” command completed successfully.
  • 1 β€” command invoked with incorrect usage.

🌟 ENVIRONMENT 🌟

The values set by dtsearchpath are passed through to the individual desktop subsystems, such as the action database and the help system, by means of environment variables.

The DTSPSYSAPPHOSTS variable is the primary environment variable and drives the remaining search paths for filetypes and actions, for desktop icons, and for help files.

In the following list, all values are derived from three places: the user's $HOME directory ($HOME/.dt), the system configuration directory (/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/etc/appconfig), and the factory defaults directory (/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/appconfig). The values are listed as transformed for the individual desktop subsystems.

To verify these values, execute dtsearchpath with the verbose (-v) option.

DTAPPSEARCHPATH, DTSPSYSAPPHOSTS, DTSPUSERAPPHOSTS β€” used to discover application hosts and their registry subdirectories. The default transformed value is:

$HOME/.dt/appmanager
/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/etc/appconfig/appmanager/%L
/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/etc/appconfig/appmanager/C
/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/appconfig/appmanager/%L
/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/appconfig/appmanager/C

Where %L is the value of the LANG environment variable.

πŸ› οΈ the app search path β€” <pink>DTAPPSEARCHPATH</pink> (cont'd, bestie πŸ‘€)

ok so the value of DTAPPSEARCHPATH can be altered by either of two environment variables: DTSPSYSAPPHOSTS and/or DTSPUSERAPPHOSTS. Two lanes, same destination 😌

  • DTSPSYSAPPHOSTS β€” this one's for the system administrators 🫑. You set it by adding a ksh script to the /nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/etc/config/Xsession.d directory that exports the variable. Like this:
export DTSPSYSAPPHOSTS=marlin:,goby:/vipapps,/opt

The expected syntax for DTSPSYSAPPHOSTS is a comma-separated list ⭐. DTSPSYSAPPHOSTS accepts host:, host:/path, or just /path. The effect is to insert a searchpath after the configuration location (/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/etc/appconfig/appmanager) and before the factory default location (/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/appconfig/appmanager) 🎯

$HOME/.dt/appmanager
/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/etc/appconfig/appmanager/%L
/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/etc/appconfig/appmanager/C
/nfs/marlin/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/etc/appconfig/appmanager/%L
/nfs/marlin/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/etc/appconfig/appmanager/C
/nfs/goby/vipapps/appconfig/appmanager/%L
/nfs/goby/vipapps/appconfig/appmanager/C
/opt/appconfig/appmanager/%L
/opt/appconfig/appmanager/C
/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/appconfig/appmanager/%L
/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/appconfig/appmanager/C

Now the fun part 🌈 β€” if the system administrator wants the local configuration directory to appear in a different location within the configurable search paths, the special host term localhost: can be inserted anywhere into the environment variable πŸ’«

export DTSPSYSAPPHOSTS=marlin:,localhost:,goby:/vipapps,/opt

The resulting value for DTAPPSEARCHPATH would be:

$HOME/.dt/appmanager
/nfs/marlin/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/etc/appconfig/appmanager/%L
/nfs/marlin/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/etc/appconfig/appmanager/C
/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/etc/appconfig/appmanager/%L
/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/etc/appconfig/appmanager/C
/nfs/goby/vipapps/appconfig/appmanager/%L
/nfs/goby/vipapps/appconfig/appmanager/C
/opt/appconfig/appmanager/%L
/opt/appconfig/appmanager/C
/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/appconfig/appmanager/%L
/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/appconfig/appmanager/C

In fact, the value localhost: can be inserted anywhere in the DTSPSYSAPPHOSTS value, and its order within the DTSPSYSAPPHOSTS will be reflected in the DTAPPSEARCHPATH value. it's giving "where you sit is where you stand" energy fr fr πŸ’…

  • DTSPUSERAPPHOSTS β€” this one's for the end users 🫢. Values are specified by exporting the value in the user's .dtprofile.
export DTSPUSERAPPHOSTS=appsvr:,/myapps

DTSPUSERAPPHOSTS also accepts host:, host:/path, and /path specifications. The effect here is different though β€” it inserts a searchpath before any other searchpath πŸ‘‘ (you get to go first, main character energy)

/nfs/appsvr/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/etc/appconfig/appmanager/%L
/nfs/appsvr/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/etc/appconfig/appmanager/C
/myapps/appmanager/%L
/myapps/appmanager/C
$HOME/.dt/appmanager
/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/etc/appconfig/appmanager/%L
/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/etc/appconfig/appmanager/C
/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/appconfig/appmanager/%L
/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/appconfig/appmanager/C

πŸ—‚οΈ the database search path β€” <purple>DTDATABASESEARCHPATH</purple>, <purple>DTSPSYSDATABASEHOSTS</purple>, <purple>DTSPUSERDATABASEHOSTS</purple>

these three are used to collect filetype and action definitions, as expressed in *.dt files πŸ¦‹. The default transformed value is:

$HOME/.dt/types
/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/etc/appconfig/types/%L
/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/etc/appconfig/types/C
/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/appconfig/types/%L
/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/appconfig/types/C

Where %L is the value of the LANG environment variable 🌍. (she's literally just your locale, no cap)

The value of DTDATABASESEARCHPATH can be altered by either of two environment variables: DTSPSYSDATABASEHOSTS and/or DTSPUSERDATABASEHOSTS ✨

  • DTSPSYSDATABASEHOSTS β€” for the system administrators again 🫑. Values are specified by adding a ksh script to the /nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/etc/config/Xsession.d directory that exports the variable.
export DTSPSYSDATABASEHOSTS=marlin:,goby:/vipapps,/opt

The expected syntax for DTSPSYSDATABASEHOSTS is a comma-separated list ⭐. DTSPSYSDATABASEHOSTS accepts host:, host:/path, or just /path. The effect is to insert a searchpath after the configuration location (/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/etc/appconfig/types) and before the factory default location (/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/appconfig/types) πŸ’«

$HOME/.dt/types
/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/etc/appconfig/types/%L
/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/etc/appconfig/types/C
marlin:/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/etc/appconfig/types/%L
marlin:/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/etc/appconfig/types/C
goby:/vipapps/appconfig/types/%L
goby:/vipapps/appconfig/types/C
/opt/appconfig/types/%L
/opt/appconfig/types/C
/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/appconfig/types/%L
/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/appconfig/types/C

As is the case for DTAPPSEARCHPATH, the placement of the local configuration directory can be affected by the adding special host term localhost: to the DTSPSYSDATABASEHOSTS environment variable πŸŽ€

export DTSPSYSDATABASEHOSTS=marlin:,localhost:,goby:/vipapps

The resulting value for DTDATABASESEARCHPATH would be:

$HOME/.dt/types
marlin:/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/etc/appconfig/types/%L
marlin:/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/etc/appconfig/types/C
/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/etc/appconfig/types/%L
/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/etc/appconfig/types/C
goby:/vipapps/appconfig/types/%L
goby:/vipapps/appconfig/types/C
/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/appconfig/types/%L
/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/appconfig/types/C
  • DTSPUSERDATABASEHOSTS β€” for the end users 🫢. Values are specified by exporting the value in the user's .dtprofile.
export DTSPUSERDATABASEHOSTS=dbsvr:,/mytypes

DTSPUSERDATABASEHOSTS also accepts host:, host:/path, and /path specifications. The effect is to insert a searchpath before any other searchpath πŸ‘‘ (yes, same "I go first" rule as the app one, she's consistent)

dbsvr:/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/etc/appconfig/types/%L
dbsvr:/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/etc/appconfig/types/C
/mytypes/types/%L
/mytypes/types/C
$HOME/.dt/types
/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/etc/appconfig/types/%L
/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/etc/appconfig/types/C
/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/appconfig/types/%L
/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/appconfig/types/C

🎨 the icon search path β€” <cyan>XMICONSEARCHPATH</cyan>, <cyan>XMICONBMSEARCHPATH</cyan>, <cyan>DTSPSYSICON</cyan>, <cyan>DTSPUSERICON</cyan>

these cuties are used to locate desktop icons 🌸. The default transformed value is:

$HOME/.dt/icons/%B%M.pm
$HOME/.dt/icons/%B%M.bm
$HOME/.dt/icons/%B
/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/etc/appconfig/icons/%L/%B%M.pm
/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/etc/appconfig/icons/%L/%B%M.bm
/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/etc/appconfig/icons/%L/%B
/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/etc/appconfig/icons/C/%B%M.pm
/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/etc/appconfig/icons/C/%B%M.bm
/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/etc/appconfig/icons/C/%B
/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/appconfig/icons/%L/%B%M.pm
/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/appconfig/icons/%L/%B%M.bm
/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/appconfig/icons/%L/%B
/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/appconfig/icons/C/%B%M.pm
/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/appconfig/icons/C/%B%M.bm
/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/appconfig/icons/C/%B

Where %B is the basename of the requested icon, %M is the magnitude (size) of the icon, and %L is the value of the LANG environment variable πŸ¦‹. three little placeholders doing all the heavy lifting, iconic honestly

The value of XMICONSEARCHPATH can be altered by either of two environment variables: DTSPSYSICON and/or DTSPUSERICON ✨

  • DTSPSYSICON β€” for the system administrators 🫑. Values are specified by adding a ksh script to the /nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/etc/config/Xsession.d directory that exports the variable.
export DTSPSYSICON=/vipapps/icons

The expected syntax for DTSPSYSICON is a comma-separated list ⭐. DTSPSYSICON accepts the /path format β€” that's it, no host: here, she's lowkey simpler. The effect is to insert a searchpath after the configuration location (/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/etc/appconfig/icons) and before the factory default location (/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/appconfig/icons) πŸ’«

$HOME/.dt/icons/%B%M.pm
$HOME/.dt/icons/%B%M.bm
$HOME/.dt/icons/%B%M
/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/etc/appconfig/icons/%L/%B%M.pm
/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/etc/appconfig/icons/%L/%B%M.bm
/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/etc/appconfig/icons/%L/%B%M
/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/etc/appconfig/icons/C/%B%M.pm
/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/etc/appconfig/icons/C/%B%M.bm
/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/etc/appconfig/icons/C/%B%M
/vipapps/icons/%L/%B%M.pm
/vipapps/icons/%L/%B%M.bm
/vipapps/icons/%L/%B%M
/vipapps/icons/C/%B%M.pm
/vipapps/icons/C/%B%M.bm
/vipapps/icons/C/%B%M
usr/dt/appconfig/icons/%L/%B%M.pm
/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/appconfig/icons/%L/%B%M.bm
/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/appconfig/icons/%L/%B%M
/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/appconfig/types/C/%B%M.pm
/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/appconfig/types/C/%B%M.bm
/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/appconfig/types/C/%B%M
🫢 and yeah β€” usr/dt/appconfig/icons/%L/%B%M.pm with no leading slash, and those last three pointing at appconfig/types instead of appconfig/icons? that's literally what it says, I'm not editing the queen's handwriting πŸ’€

okay so back to the icon search-path saga. The placement of the local configuration directory can be affected by adding the path term /nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/etc/appconfig to the DTSPSYSICON environment variable, like this:

export DTSPSYSICON=/vipapps/icons,/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/etc/appconfig

The resulting value for XMICONSEARCHPATH would be:

$HOME/.dt/icons/%B%M.pm
$HOME/.dt/icons/%B%M.bm
$HOME/.dt/icons/%B%M
/vipapps/icons/%L/%B%M.pm
/vipapps/icons/%L/%B%M.bm
/vipapps/icons/%L/%B%M
/vipapps/icons/C/%B%M.pm
/vipapps/icons/C/%B%M.bm
/vipapps/icons/C/%B%M
/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/etc/appconfig/icons/%L/%B%M.pm
/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/etc/appconfig/icons/%L/%B%M.bm
/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/etc/appconfig/icons/%L/%B%M
/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/etc/appconfig/icons/C/%B%M.pm
/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/etc/appconfig/icons/C/%B%M.bm
/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/etc/appconfig/icons/C/%B%M
usr/dt/appconfig/icons/%L/%B%M.pm
/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/appconfig/icons/%L/%B%M.bm
/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/appconfig/icons/%L/%B%M
/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/appconfig/types/C/%B%M.pm
/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/appconfig/types/C/%B%M.bm
/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/appconfig/types/C/%B%M

And no, the usr/dt/appconfig/icons/%L/%B%M.pm line with no leading slash is literally like that in the source, so I’m leaving it exactly where it is. Not me editing it, bestie πŸ’€


DTSPUSERICON is for use by end users. Values are specified by exporting the value in the user’s .dtprofile.

export DTSPUSERICON=$HOME/myicons

DTSPUSERICON accepts /path specifications. The effect is to insert a searchpath before any other searchpath.

$HOME/myicons/%B%M.pm
$HOME/myicons/%B%M.bm
$HOME/myicons/%B%M
$HOME/.dt/icons/%B%M.pm
$HOME/.dt/icons/%B%M.bm
$HOME/.dt/icons/%B%M
/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/etc/appconfig/icons/%L/%B%M.pm
/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/etc/appconfig/icons/%L/%B%M.bm
/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/etc/appconfig/icons/%L/%B%M
/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/etc/appconfig/icons/C/%B%M.pm
/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/etc/appconfig/icons/C/%B%M.bm
/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/etc/appconfig/icons/C/%B%M
/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/appconfig/icons/%L/%B%M.pm
/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/appconfig/icons/%L/%B%M.bm
/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/appconfig/icons/%L/%B%M
/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/appconfig/types/C/%B%M.pm
/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/appconfig/types/C/%B%M.bm
/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/appconfig/types/C/%B%M

πŸ¦‹ DTHELPSEARCHPATH, DTSPSYSHELP, DTSPUSERHELP πŸ¦‹

These are used to locate help volumes and families for the desktop help subsystem. The default transformed value is:

$HOME/.dt/help/&<session>/%H
$HOME/.dt/help/&<session>/%H.sdl
$HOME/.dt/help/&<session>/%H.hv
$HOME/.dt/help/%H
$HOME/.dt/help/%H.sdl
$HOME/.dt/help/%H.hv
/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/etc/appconfig/help/%L/%H
/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/etc/appconfig/help/%L/%H.sdl
/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/etc/appconfig/help/%L/%H.hv
/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/etc/appconfig/help/C/%H
/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/etc/appconfig/help/C/%H.sdl
/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/etc/appconfig/help/C/%H.hv
/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/appconfig/help/%L/%H
/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/appconfig/help/%L/%H.sdl
/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/appconfig/help/%L/%H.hv
/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/appconfig/help/C/%H
/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/appconfig/help/C/%H.sdl
/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/appconfig/help/C/%H.hv

Where %H is the basename of the requested help volume, and %L is the value of the LANG environment variable. iykyk πŸ’…

The value of DTHELPSEARCHPATH can be altered by either of two environment variables: DTSPSYSHELP and/or DTSPUSERHELP. DTSPSYSHELP is for use by system administrators. Values are specified by adding a ksh script to the /nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/etc/config/Xsession.d directory that exports the variable.

export DTSPSYSHELP=/vipapps/help

The expected syntax for DTSPSYSHELP is a comma-separated list. DTSPSYSHELP accepts the /path format. The effect is to insert a searchpath after the configuration location (/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/etc/appconfig/help) and before the factory default location (/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/appconfig/help).

$HOME/.dt/help/&<session>/%H
$HOME/.dt/help/&<session>/%H.sdl
$HOME/.dt/help/&<session>/%H.hv
$HOME/.dt/help/%H
$HOME/.dt/help/%H.sdl
$HOME/.dt/help/%H.hv
/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/etc/appconfig/help/%L/%H
/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/etc/appconfig/help/%L/%H.sdl
/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/etc/appconfig/help/%L/%H.hv
/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/etc/appconfig/help/C/%H
/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/etc/appconfig/help/C/%H.sdl
/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/etc/appconfig/help/C/%H.hv
/vipapps/help/%L/%H
/vipapps/help/%L/%H.sdl
/vipapps/help/%L/%H.hv
/vipapps/help/C/%H
/vipapps/help/C/%H.sdl
/vipapps/help/C/%H.hv
/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/appconfig/help/%L/%H
/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/appconfig/help/%L/%H.sdl
/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/appconfig/help/%L/%H.hv
/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/appconfig/help/C/%H
/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/appconfig/help/C/%H.sdl
/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/appconfig/help/C/%H.hv

The placement of the local configuration directory can be affected by adding the path term /nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/etc/appconfig to the DTSPSYSHELP environment variable.

export DTSPSYSHELP=/vipapps/help,/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/etc/appconfig

The resulting value for DTHELPSEARCHPATH would be:

$HOME/.dt/help/&<session>/%H
$HOME/.dt/help/&<session>/%H.sdl
$HOME/.dt/help/&<session>/%H.hv
$HOME/.dt/help/%H
$HOME/.dt/help/%H.sdl
$HOME/.dt/help/%H.hv
/vipapps/help/%L/%H
/vipapps/help/%L/%H.sdl
/vipapps/help/%L/%H.hv
/vipapps/help/C/%H
/vipapps/help/C/%H.sdl
/vipapps/help/C/%H.hv
/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/etc/appconfig/help/%L/%H
/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/etc/appconfig/help/%L/%H.sdl
/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/etc/appconfig/help/%L/%H.hv
/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/etc/appconfig/help/C/%H
/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/etc/appconfig/help/C/%H.sdl
/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/etc/appconfig/help/C/%H.hv
/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/appconfig/help/%L/%H
/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/appconfig/help/%L/%H.sdl
/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/appconfig/help/%L/%H.hv
/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/appconfig/help/C/%H
/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/appconfig/help/C/%H.sdl
/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/appconfig/help/C/%H.hv

DTSPUSERHELP is for use by end users. Values are specified by exporting the value in the user’s .dtprofile.

export DTSPUSERHELP=$HOME/myhelp

DTSPUSERHELP accepts /path specifications. The effect is to insert a searchpath before any other searchpath.

$HOME/myhelp/%H
$HOME/myhelp/%H.sdl
$HOME/myhelp/%H.hv
$HOME/.dt/help/&<session>/%H
$HOME/.dt/help/&<session>/%H.sdl
$HOME/.dt/help/&<session>/%H.hv
$HOME/.dt/help/%H
$HOME/.dt/help/%H.sdl
$HOME/.dt/help/%H.hv
/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/etc/appconfig/help/%L/%H
/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/etc/appconfig/help/%L/%H.sdl
/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/etc/appconfig/help/%L/%H.hv
/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/etc/appconfig/help/C/%H
/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/etc/appconfig/help/C/%H.sdl z.br
/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/etc/appconfig/help/C/%H.hv
/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/appconfig/help/%L/%H
/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/appconfig/help/%L/%H.sdl
/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/appconfig/help/%L/%H.hv
/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/appconfig/help/C/%H
/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/appconfig/help/C/%H.sdl
/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/appconfig/help/C/%H.hv

That stray z.br is sitting right there in the source between the .sdl and .hv lines, and I am not deleting it. Periodt πŸ’€

(See also the OPTIMIZATIONS heading in this man page.)

At the conclusion of dtsearchpath, DTSPSYS and DTSPUSER variables are explicitly unset, so that only the DT*SEARCHPATH values remain.


🌈 MANPATH, DTMANPATH

In addition to setting the application search paths, dtsearchpath augments the MANPATH environment variable with the path to the CDE man pages, /nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/man.

For example, if the value of MANPATH prior to execution of dtsearchpath is:

/net/manserver/usr/man:/usr/man

then the augmented value will be:

/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/man:/net/manserver/usr/man:/usr/man

If the MANPATH environment variable is not set prior to the invocation of dtsearchpath, the system-defined default value of MANPATH will be included in the augmented MANPATH value. For example, if the system-defined default value is:

/usr/man:/usr/local/man

then dtsearchpath will generate a MANPATH value of:

/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/man:/usr/man:/usr/local/man

πŸ’… DTSROCFPATH

DTSROCFPATH is the one that tells DtSearchInit where the default API config ocf file lives. And like β€” if the ocf_file argument is NULL, DtSearchInit goes hunting for an ocf file whose base name is either dtsearch.ocf or austext.ocf, checking in this exact order, bestie:

  1. the directory specified by DTSROCFPATH
  2. the current working directory
  3. the HOME directory

Order matters, iykyk. πŸ’…

🫢 DTINFOLIBSEARCHPATH, DTINFOLIBDEFAULT

So DTINFOLIBSEARCHPATH is what dtinfo uses to find information libraries on local and remote mounted systems. And DTINFOLIBDEFAULT is what dtinfo uses to figure out which default information library(s) to load when you don't pass the -l or -sect option. Both of these get defined at installation time by dtsearchpath. ✨

The default infolib search path includes personal, system-wide, and built-in locations, like so:

  • System-wide location β€” /nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/etc/infolib/language/%I.dti
  • Built-in location β€” /nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/appconfig/infolib/language/%I.dti

The default language is C. πŸŽ€

And here's the cute part: when a location gets added to the application search path, the appropriate infolib subdirectory is automatically added to the infolib search path. No cap.

For example β€” if the application server hosta: is added to the application search path, then the directory hosta:/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/etc/appconfig/infolib/language is automatically added to the infolib search path. Slay. 🌸

The infolib search path gets assembled from the built-in locations plus these input variables:

  • DTSPSYSINFOLIB β€” system-wide infolib search path input variable
  • DTSPUSERINFOLIB β€” personal infolib search path input variable

Use these input variables to specify locations outside the application search path. πŸ¦‹

The assembled database search path is specified by the output variable DTINFOLIBSEARCHPATH.

The syntax for the DTSPSYSINFOLIB and DTSPUSERINFOLIB variables is:

VARIABLE = location [, location]

where location is the pathname for a directory on the local (session server) system. Use this syntax to add a local directory.

To specify a location on another system, use its network file name. For example: /nfs/servera/projects/infolib.

The value of the infolib search path (DTINFOLIBSEARCHPATH) is created by assembling the following locations, listed in order of precedence β€” first one wins, okurrr:

  1. Locations specified using the DTSPUSERINFOLIB variable
  2. Locations derived from the DTSPUSERAPPHOSTS variable
  3. The default location: /nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/etc/appconfig/infolib/language/%I.dti
  4. Locations specified using the DTSPSYSINFOLIB variable
  5. Locations derived from the DTSPSYSAPPHOSTS variable
  6. /nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/appconfig/infolib/language/%I.dti

🌈 LOCALES 🌈

Every single one of the search path elements contains a path that references the LANG variable using the %L construct. So when the user picks a different language from the greeting screen and logs in, the search path is already set up for them. Iconic. At the same time, the factory defaults are still included β€” but they come after the localized elements. πŸ‘‘

So like, if the user chooses the German locale from the greeting screen, then their DTDATABASESEARCHPATH will already include these elements, as specified by the LANG value set at session startup:

$HOME/.dt/types
/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/etc/appconfig/types/%L
/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/etc/appconfig/types/C
/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/appconfig/types/%L
/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/appconfig/types/C

(Also β€” go peek at the OPTIMIZATIONS heading in this man page, it's right below. πŸ‘€)

One thing though: the search path does not use locales under the user's $HOME directory. So whether the user drops personal icons under $HOME/.dt/icons or personal applications under $HOME/.dt/appmanager, they'll be found regardless of the language selected at login. Convenient much? πŸ’–


⚑ OPTIMIZATIONS ⚑

Before exporting the search paths to the user's environment, dtsearchpath first checks to make sure each subdirectory actually exists. If a directory doesn't exist at login, then that element just won't be added to the user's search path β€” all so the desktop components don't waste time doing needless file system accesses. Efficiency queen. 🧚


πŸ“ FILES πŸ“

  • $HOME/.dtprofile β€” enables setting of the user's DTSPUSER environment variables.
  • Xsession.d/* β€” enables setting of the system DTSPSYS environment variables.

πŸ’€ NOTES πŸ’€

Okay so this is the part where people mess up, so listen up bestie: to actually inject the values from dtsearchpath into the user's environment, the command must be eval'd β€” exactly like the Xsession login script does it:

eval `/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/bin/dtsearchpath`

Just running dtsearchpath bare from the command line will have no affect on the parent shell. None. Zero. Nada. 😭

And here's the sad part: it is not possible to affect the DT search paths after logging in. Components like the Window Manager and File Manager inherit the values from dtsearchpath by being invoked from the same shell. So if the system administrator creates a new search path element for the end user, that user won't be able to access it until the next login. Tragic, but that's the vibe. πŸ™ˆ

πŸ‘€ SEE ALSO πŸ‘€

dtappgather(1).


And that's a wrap on dtsearchpath, bestie! πŸŽ€ This page comes to you as dtsearchpath(user cmd) β€” go forth and eval responsibly. πŸ’…βœ¨πŸ«Ά

πŸ“¦ where this page comes from