Subject: Re: xterm termcap and reboot
To: Tony Houghton <tonyh@tcp.co.uk>
From: Jasper Wallace <jasper@ivision.co.uk>
List: port-arm32
Date: 03/25/1998 12:57:48
On Tue, 24 Mar 1998, Tony Houghton wrote:

> In message <35167176.D5A21EFF@causality.com> you wrote:
> 
> > Tony Houghton wrote:
> >
> > > $TERM being set to "network" for each xterm I start from the fvwm
> > > background menu. I can't find any config file to change this. I've even
> > > resorted to searching the whole FS for occurences of TERM, but I
> > > couldn't find anything relevant.
> >
> > Is that just with fvwm? Does it do that with twm too? If, from a
> > 'network' window, you type xterm& does this new terminal also inherit
> > the wired 'network' setting?
> 
> Right, I had the circumstances a bit wrong. It's OK (TERM=xterm) until I
> login again in an xterm. That's when TERM gets set to network. I can
> avoid that now, becaue I've managed to get it to boot correctly from
> non-root and su doesn't suffer from the same problem.

Ahhh where you typing 'login' to login again to get you out of being root?
this is probably caused by the terminal setting in /etc/ttys for the
network/xterm (virtual?) terminals being 'network'. Of course yopu've now
got X working properly so this is knid of achademic...

> Talking of starting X, xdm always aborts just after logging in and
> returns to its initial login state. Any ideas? Mosaic aborts too after
> filling the xterm I launch it from with garbage. Maybe these are
> 1.3/1.3a compatibility problems?

X startup files are more than a little confusing.

	When you start x with 'startx' (which calls 'xinit') it runs yours
.xinitrc (which is just a shell script) you can than put you favorite window
manager, melting clock etc. in there, the last process run in the script is
the one that will cause x to exit when it quits, it's normally your window
manager, but it can be usefull to just have 'exec xterm &' at the end if
your window manager is prone to crashing, or you want to play around with
different ones. (the exec replaces the shell process with the xterm, this
saves a process that is otherwise just going to be hanging around doing
nothing for the entire time your using X, usefull on machines with low
memory)

	xdm, on the other hand, is based around the idea of a session, which
is basicly loging in, doing something, and loging out again. it uses
'.xsession' as the script to run to setup x. if you don't have a .xsession
it runs xsm, the X session manager, this lest you save checkpoints which
records the programs running and what there windows are doing. I havn't
played with it much tho...

The best thing to do is to run xdm and use your own .xsession containing
something like:

#!/bin/sh
# example xsession

# at this point PATH will be the minimalist system default
# so add some usefull stuff to it...
PATH=${PATH}:/usr/local/bin:${HOME}/bin
export PATH

# make the beep really annoying (might not work on arm32?)
xset b 40 2200 1000

# add the freefonts package to the fontpath for gimp
#
xset fp+ /usr/X11R6.3/lib/X11/fonts/freefont
xset fp rehash

exec /usr/X11R6.3/bin/fvwm2

-- 
    They were so ignorant! Young men and women, educated very carefully to
be apolitical, to be technicians who thought they disliked politics, making
them putty in the hands of their rulers, just like always.
    - Frank Chalmers in Kim Stanley Robinson's "Red Mars".