Virtual terminals

Tom Reingold tr at samadams.princeton.edu
Mon Nov 12 13:47:02 AEST 1990


In article <1990Oct27.191111.9448 at mccc.uucp> pjh at mccc.uucp (Pete
Holsberg) writes:

$ Forgive me if the answers are in TFM, but it's in my office and I'm at home.
$ 
$ 1)  How do I change the prompt that appears in a virtual terminal?
$ 
$ 2)  How do I export my login environment (or modify the default one)
$ when I start a new VT?

(Message outbox:1018)
From:     Tom Reingold <tr>
To:       pjh at mccc.uucp (Pete Holsberg)
Date:     Sun, 11 Nov 90 21:45:19 -0500
Subject:  Re: Virtual Terminals
Newsgroups: comp.sys.att,comp.unix.sysv386

In article <1990Oct29.000407.13391 at mccc.uucp> you write:
$ AT&T SV/386 R3.2.2
$ 
$ I have
$ 	ALTSHELL=YES
$ in /etc/default/login, and the SHELL variableis set to /bin/ksh. 
$ However, when I invoke a new virtual terminal -- either with the hot key
$ or via 'newvt' -- the shell in the new VT does not execute /etc/profile
$ and it does not execute $HOME/.profile!  It *does* execute /etc/env and
$ $HOME/.env!  
$ 
$ I tried 
$ 	newvt -e /bin/sh
$ but even that does not execute either /etc/profile or $HOME/.profile!!
$ 
$ Is this a bug or is there another of the seemingly endless flags that I
$ haven't discovered yet???

Shells such as Bourne shell and Korn shell execute /etc/profile and
.profile only when argv[0] starts with a '-'.  The same is true for
C-shell and the .login file.  .profile or .login is only for things
specific to logging in, such as setting terminal type.  C-Shell has
.cshrc for things you want to do every time you start a shell.  Korn
shell has the ENV file.  Bounre shell has nothing.

If you use Korn shell, set the ENV variable to a file such as
$HOME/.environ and there you can set your prompt, path, etc.
--
        Tom Reingold
        tr at samadams.princeton.edu  OR  ...!princeton!samadams!tr
        "Warning: Do not drive with Auto-Shade in place.  Remove
	from windshield before starting ignition."



More information about the Comp.sys.att mailing list