[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Where can I set environnement variables?
- To: e.conti@gmx.net
- Subject: Re: Where can I set environnement variables?
- From: Rick Barter <rvb@houston.rr.com>
- Date: Sat, 01 Nov 2003 07:58:32 -0600
- Cc: OpenBSD <misc@openbsd.org>
- References: <20031023001550.437ced80.cp@teamrci.net> <004c01c39fe8$c6ff1220$0100a8c0@ningenkai> <Pine.BSO.4.58.0310311508270.13388@af.pbqrshfvbavf.pbz> <200311010220.14747.e.conti@gmx.net>
- User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.5) Gecko/20031013 Thunderbird/0.3
e.conti@gmx.net wrote:
> Hello,
>
> New to OpenBSD (it rocks!), I can't find where I could set the terminal type.
> Each time I log in, I'm asked for the terminal type.
> I'd like to use vi keys bindings in the shell. On SunOS, I used to type set -o
> vi. However, that does not work in the shell I'm using. Can I use vi keys in
> csh? Do I have to use ksh?
>
> Thanks for the help
>
If you do decide to use ksh, the environment variables will go either
in .profile or .kshrc. Check out man ksh for this. OpenBSD comes
with pdksh as the ksh shell and to set vi as your command-line editor
you can do: set -o vi.
Or, what I use because I like to use ESC for command completion, is:
set -o vi-esccomplete.
I've pasted sections of my .kshrc and .profile files to give you some
examples. I have .profile source in .kshrc at the end. If you have
any questions, drop me an email.
I hope this helps,
rvb
===============================
.profile
===============================
######################################
# Kornshell configuration file
######################################
# setup the history file and its size
HISTFILE=${HOME}/.sh_history
HISTSIZE=1000
# set the editor variable
# and make it available to all shells
EDITOR=vi
export EDITOR
# set the command-line editor
set -o vi-esccomplete
# set the prompt
PS1='`hostname`: ${PWD#${HOME}/} $ '
export PS1
# set the BLOCKSIZE for use with pstat -s
# specifically and any command that supports
# the BLOCKSIZE environment variable generally
BLOCKSIZE=1m
export BLOCKSIZE
# set the aliases
alias ls="ls -F"
alias ll="ls -alF"
===============================
.kshrc
===============================
######################################
# Environment Variables for CVS
######################################
# CVSROOT=anoncvs@exokernel.lcs.mit.edu:/cvs
CVSROOT=anoncvs@anoncvs1.ca.openbsd.org:/cvs
export CVSROOT
######################################
# Environment Variables for Java
######################################
JAVA_HOME=/usr/local/jdk1.3.1-linux; export JAVA_HOME
JAVA_BIN=/usr/local/jdk1.3.1-linux/bin; export JAVA_BIN
J2EE_HOME=/usr/local/j2sdkee1.3.1; export J2EE_HOME
J2EE_BIN=/usr/local/j2sdkee1.3.1/bin; export J2EE_BIN
J2EE_JAR=/usr/local/j2sdkee1.3.1/lib/j2ee.jar; export J2EE_JAR
######################################
# Environment Variables for Tomcat
######################################
CATALINA_HOME=/usr/local/jakarta-tomcat-4.1.18; export CATALINA_HOME
PATH=$HOME:.:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin
PATH=$PATH:/usr/local/sbin:/usr/games:/var/www/cgi-bin
PATH=$PATH:$JAVA_HOME:$JAVA_BIN:J2EE_HOME:J2EE_BIN:J2EE_JAR
export PATH HOME TERM
# source in the .kshrc file
. $HOME/.kshrc
######################################
# Alias required to specify the
# classpath used by the Java compiler
# (javac) for compiling Servlets.
#
# The Java compiler (javac) chokes if
# the CLASSPATH variable is set, but
# works if it's passed on the command-line
######################################
alias javac='javac -classpath /usr/local/j2sdkee1.3/lib/j2ee.jar '
alias java='java -cp /home/rvb01/ '
alias servlet='cd
/usr/local/jakarta-tomcat-4.1.18/webapps/examples/WEB-INF/classes'