previous  next  contents bottom

Xdialog documentation - Compatibility


dialog-compatible utilities:

There are a few dialog "compatible" utilities around, some of them just mimic dialog without adding new features (e.g. gdialog), others add features and may differ in their syntax (cdialog, wdialog). I currently know about:

Xdialog high compatibility mode:

As a drop in replacement for dialog, cdialog and gdialog, Xdialog tries to maintain the highest degree of compatibility wherever possible. Because of the differences between a ncurses based console utility and a GTK+ based X11 utility, this compatibility is not perfect though. Also, the Xdialog development history introduces its own oddities and some of the default Xdialog behaviours are different from those of (c)dialog...

I came to the conclusion that the only way to keep the highest possible compatility without sacrifying any of the new features offered by Xdialog, was to make it behave in two possible ways, depending on its actual usage in each script (either as a drop in replacement or as a full featured independent utility).

The approach I adopted is to allow Xdialog behaviour customisation using specific environment variables. The advantage of this solution is that while modified with some environment variable assigments, the script is still usable with (c)dialog.

As of v2.0.0, Xdialog checks for the existence of the XDIALOG_HIGH_DIALOG_COMPAT environment variable; if this variable is set to "1" or "true" (case insensitive), then Xdialog behaves in the closest way to (c)dialog (dropping some of its features and adopting (c/g)dialog defaults and syntax), the net effect being that:

In order to take benefit of this improved compatibility in an existing (c)dialog script, you just have to add the following line to the script before the first invocation of Xdialog:

or, if you use bash:

Then, before each Xdialog invocation in the script, you may customize the behaviour of Xdialog by setting the XDIALOG_FORCE_AUTOSIZE and XDIALOG_INFOBOX_TIMEOUT environment variables.

Simple, isn't it ?

Other compatibility features:

By default and whether XDIALOG_HIGH_DIALOG_COMPAT is set or not, Xdialog does its best to accept (c)dialog syntax and options:

Pending compatibility issues:

Some Xdialog widgets can't be made 100% (c)dialog compatible:

previous  next  contents top