[comp.sys.hp] HP-UX 8.0 and stty settings

pbrooks@mentorg.com (Phil Brooks) (06/18/91)

I have recently installed HP-UX 8.0 on my 845 and the behavior of the 
stty inheritance seems to have changed.  They used to get set when I logged
in from /etc/profile (things like stty erase ^H).

Now, when I log in (terminal mode) the settings get set, but when I start
mwm up via x11start, the xterms and/or hpterms don't inherit any stty 
settings unless I use the -ls (act as a login shell).

This isn't consistent with other systems nor (it seems) with HP-UX 7.0.
I have asked around a little here and everyone says "Oh, I just changed
all of my menus and my .x11start file to use -ls".  This does not seem to
be the right answer to me.  It seems that everything should inherit nicely
from the initial shell.  

Has anyone else noticed this?  Is there a reasonable answer for why the
change was made?

To duplicate this, you can use the generic sys.x11start file and run 
x11start from the terminal mode.  stty settings present in the console
terminal session will be gone in the x11start session.


-- 
Phil Brooks, Mentor Graphics Corporation 
(phil_brooks@mentorg.com)
8005 SW Boeckman Road
Wilsonville, OR   97070-7777 (503) 685-1324

stroyan@hpfcso.FC.HP.COM (Mike Stroyan) (06/19/91)

> I have recently installed HP-UX 8.0 on my 845 and the behavior of the 
> stty inheritance seems to have changed.  They used to get set when I logged
> in from /etc/profile (things like stty erase ^H).
> 
> Now, when I log in (terminal mode) the settings get set, but when I start
> mwm up via x11start, the xterms and/or hpterms don't inherit any stty 
> settings unless I use the -ls (act as a login shell).

Because the default login sequence is straight to X through the Vuelogin
screen, there is often no initial stty setting to inherit.  The 8.0
version of hpterm has default stty settings that can be modified by X
resources.  The following is an excerpt from the hpterm manual entry.

> ttyModes
>   This resource specifies a string containing terminal-setting
>   keywords and the characters to which they may be bound.
>   Allowable keywords include: intr, quit, erase, kill, eof, eol,
>   swtch, start, stop, brk, susp, dsusp, rprnt, flush, weras, and
>   Inext.  Control characters may be specified as ^char (e.g. ^c or
>   ^u), and ^? may be used to indicate delete.  This is very useful
>   for overriding the default terminal settings without having to do
>   an stty every time an hpterm is started.

The resource can be set with a line like "*ttyModes: erase ^H" in .Xdefaults
or can be merged into the xrdb settings using "xrdb -merge" if you are
using HP-VUE or xrdb.

Mike Stroyan, mike_stroyan@fc.hp.com

paul@eye.com (Paul B. Booth) (06/19/91)

In article <1991Jun17.231236.25720@apd.mentorg.com> pbrooks@mentorg.com (Phil Brooks) writes:
>
>I have recently installed HP-UX 8.0 on my 845 and the behavior of the 
>stty inheritance seems to have changed.  They used to get set when I logged
>in from /etc/profile (things like stty erase ^H).
>
>.....
>
>Has anyone else noticed this?  Is there a reasonable answer for why the
>change was made?
>
Yeah, what's up guys?  I've seen the same thing on a 300 version of 8.0
as well as 8.01 on a cobra.  Stty inheritance seems to be ok _if_ you're
running Vue, but falls apart when you startup plain ol' X.  I hope this isn't
some kind of subtle hint :-) , especially, since vue seems to have a few
dandy "features" of it's own:

    * Randomly, under 8.0, logging out can case vue to wipe $HOME/.vue clean.
      This effectively wipes out your defaults, home session, etc.  Very nice.

    * When you save a home session, vue mis-writes certain parts of the file
      ".../home/vue.resources"  Here's an example line:

      > Vuewm*interactivePlacement:   True Vuewm*matteWidth:  10

      Of course, this results in both resources remaining unset.

Hopefully, we can chalk this up to pre-release versionitis? Please??
--
Paul B. Booth  (paul@eye.com) (...!hplabs!hpfcla!eye!paul)
-------------------------------------------------------------------------------
3D/EYE, Inc., 2359 N. Triphammer Rd., Ithaca, NY  14850    voice: (607)257-1381
                                                             fax: (607)257-7335

chris@rz.uni-karlsruhe.de (Christian Finger) (06/19/91)

In article <1991Jun17.231236.25720@apd.mentorg.com>, pbrooks@mentorg.com
(Phil Brooks) writes:
|> 
|> I have recently installed HP-UX 8.0 on my 845 and the behavior of the 
|> stty inheritance seems to have changed.  They used to get set when I logged
|> in from /etc/profile (things like stty erase ^H).
|> 
|> Now, when I log in (terminal mode) the settings get set, but when I start
|> mwm up via x11start, the xterms and/or hpterms don't inherit any stty 
|> settings unless I use the -ls (act as a login shell).
|> 
|> This isn't consistent with other systems nor (it seems) with HP-UX 7.0.
|> I have asked around a little here and everyone says "Oh, I just changed
|> all of my menus and my .x11start file to use -ls".  This does not seem to
|> be the right answer to me.  It seems that everything should inherit nicely
|> from the initial shell.  
|> 
|> Has anyone else noticed this?  Is there a reasonable answer for why the
|> change was made?
|> 
|> To duplicate this, you can use the generic sys.x11start file and run 
|> x11start from the terminal mode.  stty settings present in the console
|> terminal session will be gone in the x11start session.
|> 
|> 
|> -- 
|> Phil Brooks, Mentor Graphics Corporation 
|> (phil_brooks@mentorg.com)
|> 8005 SW Boeckman Road
|> Wilsonville, OR   97070-7777 (503) 685-1324

We had the same effect with HP-UX 8.01 on a s720.

The X windows terminal emulators try to get their tty settings from their
controlling terminal.  In X11R4 the behavior of xinit starting clients has
changed.  They are started without a controlling terminal.  In X11R3 the
terminal you started X windows from became controlling terminal.
Just take a look on the output of 'ps -ef' on HP-UX 7.x and HP-UX 8.x.
Using an old xinit is possible, but I wouldn't suggest it.

You'll have to set some resource strings (as mentioned in another posting).

Ciao

- --  ---   ----    -----     ------      -------       --------        --
  .     Christian Finger         |   SMTP:
 |||    Computer Center          |   finger@rz.uni-karlsruhe.de
\|||    University of Karlsruhe  |   X.400:
    /   D-7500 Karlsruhe 1       |   finger@rz.uni-karlsruhe.dbp.de