Xref: utzoo comp.sys.att:10801 comp.unix.sysv386:2058 Path: utzoo!utgpu!news-server.csri.toronto.edu!clyde.concordia.ca!uunet!samsung!emory!gatech!udel!princeton!cs!samadams!tr From: tr@samadams.princeton.edu (Tom Reingold) Newsgroups: comp.sys.att,comp.unix.sysv386 Subject: Re: Virtual terminals Message-ID: <4367@rossignol.Princeton.EDU> Date: 12 Nov 90 02:47:02 GMT References: <1990Oct27.191111.9448@mccc.uucp> Sender: news@cs.Princeton.EDU Followup-To: comp.sys.att Organization: Noo Joizy -- The Cultural Mecca Lines: 49 In article <1990Oct27.191111.9448@mccc.uucp> pjh@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 To: pjh@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@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@samadams.princeton.edu OR ...!princeton!samadams!tr "Warning: Do not drive with Auto-Shade in place. Remove from windshield before starting ignition."