2 # $HOME/.profile (works with sh, ksh and bash)
6 */*csh) SHELL=/bin/bash
10 *\\bash) SHELL=//c/ubin/bash
14 if [ -z "$USER" ]; then
15 USER="$LOGNAME"; export USER
18 ### umask sets a mask for the default file permissions,
19 ### umask 022 is less restrictive, 077 more paranoid
22 PATH="$HOME"/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
23 MANPATH="$HOME"/man:/usr/local/man:/usr/share/man:/usr/man
24 # LD_LIBRARY_PATH=/usr/local/lib:/usr/lib:/lib
25 export PATH MANPATH # LD_LIBRARY_PATH
30 *UTF-8) # LC_CTYPE is already set
33 *) LC_CTYPE=ru_RU.KOI8-R
36 LC_COLLATE="$LC_CTYPE"
38 export LANG LC_CTYPE LC_COLLATE
45 ### uncomment to select an alternate timezone (/etc/localtime is default)
46 # TZ=/usr/share/zoneinfo/Europe/Moscow; export TZ
48 ### NEWS Configuration
51 export ORGANIZATION # NNTPSERVER
53 (set -P 2>/dev/null) && set -P # follow physical paths, not symlinks
55 # Interactive only commands
57 if [ -z "$TERM" ]; then
58 eval `tset -Q -s -m 'network:?xterm'`
63 if [ -n "`which less 2>/dev/null`" ]; then
69 # mutt, python and vim
72 [ -n "$HAS_LESS" ] && . "$HOME"/lib/config/less/dark_bg
75 *rxvt*|screen*|*term*|vt100)
78 [ -n "$HAS_LESS" ] && . "$HOME"/lib/config/less/light_bg
82 if [ -x /usr/bin/dircolors ]; then
83 test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
86 if [ -n "$HAS_LESS" ]; then
90 *UTF-8) LESSCHARSET=utf-8
97 LESSEDIT='vim ?lt+%lt. -- %f'
98 export LESS LESSCHARSET LESSEDIT # LESSCHARDEF
105 EDITOR="$HOME"/.vim/vim.sh
108 export EDITOR VISUAL FCEDIT
110 HISTCONTROL=ignoreboth
111 HISTIGNORE='&: *:x:X:[bf]g'
112 HISTFILE="$HOME/.sh_history"
115 export HISTCONTROL HISTIGNORE HISTFILE HISTFILESIZE HISTSIZE
117 # Used by bash/mc for hostname completion
118 HOSTFILE="$HOME"/lib/config/hosts
121 MAIL="/var/mail/$USER"
122 MAILPATH="$MAIL:$HOME/mail/admin:$HOME/mail/block:$HOME/mail/bulk"
123 if [ -d "$HOME"/mail/lists/ ]; then
124 MAILPATH="$MAILPATH:`echo $HOME/mail/lists/* | sed 's/ /:/g'`"
128 BROWSER="links2:links:elinks:w3m:lynx"
130 *rxvt*|screen*|*term*|vt100)
136 #all_proxy="http://localhost:3128"
137 #ftp_proxy="$all_proxy"
138 #gopher_proxy="$all_proxy"
139 #http_proxy="$all_proxy"
140 #https_proxy="$all_proxy"
141 auto_proxy="file:///home/phd/admin/WWW/Mozilla/mozilla.pac"
142 no_proxy="localhost,127.0.0.1"
143 #export all_proxy ftp_proxy http_proxy https_proxy auto_proxy no_proxy # gopher_proxy
144 export auto_proxy no_proxy
151 shopt -s checkwinsize
152 # display the user, host and current working directory
153 # in the terminal title
155 *rxvt*|screen*|*term*|vt100)
156 OPS1="\[\033]0;\u@\h:\w\007\]"
159 OPS1=${OPS1}"\[\033k\u@\h:\w\033\\\\\]" # Set screen/tmux caption
169 OPS1=${OPS1}"\u@\h \W "
173 OPS1="`/usr/bin/whoami`@`/bin/hostname -s` "
178 export OPS1 # PROMPT_DIRTRIM
180 ### biff controls new mail notification
182 ### mesg controls messages (write/talk) from other users
184 # make mail(1) use a pager
187 PYTHONSTARTUP="$HOME"/lib/python/init.py
191 email="phd@phdru.name"
193 GIT_AUTHOR_NAME="$name"
194 GIT_AUTHOR_EMAIL="$email"
195 GIT_COMMITTER_NAME="$name"
196 GIT_COMMITTER_EMAIL="$email"
197 export GIT_AUTHOR_NAME GIT_AUTHOR_EMAIL GIT_COMMITTER_NAME GIT_COMMITTER_EMAIL
199 HGUSER="$name <$email>"
204 if test -f .hushlogin && ! cmp -s .motd /etc/motd; then
205 tee $HOME/.motd < /etc/motd
209 # No need to set DISPLAY - ssh sets DISPLAY and calls xauth
210 #DISPLAY="`who am i | awk '{print substr($6, 2, length($6)-2 )}' | sed -e 's/:.*$//'`:0.0"
213 if [ -n "$DISPLAY" ]; then
214 # mutt, python and vim
217 [ -n "$HAS_LESS" ] && . "$HOME"/lib/config/less/light_bg
220 BROWSER="firefox:seamonkey:chromium:google-chrome:opera:xlinks2:$BROWSER"
222 ### X Window System Configuration
223 #XAPPLRESDIR="$HOME/lib/X11/app-defaults/"; export XAPPLRESDIR
224 ### Old-style XNLSPATH
225 #XNLSPATH=/usr/X11R6/lib/X11/nls; export XNLSPATH
227 # For GTK2/GLib to convert filenames between internal and locale encodings
228 G_FILENAME_ENCODING="@locale"
229 export G_FILENAME_ENCODING
230 #G_BROKEN_FILENAMES=1
231 #export G_BROKEN_FILENAMES
233 # X Input Method, for Multi key (Compose) to work
236 export GTK_IM_MODULE QT_IM_MODULE
242 # nVidia OpenGL full scene anti-aliasing
244 #export __GL_FSAA_MODE
247 [ -n "$HAS_LESS" ] && unset HAS_LESS
250 # read in usepkg function
251 # . "$HOME"/lib/config/usepkg.sh
259 # If SUN console, start the windows system
261 # if [ `tty` = /dev/console ] ; then
262 # if [ "$TERM" = sun -o "$TERM" = AT386 ] ; then
264 # if [ ${OPENWINHOME:-""} = "" ] ; then
265 # OPENWINHOME=/usr/openwin
270 # echo "Starting OpenWindows in 5 seconds (type Control-C to interrupt)"
273 # "$OPENWINHOME"/bin/openwin
275 # clear # get rid of annoying cursor rectangle
276 # #exit # logout after leaving windows system