DTFILE_CONFIG(4)

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

πŸ¦‹ dtfile_config β€” CDE File Manager configuration file πŸ¦‹

okay bestie, this is dtfile_config from the special file manual. It’s the CDE File Manager configuration file, and it’s giving β€œcustomize my properties dialog” energy. Niche? Yes. Iconic? Also yes. πŸ’…


πŸ’– NAME πŸ’–

dtfile_config β€” CDE File Manager configuration file. That’s the whole name, no cap. 🫢


✨ SYNOPSIS ✨

# Comment
aix:3     = native
hpux:0    = native
sunos:ufs = native
end
#
native: buttonLabel = Modify extended attributes ...
        warning     = Warning:0xtended attributes may limit your access
        fsDialog    = /local/bin/modExtAttr
        dismiss     = yes

🌸 DESCRIPTION 🌸

The File Manager properties dialog can be used to change Unix file attributes. It can also be configured to allow editing of additional, filesystem-specific, attributes β€” like Access Control Lists in AFS file systems, for example. This ability is currently limited to IBM, Sun, and HP systems. So it’s not universal, bestie β€” it’s a whole platform moment.

Whenever the properties dialog is invoked, File Manager identifies the type of filesystem using platform-dependent library functions. Here’s the breakdown, and yes, we’re keeping every field name:

  • For AIX, the st_vfstype field returned by stat is used.
  • For HPUX, the f_fsid[1] field returned by statfs is used.
  • For SUNOS, the f_basetype field returned by statvfs is used.

The contents of this field is combined with the name of the system to create an identifier for the filesystem β€” for example, aix:3. File Manager reads a configuration file (see below for file format) looking for this compound identifier. If it is not found, no further action is taken. Any errors which occur while reading the configuration file are logged in $HOME/.dt/errorlog. Errorlog era, lowkey.

If found, the platform-dependent identifier is mapped to a platform-independent form β€” for example, native. For each platform-independent identifier, the configuration file provides the name of a program which can be used to edit filesystem-specific properties. In addition, it give a label that is used on a button which is added to the properties dialog. When the button is pressed, File Manager forks a process to execute the program. While the filesystem-specific dialog appears to the user to be part of File Manager, it is implemented as a top-level shell and can be executed from the command line. File Manager provides only a single argument to the program: the complete path of the file. Just one argument, periodt.

An option is also provided for the normal properties dialog to be Cancelled when the file-system specific dialog is invoked. Note that this will cause any changes made in the normal properties dialog to be lost. Like, actually lost lost β€” be careful with that one.

The platform-dependent identifier can also be used to present a message in the properties dialog. This message can appear either on its own or in conjunction with a pushbutton and properties dialog program as described above. Flexible message behavior, we love to see it.

πŸ“ Location of configuration file πŸ“

File Manager looks in three places for the configuration file, stopping the search once the file is found. The three locations, in search order, are:

  1. $HOME/dtfile.config β€” user-specific configuraton.
  2. /nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/etc/config/dtfile.config β€” customized system configuration.
  3. /nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/config/$LANG/dtfile.config β€” factory defaults.

If none of these is found, an error message indicating that /nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/config/$LANG/dtfile.config cannot be found is placed in $HOME/.dt/errorlog. Sad little errorlog moment.

For debugging, File Manager will use a configuration file defined in the environment variable DTFSCONFIG before searching any of the other locations. Debug shortcut unlocked.

πŸ“ Format of configuration file πŸ“

The File Manager configuration file consists of two sections. The first section maps platform-specific information to a platform-independent identifier.

There are two fields in the platform-specific portion separated by a colon. The first field identifies the platform: aix, hpux, sunos. The second field depends on platform; for aix it is an integer corresponding to the st_vfstype field returned by stat, for hpux it is an integer corresponding to the f_fsid[1] field returned by statfs, for sunos it is a string corresponding to the f_basetype field returned by statvfs. The platform-independent identifier is given following an equals sign. The keyword end delimits the list of mappings.

For example, to define the "native" file systems on several platforms:

aix:3 = native
hpux:0 = native
sunos:ufs = native
end

The second section of the configuration file provides information needed by File Manager to execute the filesystem-specific dialog. It consists of a list of platform-independent identifiers followed by a colon and several fields. Each field consists of a name followed by an equals sign and a string.

The page says β€œfive field names” and then names four β€” iconic little typo, but we’re keeping the info exactly:

  • buttonLabel β€” defines a label for a button in the permissions dialog.
  • fsDialog β€” defines the path to the program which displays the dialog for editing file-specific properties.
  • warning β€” optional; defines a warning message to be displayed in permissions dialog.
  • dismiss β€” optional; specifies if the normal properties dialog is to be cancelled when the file-system specific dialog is invoked.

Dismiss can be set to either "yes" or "no" and defaults to "no". Also: "0 can be included in the warning text to generate a new line. Newline lore, honestly.

Continuing the native file system example used above, the following would enable a file-system specific dialog generated by the program /local/bin/modExtAttr:

native: buttonLabel = Modify extended attributes ...
        warning     = Warning:0xtended attributes may limit your access
        fsDialog    = /local/bin/modExtAttr
        dismiss     = yes

πŸ‘€ SEE πŸ‘€

The factory-default configuration file, /nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/config/$LANG/dtfile.config, contains further examples. Included are some test examples that can be enabled by removing comment characters from the definition lines in the file. Also included are defaults for AFS file systems which cause a warning message to be added to the regular properties dialog, but no dialog is provided. Examples and AFS warning defaults, slay.


and that’s the dtfile_config(special file) page, bestie! πŸ’– The original footer just repeats dtfile_config(special file) β€” no extra source/version or date line beyond that, so we’re not inventing one, periodt. πŸ«ΆπŸŽ€

πŸ“¦ where this page comes from