.kshrc is not executing

Hi,

I am facing two problems in my environment. Anyone can help on this?

Thanks in advance.

Problem 1
---------
When i login into my new unix system, only the .profile is executing.
.kshrc is not executing. But my default shell is .ksh

Any setup to be changed ?

Problem 2
----------

When i view files in vi editor, everytime only 7 lines are displaying in the bottom of the window. Every time i need to scroll down to view 24 lines for a page.

Any vi settings or terminal setup to be changed. ?

Hi.

.kshrc will run if the value of the ENV environment variable is set (to .kshrc) after login - the value of ENV is checked each time ksh is run. This could be set either globally (in /etc/profile, /etc/environment, etc.) or in your own .profile.

ENV=.kshrc
export ENV

Or you could just source it in your .profile:

[ -r ~/.kshrc ] && . ~/.kshrc

(then .kshrc would run only once at login, and not for each new invocation of ksh)

Your second problem may be because of your terminal settings.

What does "stty -a" show?

Try changing the number of rows (i.e. "stty rows 40")

Hi Scottn,

Thanks for your reply. For the 2nd problem, this is the output of the stty -a

/rflxbn1/home>stty -a
speed 300 baud; 44 rows; 125 columns
eucw 1:1:0:0, scrw 1:1:0:0:
intr = ^C; quit = ^\; erase = ^H; kill = ^U; eof = ^D; eol = ^@
eol2 = <undef>; start = ^Q; stop = ^S; susp = ^Z; dsusp = ^Z; reprint = ^R
discard = ^O; werase = ^W; lnext = <undef>
-parenb -parodd cs8 -cstopb -hupcl cread -clocal -parext
-ignbrk brkint -ignpar -parmrk -inpck istrip -inlcr -igncr icrnl -iuclc
ixon ixany ixoff -imaxbel
isig icanon -xcase echo echoe echok -echonl -noflsh
-tostop -echoctl -echoprt -echoke -flusho -pending -iexten
opost -olcuc onlcr -ocrnl -onocr -onlret -ofill -ofdel tab3

the stty rows are already coming as 44.

I manually set it as "stty rows 40". But still facing the same problem.
I am using putty. But with same putty setup in other servers, i am able to see 44 rows in a page.

Any idea?

Apart from the speed (38400) that looks much like mine.

Is it only VI which shows this behaviour, or other commands too (like more, cat, pg, etc)? Do you have a .exrc file that contains something odd?

Hi Scottn,
I tested with cat and pg. i am getting in full screen i.e. 44 rows are displaying in the entire screen.
I tested with tail -f <pgm name>, last 10 lines are displaying and
i tested with tail -40 <pgm name>, this is also displaying 40 lines in the unix promt

Only vi, its displaying first 7 lines. Everytime i have to scroll down to see 8th line.

I dont find any .exrc file in my home directory.
This is new AIX Unix machine.

What is the value of $TERM?

/home/sources>echo $TERM
vt100

First a moderative hint: you should open a separate thread for different problems, as this will it make easier to search for a specific problem for the future user with a similar (or even the same) problem. Thanks for your consideration.

From what you describe your terminal type is definitely at fault. Either your putty is not configured to act like a vt100 terminal (don't know putty all too well, being blessed with a Unix system to work on) or your termcap database entries for the vt100 are crap. As you said the system is a freshly installed AIX system i suppose the former to be the case.

To make sure the usual terminal definitions are correctly installed issue the following command. Output should be more or less the same as mine (taken from an AIX 5.3 system at ML 09):

# lslpp -l | grep -i term 
  X11.apps.aixterm           5.3.8.0  COMMITTED  AIXwindows aixterm Application
  X11.apps.xterm             5.3.9.0  COMMITTED  AIXwindows xterm Application
  X11.msg.en_US.apps.aixterm
                             5.3.0.0  COMMITTED  AIXwindows aixterm Messages -
  bos.terminfo.rte           5.3.7.0  COMMITTED  Run-time Environment for AIX
                                                 Terminals 
  devices.vdevice.hvterm-protocol.rte
                            5.3.0.50  COMMITTED  Virtual Terminal Physical
  devices.vdevice.hvterm1.rte
                             5.3.9.0  COMMITTED  Virtual Terminal Devices
                             5.3.9.0  COMMITTED  Virtual Terminal Devices
  devices.vdevice.hvterm1.rte
                             5.3.9.0  COMMITTED  Virtual Terminal Devices
                            5.3.0.50  COMMITTED  Virtual Terminal Devices 
  bos.terminfo.ansi.data     5.3.0.0  COMMITTED  Amer National Stds Institute
                                                 Terminal Defs
  bos.terminfo.com.data      5.3.0.0  COMMITTED  Common Terminal Definitions
  bos.terminfo.dec.data      5.3.0.0  COMMITTED  Digital Equipment Corp.
                                                 Terminal Definitions
  bos.terminfo.ibm.data      5.3.0.0  COMMITTED  IBM Terminal Definitions
  bos.terminfo.pc.data       5.3.9.0  COMMITTED  Personal Computer Terminal
  bos.terminfo.print.data    5.3.0.0  COMMITTED  Generic Line Printer Terminal
  bos.terminfo.televideo.data
                             5.3.0.0  COMMITTED  Televideo Terminal Definitions
  bos.terminfo.wyse.data     5.3.0.0  COMMITTED  Wyse Terminal Definitions

I hope this helps.

bakunin