Article ID 806
Article Title RedHat LINUX & DataFlex
Article URL http://www.dataaccess.com/kbasepublic/kbprint.asp?ArticleID=806
KBase Category Linux
Date Created 04/27/1999
Last Edit Date 09/12/2003


Article Text
The TERMINFO environment variable needs to be set to where Linux's terminfo files are.
Do NOT point them to the directory where DataFlex's terminfo files are, but to the directory where Linux's terminfo files are.


ADDITIONAL INFO #1:

DataFlex 3.1d for Linux and Red Hat Linux 5.2

To help those who are having difficulties installing DataFlex for this
environment the following notes (made from my own experience) will
take some (if not all) of the pain away.  I know very little about
Linux itself, I have only just loaded a copy to try the new version of
DataFlex for Linux, so there may be other solutions for these
difficulties.

Following the instructions on page 30 of the DataFlex Installation and
Environment Guide, a couple of things are not explained in detail or
appeared misleading:

Mounting the CD under Linux is done with the following instruction.  I
have used the standard Unix mount directory (/mnt) as my mount point.
You could use a directory called /cdrom if you wanted to create it
first.

mount -r /dev/cdrom /mnt

The absolute file name in the tar command is not shown with the
correct case.  The Linux equivalent (using /mnt as our mount point)
is:

tar -xvf /mnt/PRODUCTS/DF31d/Linux/df31dlin.tar

When asked where to install the new DataFlex be aware that the default
entry shown is /usr/local/df31c.  You probably want to respecify the
location as:

/usr/local/df31d

At the end of the installation you will be asked to register your copy
of DataFlex.  At this point you will get an error "Unable to open
console device <<STATUS 28675>>".  This is because DataFlex does not
know where to find the Terminal Information Library (terminfo). It was
looking for the "linux" entry which is taken from you TERM environment
setting.  To correct this we need to set two new environment
variables, one for the Linux O/S terminfo and one for the DataFlex's
extended terminfo library:

TERMINFO=/usr/share/terminfo ; export TERMINFO
DFTERMINFO=/usr/local/df31d/lib/terminfo ; export DFTERMINFO

It's probably best to set these up in a user profile or some other
script.  You could even add them to the setpath script of DataFlex.
Remember to export these variables.  Once this is done run the setpath
script as described in the installation notes.

If you now run dfsetup you still get an error "Segmentation fault
(core dumped)".  This is because the Linux terminfo library for the
console does not contain any settings for the number of lines (LINES=)
and columns (COLS=).  You can set these as more environment variables:

LINES=25 ; COLS=80 ; export LINES COLS

Note:  This is a known problem with Caldera OpenLinux version 2.2 but the fix is as above.
(This version of Linux has not been tested by DAW.)

But you will still have problems with colours and function keys
because other settings are missing and DataFlex does not come with its
own terminfo for the Linux console.  So what you need to do is create
one.  The following codes need to be placed in a file called:

/usr/local/df31d/lib/terminfo/linux.ti

##############################################
linux|linux console,
    kdelay#2, char8,
    clrcls,
    ccc,
    cols#80, lines#25, ncv#3,
    initc=\E]P%p1%x%p2%02x%p3%02x%p4%02x,
    oc=\E]R,
    setb=\E[%p1%{40}%+%dm, setf=\E[%p1%{30}%+%dm,

    # turn off normal keys for f11 f12 for prefix use
    kf11@, kf12@,

    # set the Alt and Control prefix keys
    kAlt=\E[23~,      kCtl=\E[24~,
#############################################

You then need to compile this new entry (if you get a message coming
back that says permission denied, it is because you have not set your
DFTERMINFO variable correctly):

cd /usr/local/df31d/lib/terminfo
dftic linux.ti

Once this is done you can then happily register and start running DataFlex applications.  Please note that because the Linux console only supports a limited number of function keys, F11 is used as a prefix key for Alt, and F12 for Control.  There is no function key for Shift+F9 (Superfind) and Shift+F10 (Add Mode On/Off) so you will need to use dfconfig to reassign these.  Also there is no need to set the DFTERM environment variable, without this DataFlex just uses TERM.

Contributed by:
Michael Macliver
mike@triumph.com.au


ADDITIONAL INFO #2:

There are two schools of thought:

1. Set TERMINFO value, for most customers this should work fine.
2. Install the ncurses in your current Linux system.

If you used the second method, you do not need to set the DFTERM value when using the console.
So the current recommendation is: if step one works for you, then go for it. But, if it fails, then you will need to do step two.

Remember DAC has not tested any other version of Linux including Red Hat 5.2
So we still may see problems. This is why we have stated the O/S versions we built and tested the product with.

We do expect Development to use 5.2 or greater (i.e. 6.0) in its next 3.1x build.



Links Related to this Article
DAW Knowledge Base article 695: ERROR: "Cannot open console device" error on Linux

Email this Article
Email this Article to a Colleague
Send Feedback on this Article to Data Access Worldwide
Copyright ©2024 Data Access Corporation. All rights reserved.

The information provided in the Data Access Technical Knowledge Base is provided "as is" without warranty of any kind. Data Access Corporation disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. In no event shall Data Access Corporation or its suppliers be liable for any damages whatsoever including direct, indirect, incidental, consequential, loss of business profits or special damages, even if Data Access Corporation or its suppliers have been advised of the possibility of such damages. Some states do not allow the exclusion or limitation of liability for consequential or incidental damages so the foregoing limitation may not apply.