From: Bob Spratt (bobs@oakbrook)
Date: 04/12/93


From: bobs@oakbrook (Bob Spratt)
Subject: Re: settings for xterm
Date: 12 Apr 1993 22:47:56 GMT

Chris Newton (u0xh@jupiter.sun.csd.unb.ca) wrote:

: When I login as root, and run Xwindows, my xterms have this
: propmpt '#'. When I login as a user, they have this prompt '$'. When I
: boot linux, my shells have this prompt 'Terra [/] {root.500}%' which
: translates into 'machine-name [path] {user.command-#}%'. I would like to
: have this prompt for all my xterms also, but cannot find the correct
: config files to change. Anyone know?
: Also, the .bash-history file keeps the last 500 messages in there.
: Is there anyway to have it so that everytime the user logs in for the
: first time that day, the .bash-history file is empty? I dont need the
: last 500 commands I typed!

: Thanks in advance for any help

: Chris

Sorry about the blank response here is what I meant to send

The xterm problem problem can be solved in the following way:

You can start xterm with the -ls options or specify the
following line in your $HOME/.Xdefaults file
xterm*loginShell: true

The history question can be resolved by changing the login initialization
program to just do a "> $HOME/.bash_history" but you should keep in mind
that anytime you run a program that spawns a new shell and reruns the
initialization process ( like the first question about xterm ), it will
set this file to zero. Maybe you can try to determine if that user is
already logged on to the system and if not, then initialize the history
file. I am not yet familiar with bash but in ksh it could be done for
all users in the /etc/profile script and if you only want it to be done
for select users, then you could create a .profile in your HOME directory.

Bob Spratt EMAIL: bobs@oakbrook.oak.isc-br.com
Olivetti North America
1315 West 22nd Street
Suite 410
Oak Brook, Il 60521

(708) 573-5923