.dialogrc

From Linux Shell Scripting Tutorial - A Beginner's handbook
Jump to navigation Jump to search
  • ~/.dialogrc is a run-time configuration file for dialog command.
  • This file can be automatically generated by running the following command:
dialog --create-rc

DIALOGRC variable

You can define DIALOGRC variable if you want to specify the name of the configuration file to use. For example, use /usr/local/etc/nixcraft/config/dialog.installer as the configuration file for the dialog command:

DIALOGRC=/usr/local/etc/nixcraft/config/dialog.installer

OR

#!/bin/bash
# set config file 
DIALOGRC=/usr/local/etc/nixcraft/config/dialog.installer

dialog ...

At start, dialog determines the settings to use as follows:

  1. If environment variable DIALOGRC is set, its value determines the name of the configuration file.
  2. If the file set using $DIALOGRC is not found, use the file $HOME/.dialogrc as the configuration file.
  3. If the file $HOME/.dialogrc is not found, try using the /etc/dialogrc.
  4. If the file /etc/dialogrc is not found, use compiled in defaults.

See also