Help migrating to SCO to Redhat Linux

backroger

Member
Mar 6, 2005
32
0
0
Hi guys....

I need help in migrating our program to linux environment but currently stuck about termcap.

The old rig is SCO Unix that has ansi terminal while the redhat is using linux terminal.

I have this on .profile in SCO Unix.

eval `tset -m ansi:ansi -m :\?${TERM:-ansi} -r -s -Q`

Should I just replace the "ansi" with the word "linux"?

Also I have this script code called menu... but when I run this menu script I got a message.

"The Terminal linux is not on the terminal file."

It seems that linux termcap is not on my application terminal database file.
 

Crusty

Lifer
Sep 30, 2001
12,684
2
81
Well, there's not a Linux terminal really. You can use bash, csh, tsh or one of many others. RHEL uses bash by default I believe.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
Should I just replace the "ansi" with the word "linux"?

Probably not, if the app does it's own terminal crap then it'll probably not work too well with a terminal it wasn't designed for. Does the TERM variable say ansi after you run that tset command on Linux?

Well, there's not a Linux terminal really.

Actually there is, he's talking about termcap and the TERM environment variable that describes the capabilities of that terminal (colors, bold, etc).
 

Crusty

Lifer
Sep 30, 2001
12,684
2
81
Originally posted by: Nothinman
Should I just replace the "ansi" with the word "linux"?

Probably not, if the app does it's own terminal crap then it'll probably not work too well with a terminal it wasn't designed for. Does the TERM variable say ansi after you run that tset command on Linux?

Well, there's not a Linux terminal really.

Actually there is, he's talking about termcap and the TERM environment variable that describes the capabilities of that terminal (colors, bold, etc).

Ah gotcha, didn't realize what was going on as my SCO experience is rather non-existent!
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
I've only ever touched SCO once or twice, the terminal thing is a generic unix facility.
 

backroger

Member
Mar 6, 2005
32
0
0
Originally posted by: Nothinman
Should I just replace the "ansi" with the word "linux"?

Probably not, if the app does it's own terminal crap then it'll probably not work too well with a terminal it wasn't designed for. Does the TERM variable say ansi after you run that tset command on Linux?

Well....here is my old .profile from SCO....

# .profile -- Commands executed by a login Bourne shell
#

PATH=$PATH:$HOME:. # set command search path
MAIL=/usr/spool/mail/`logname` # mailbox location
export PATH MAIL

# use default system file creation mask

eval `tset -m ansi:ansi -m :\?${TERM:-ansi} -r -s -Q`

/usr/bin/prwarn # issue a warning if password due to expire
ACLDIR=/u3/ASQL
UNIFY=$ACLDIR/lib
ATERMCAP=$UNIFY/termcap
UNICAP=$UNIFY/unicap
DBPATH=$HOME/database
PATH=$ACLDIR/bin:$ACLDIR/diag:$PATH:$HOME/sourcecode:/usr/local/bin:/u3/ASQL:/u/program
RPTCONCNT=512
RPTNODECNT=4096
RPTNSITM=20
export ACLDIR UNIFY ATERMCAP UNICAP DBPATH RPTCONCNT RPTNODECNT RPTNSITM PATH
#exec menu
#stty intr '^-'
#exec run

While the new .bash_profile in Linux is this copying the parameters of the database program.

# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi

# User specific environment and startup programs

#PATH=$PATH:$HOME/bin
ACLDIR=/usr/local/ASQL/development
UNIFY=$ACLDIR/lib
ATERMCAP=$UNIFY/termcap
UNICAP=$UNIFY/unicap
DBPATH=$HOME/database
PATH=$ACLDIR/bin:$ACLDIR/diag:$PATH:$HOME/sourcecode:/usr/local/bin:/usr/local/ASQL/development:/home/user/program
RPTCONCNT=512
RPTNODECNT=4096
RPTNSITM=20
export ACLDIR UNIFY ATERMCAP UNICAP DBPATH RPTCONCNT RPTNODECNT RPTNSITM PATH
#export PATH
unset USERNAME

My problem is "linux" is not define in this two files...

ATERMCAP=$UNIFY/termcap
UNICAP=$UNIFY/unicap

Currently; I commented this out...and partialy the menu work but kinda worse graphics.

#ATERMCAP=$UNIFY/termcap
#UNICAP=$UNIFY/unicap

Is the only solution is to just insert the terminfo/termcap of the linux into "/usr/local/ASQL/Development/lib/termcap" & "unicap" (same directory)?


# Reconstructed via infocmp from file: /usr/share/terminfo/l/linux
# Corrected by MS to define colors and Plain, Shifted, Cotrlled
# and Shifted-Contrlled keys
linux|linux console,
am, bce, eo, xon,
colors#8, pairs#64, cols#80, lines#25, it#8,


acsc=+\020\,\021-\030.^Y0\333`\004a\261f\370g\361h\260i\316j\331k\277l\332
blink=\E[5m, bold=\E[1m, invis=\E[8m, rev=\E[7m, civis=\E[?25l,
clear=\E[H\E[J, cnorm=\E[?25h, cr=^M, bel=^G,
cup=\E[%i%p1%d;%p2%dH,
cub1=^H, cud1=^J, cuf1=\E[C, cuu1=\E[A,
home=\E[H, ht=^I, ind=^J, ri=\EM,
dch1=\E[P, dl1=\E[M, ed=\E[J, el=\E[K,
ich1=\E[@, il1=\E[L,
kbs=\177, kich1=\E[2~,
kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A,
# Plain
kf1=\E[[A, kf2=\E[[B, kf3=\E[[C, kf4=\E[[D, kf5=\E[[E,
kf6=\E[17~, kf7=\E[18~, kf8=\E[19~, kf9=\E[20~, kf10=\E[21~,
kf11=\E[23~, kf12=\E[24~,
# Sfift
kf13=\E[25~, kf14=\E[26~, kf15=\E[28~, kf16=\E[29~, kf17=\E[31~,
kf18=\E[32~, kf19=\E[33~, kf20=\E[34~, kf21=\E[[F, kf22=\E[[G,
kf23=\E[[H, kf24=\E[[I,
# Control
kf25=\E[[J, kf26=\E[[K, kf27=\E[[L, kf28=\E[[M, kf29=\E[[N,
kf30=\E[[O, kf31=\E[[P, kf32=\E[[Q, kf33=\E[[R, kf34=\E[[S,
kf35=\E[[T, kf36=\E[[V,


knp=\E[6~, kpp=\E[5~, kspd=^Z,
khome=\E[1~, kend=\E[4~,
setb=\E[4%p1%dm, setf=\E[3%p1%dm,
kLFT=\E[d, kRIT=\E[c,
kdch1=^?, dch=\E[%p1%dP, mir, msgr, xenl,
# ncv#2,
csr=\E[%i%p1%d;%p2%dr, dim=\E[2m, dl=\E[%p1%dM, ech=\E[%p1%dX,
el1=\E[1K, flash=\E[?5h\E[?5l$<200/>, hpa=\E[%i%p1%dG,
hts=\EH, ich=\E[%p1%d@, il=\E[%p1%dL, kb2=\E[G, kcbt=\E[Z,
kdch1=\E[3~,
smacs=\E[11m, rmacs=\E[10m, rmso=\E[27m, rmul=\E[24m, smso=\E[7m,
smul=\E[4
# op=\E[39;49m,
sgr0=\E[0;10m,
nel=^M^J, rc=\E8, rmir=\E[4l, rmpch=\E[10m, rs1=\Ec\E]R, sc=\E7,
# set video attributes
#
sgr=\E[0;10%?%p1%t;7%;%?%p2%t;4%;%?%p3%t;7%;%?%p4%t;5%;%?%p6%t;1%;%?%p7%t;8
#
sgr=\E[0;10%?%p1%t;7%;%?%p2%t;4%;%?%p3%t;7%;%?%p4%t;5%;%?%p5%t;2%;%?%p6%t;
smir=\E[4h, smpch=\E[11m,
tbc=\E[3g, u6=\E[%i%d;%dR,
u7=\E[6n, u8=\E[?6c, u9=\E[c, vpa=\E[%i%p1%dd,

Or how do I extract the "/etc/termcap" in my linux OS and put in my "unify/termcap" and/or "unify/unicap"?

Thanks in advance.

P.S. Sorry for using the "quote" tag...I've tryed the code tag but its not align very well ^_^