[comp.windows.x] problem with xterm on RS6000NN

allender@ux1.cso.uiuc.edu (Mark Allender) (06/25/91)

I just installed the X11R4 clients on our IBM RS/6000 machines.  Everything seems
fine except for the xterm.  When logging in on console, and starting X, the xterm
specified by my .xinitrc comes up just fine, but the terminal control seems really
messed up.  I do not get a normal CR/LF sequence after hitting return.  My term looks
something like as follows:

14:02:40 14 meibm2 ~/bin
>>> 
                       14:03:40 14 meibm2 ~/bin
                       >>>
             				      14:04:43 14 meibm2 ~/bin
				              >>>

These seperate prompts coming after hitting return.  This seems like a terminfo
problem.  So after getting a terminfo entry for xterm, and using tic to compile
it, my problems still remain.  (Note, that this is a true xterm, and not that
darn aixterm ibm invented.).  I'm sure that I am missing something probably pretty
obvious, but have torn myself up over this.

Any hints or suggestions?????

-- 
-Mark Allender
-University of Illinois at Urbana/Champaign
-Conversation Builder Project
-allender@cs.uiuc.edu

fangchin@leland.Stanford.EDU (Chin Fang) (06/25/91)

In article <1991Jun24.202647.28977@ux1.cso.uiuc.edu>, allender@ux1.cso.uiuc.edu (Mark Allender) writes:
|> I just installed the X11R4 clients on our IBM RS/6000 machines.  Everything seems
|> fine except for the xterm.  When logging in on console, and starting X, the xterm
|> specified by my .xinitrc comes up just fine, but the terminal control seems really
|> messed up.  I do not get a normal CR/LF sequence after hitting return.  My term looks
|> something like as follows:
|> 
|> 14:02:40 14 meibm2 ~/bin
|> >>> 
|>                        14:03:40 14 meibm2 ~/bin
|>                        >>>
|>              				      14:04:43 14 meibm2 ~/bin
|> 				              >>>
|> 
|> These seperate prompts coming after hitting return.  This seems like a terminfo
|> problem.  So after getting a terminfo entry for xterm, and using tic to compile
|> it, my problems still remain.  (Note, that this is a true xterm, and not that
|> darn aixterm ibm invented.).  I'm sure that I am missing something probably pretty
|> obvious, but have torn myself up over this.
|> 
|> Any hints or suggestions?????
|> 

Sigh... You are not alone.  However, I have a working "kludge" which works around
this problem (you see more below. Grrrrr!)  An except from our system.twmrc is given below:

[Use the same "kludge" in your .twmrc or .tvtwmrc]

------------------------------ part of our system .xinitrc ----------------------
#
# setup path to standard X11R4 standard fonts and a few IBM fonts as well
#

    FD1=/usr/local/lib/X11/fonts
    FD2=/usr/lib/X11/fonts
    xset fp $FD1/misc,$FD1/75dpi,$FD1/100dpi,$FD1/xtex,$FD2

    if [ -r $HOME/.Xresources ]; then
        xrdb -load $HOME/.Xresources
    else
        xrdb -load /usr/local/scripts/Xresources
    fi

    nxb=/usr/local/bin
    bitmap=/usr/local/include/X11/bitmaps

    xdpyinfo | grep -s "1 plane"
    if [ $? != 0 ] ; then
        $nxb/xsetroot -solid SkyBlue3 -cursor \
        $bitmap/left_ptr $bitmap/left_ptrmsk
    else
        $nxb/xsetroot -grey -cursor $bitmap/left_ptr $bitmap/left_ptrmsk
    fi

    xterm -name console -T Console -e csh -f -c 'reset; exec tcsh'&
    xclock &
    xload &
    xbiff  &

    #
    # Also make my cursor invisible whenever I am pondering over something
    #
    #unclutter -grab &

    #
    # Now call up a big terminal for work
    #

    (sleep 5; xterm -g 80x55-0-0 -sb -cr red -T 'Local XTerm' -e csh -f -c 'rese
t; exec tcsh') &

    if [ ! -d $HOME/supplies ]
    then
        echo "$LOGNAME\n1\n1" | /usr/lpp/X11/bin/xdtnewuser > /dev/null
    fi
#      exec twm
      exec tvtwm
#      exec mwm
else
   echo "You are using a unknown system!"
   exit 160
fi
------------------------------- end of .xinitrc excerpt --------------------------

If you don't have tcsh, you might want to get it and build it.  No hassle at all.
For the time being, just change tcsch to csh, that will do too.

I use tvtwm from export.lcs.mit.edu (dir contrib) I think it's nicer than the
plain twm :-) [only two lines needed to be changed to build a working version.
fairly easy]

Hope the above helps.

Sincerely,

Chin Fang
Student Unix System Adminstrator
Academic Information Resources
Stanford University

grad student
Mechanical Engineering Department
Stanford University
fangchin@leland.stanford.edu

rps@arbortext.COM (06/25/91)

Hi.  I have a similar problem with the R4 Xterm on the RS/6000.  God I hate
this OS.   If you should find anything out concerning this problem, please
pass it along.
	
		Thanks, Ralph

allender@ux1.cso.uiuc.edu (Mark Allender) (06/25/91)

Thanks to all those who responded so quickly.

My next question is why the hell is there a problem with this in the first place.
I cannot for the life of me understand what is so damn difficult about getting things
like this to work.  IBM has continually made my life difficult with little problems like
this.  We see constant moaning and bitching in this newsgroup, and sometimes I don't
even think that IBM hears.  Why AIX??????  Why a messed up version of mwm??  (at least
it seems not to do some things on my RS6000's that it does do on other platforms.)
Why can't we put a new X11R4 server on these things?  Why the big problem in getting
a thing like xterm to work properly?

Sigh, sorry about that.  Just wanted to get that off my chest.  Is *ANYONE* at IBM
working on these things, or even listening to what is being said here?

I suppose that it will be in a future OS upgrade, right????


-- 
-Mark Allender
-University of Illinois at Urbana/Champaign
-Conversation Builder Project
-allender@cs.uiuc.edu

gk5g+@andrew.cmu.edu (Gary Keim) (06/26/91)

Excerpts from netnews.comp.windows.x: 24-Jun-91 problem with xterm on
RS6000NN Mark Allender@ux1.cso.ui (1049)

> I just installed the X11R4 clients on our IBM RS/6000 machines. 
> Everything seems
> fine except for the xterm.  When logging in on console, and starting X,
> the xterm
> specified by my .xinitrc comes up just fine, but the terminal control
> seems really
> messed up. 

Try:

%stty brkint opost

It worked for me.

Gary Keim
ATK Group

m-hirano@sra.co.jp (06/26/91)

In article <1991Jun24.202647.28977@ux1.cso.uiuc.edu> allender@ux1.cso.uiuc.edu (Mark Allender) writes:

 >>I just installed the X11R4 clients on our IBM RS/6000 machines.  Everything seems
 >>fine except for the xterm.  When logging in on console, and starting X, the xterm
 >>specified by my .xinitrc comes up just fine, but the terminal control seems really
							^^^^^^^^^^^^^^^^
Can you do a job control ?

$ rsh rs6000 "xterm -display rs6000:0.0" ('rs6000' is your hostname.)
and on this xterm,
$ cat
^C
Can you terminate cat ?

 If it works, the problem is a parameter of a struct termio|termios|sgtty for ioctl(open("/dev/pts/??"...)...).
 If not, you have no /dev/tty as control terminal. May be setpgrp()|setsid() fail or no open("/dev/pts/??"...) after setpgrp()|setsid().
 
 Even if it works or not, you should fix your code of main.c of xterm.

 In my case, I have used xterm that posted here by IBM's man(pardon me, I forget his name !). This xterm has a problem that can't get /dev/tty. I fixed it.
 And I have ported kterm(Kanji xterm) and posted this in fj.sources in JUNET.

Thank you for reading my funny english.
--
---
m-hirano@sra.co.jp
Software Research Associates, Inc., Japan 

phw@meaddata.com (Pat Ward) (06/26/91)

In article 5348 Mark Allender writes:
>My next question is why the hell is there a problem with this in the first place.
>I cannot for the life of me understand what is so damn difficult about getting 

Your point is well-taken, but you must first understand that xterm is a program
that has evolved from kluge piled on kluge. The one X application that is the
LEAST likely to port easily is xterm.

What is it that you want xterm to do - that aixterm doesn't do? Xterm has no
color support unless you hack the livin' bejaysus out of it. Or are you of the
opinion that you can't use a tool unless you've got the source?

Let me guess... You want to use xterm to run the C-Shell - right? Take the time
to learn aixterms' capabilities, and use the Korn Shell (or bash). You'll save
yourself a lot of grief, and you'll probably decide you're better off.

> Why AIX?

Why not. A better question is "Why Sun OS?" (You know... that crippled-Xenix
work-alike). Or why NCR Tower OS? I personally would like to see AIX succeed, just
to keep AT&T Unix developers awake.

-- 
--------------------------------------------------------------------------
The opinions expressed are my own, and do not reflect the opinions of my
employer, parents, aunts, uncles, brothers, sisters, pets or neighbors.
So there.

Pat Ward
phw@meaddata.com
uunet!meaddata!phw

probe@athena.mit.edu (Richard Basch) (06/27/91)

Using the "reset" command seems to fix the prompt.  The real problem is that
xterm does not initialize the termio structure.  We get around the problem
in our environment as we use a custom xlogin, and the console window
associated with it has a tty associated with it.  The user's session is
started in the console tty, and as long as that is initialized, the xterms
inherit the tty attributes.

Basically, you have to do one of 2 things:
1. Modify xterm to do the proper termio initialization (about 15 lines of code)
2. Spawn xterm from a process associated with an already initialized tty.

-Richard