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'`
65 # mutt, python and vim
68 . "$HOME"/lib/config/less/dark_bg
71 *rxvt*|screen*|*term*|vt100)
74 . "$HOME"/lib/config/less/light_bg
78 if [ -x /usr/bin/dircolors ]; then
79 test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
85 *UTF-8) LESSCHARSET=utf-8
92 LESSEDIT='vim ?lt+%lt. -- %f'
93 export PAGER LESS LESSCHARSET LESSEDIT # LESSCHARDEF
95 EDITOR="$HOME"/.vim/vim.sh
98 export EDITOR VISUAL FCEDIT
100 HISTCONTROL=ignoreboth
101 HISTIGNORE='&: *:x:X:[bf]g'
102 HISTFILE="$HOME/.sh_history"
105 export HISTCONTROL HISTIGNORE HISTFILE HISTFILESIZE HISTSIZE
107 # Used by bash/mc for hostname completion
108 HOSTFILE="$HOME"/lib/config/hosts
111 MAIL="/var/mail/$USER"
112 MAILPATH="$MAIL:$HOME/mail/admin:$HOME/mail/block:$HOME/mail/bulk"
113 if [ -d "$HOME"/mail/lists/ ]; then
114 MAILPATH="$MAILPATH:`echo $HOME/mail/lists/* | sed 's/ /:/g'`"
118 BROWSER="links2:links:elinks:w3m:lynx"
120 *rxvt*|screen*|*term*|vt100)
126 #all_proxy="http://localhost:3128"
127 #ftp_proxy="$all_proxy"
128 #gopher_proxy="$all_proxy"
129 #http_proxy="$all_proxy"
130 #https_proxy="$all_proxy"
131 auto_proxy="file:///home/phd/admin/WWW/Mozilla/mozilla.pac"
132 no_proxy="localhost,127.0.0.1"
133 #export all_proxy ftp_proxy http_proxy https_proxy auto_proxy no_proxy # gopher_proxy
134 export auto_proxy no_proxy
141 shopt -s checkwinsize
142 # display the user, host and current working directory
143 # in the terminal title
145 *rxvt*|screen*|*term*|vt100)
146 OPS1="\[\033]0;\u@\h:\w\007\]"
149 OPS1=${OPS1}"\[\033k\u@\h:\w\033\\\]" # Set screen/tmux caption
159 OPS1=${OPS1}"\u@\h \W "
163 OPS1="`/usr/bin/whoami`@`/bin/hostname -s` "
168 export OPS1 # PROMPT_DIRTRIM
170 ### biff controls new mail notification
172 ### mesg controls messages (write/talk) from other users
174 # make mail(1) use a pager
177 PYTHONSTARTUP="$HOME"/lib/python/init.py
181 email="phd@phdru.name"
183 GIT_AUTHOR_NAME="$name"
184 GIT_AUTHOR_EMAIL="$email"
185 GIT_COMMITTER_NAME="$name"
186 GIT_COMMITTER_EMAIL="$email"
187 export GIT_AUTHOR_NAME GIT_AUTHOR_EMAIL GIT_COMMITTER_NAME GIT_COMMITTER_EMAIL
189 HGUSER="$name <$email>"
194 if test -f .hushlogin && ! cmp -s .motd /etc/motd; then
195 tee $HOME/.motd < /etc/motd
199 # No need to set DISPLAY - ssh sets DISPLAY and calls xauth
200 #DISPLAY="`who am i | awk '{print substr($6, 2, length($6)-2 )}' | sed -e 's/:.*$//'`:0.0"
203 if [ -n "$DISPLAY" ]; then
204 # mutt, python and vim
207 . "$HOME"/lib/config/less/light_bg
210 BROWSER="firefox:seamonkey:chromium:google-chrome:opera:xlinks2:$BROWSER"
212 ### X Window System Configuration
213 #XAPPLRESDIR="$HOME/lib/X11/app-defaults/"; export XAPPLRESDIR
214 ### Old-style XNLSPATH
215 #XNLSPATH=/usr/X11R6/lib/X11/nls; export XNLSPATH
217 # For GTK2/GLib to convert filenames between internal and locale encodings
218 G_FILENAME_ENCODING="@locale"
219 export G_FILENAME_ENCODING
220 #G_BROKEN_FILENAMES=1
221 #export G_BROKEN_FILENAMES
223 # X Input Method, for Multi key (Compose) to work
226 export GTK_IM_MODULE QT_IM_MODULE
232 # nVidia OpenGL full scene anti-aliasing
234 #export __GL_FSAA_MODE
238 # read in usepkg function
239 # . "$HOME"/lib/config/usepkg.sh
247 # If SUN console, start the windows system
249 # if [ `tty` = /dev/console ] ; then
250 # if [ "$TERM" = sun -o "$TERM" = AT386 ] ; then
252 # if [ ${OPENWINHOME:-""} = "" ] ; then
253 # OPENWINHOME=/usr/openwin
258 # echo "Starting OpenWindows in 5 seconds (type Control-C to interrupt)"
261 # "$OPENWINHOME"/bin/openwin
263 # clear # get rid of annoying cursor rectangle
264 # #exit # logout after leaving windows system