Subject: Re: Keyboard or terminal problem?
To: None <netbsd-users@netbsd.org>
From: Frederick Bruckman <fredb@immanent.net>
List: netbsd-users
Date: 04/05/2005 16:11:01
In article <008a01c538aa$392048a0$df00a8c0@obliviondt>,
	"Ezequiel Reyes" <ezequiel.reyes@newhotel.co.cu> writes:
> I read the sh manual and put a line in the .profile giving value to the ENV
> variable, telling the shell to look for a .shrc file in the user home folder
> where I put the set -o emacs switch. It works ok whenever I login as root or
> any other user in text mode, but not so when login trough xdm. Any xterm I
> open has the ENV variable empty and thus, no emacs option defined for the
> shell in that terminal.

Think of "~/.xsession" as doing for xdm logins, what "~/.profile" does
for console logins, so you could simply duplicate much of "~/.profile"
in "~/.xsession".  Alternatively, you could source ~"/.profile" into
"~/.xsession". In "~/.profile", you might check for "$DISPLAY" to avoid
errors from "tset" or "stty" while under X:

if [ x"$DISPLAY" = x ]; then
    eval `tset -s -m 'Pc:wsvt25'`
fi
ENV="~/.shinit"		# ...or "~/.shrc".
export ENV
umask 022
# ...and so on.


Frederick