2 # $HOME/.profile (works with sh, ksh and bash)
5 # ~/.profile: executed by the command interpreter for login shells.
6 # This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login
8 # see /usr/share/doc/bash/examples/startup-files for examples.
9 # the files are located in the bash-doc package.
12 */*csh) SHELL=/bin/bash
14 # this is for bash.exe
16 *\\bash) SHELL=//c/ubin/bash
20 if [ -z "$USER" ]; then
21 USER="$LOGNAME"; export USER
24 # the default umask is set in /etc/profile; for setting the umask
25 # for ssh logins, install and configure the libpam-umask package.
28 ### umask sets a mask for the default file permissions,
29 ### umask 022 is less restrictive, 077 more paranoid
32 PATH="$HOME"/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
33 MANPATH="$HOME"/man:/usr/local/man:/usr/share/man:/usr/man
34 # LD_LIBRARY_PATH=/usr/local/lib:/usr/lib:/lib
35 export PATH MANPATH # LD_LIBRARY_PATH
40 *UTF-8) # LC_CTYPE is already set
43 *) LC_CTYPE=ru_RU.KOI8-R
46 LC_COLLATE="$LC_CTYPE"
48 export LANG LC_CTYPE LC_COLLATE
55 ### uncomment to select an alternate timezone (/etc/localtime is default)
56 # TZ=/usr/share/zoneinfo/Europe/Moscow; export TZ
58 ### NEWS Configuration
61 export ORGANIZATION # NNTPSERVER
63 (set -P 2>/dev/null) && set -P # follow physical paths, not symlinks
65 # Interactive only commands
67 if [ -z "$TERM" ]; then
68 eval `tset -Q -s -m 'network:?xterm'`
73 if [ -n "`which less 2>/dev/null`" ]; then
79 # mutt, python and vim
82 [ -n "$HAS_LESS" ] && . "$HOME"/lib/config/less/dark_bg
85 *rxvt*|screen*|*term*|vt100)
88 [ -n "$HAS_LESS" ] && . "$HOME"/lib/config/less/light_bg
92 if [ -x /usr/bin/dircolors ]; then
93 test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
96 if [ -n "$HAS_LESS" ]; then
100 *UTF-8) LESSCHARSET=utf-8
103 *) LESSCHARSET=koi8-r
107 LESSEDIT='vim ?lt+%lt. -- %f'
108 export LESS LESSCHARSET LESSEDIT # LESSCHARDEF
110 # make less more friendly for non-text input files, see lesspipe(1)
111 #[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
118 EDITOR="$HOME"/.vim/vim.sh
121 export EDITOR VISUAL FCEDIT
123 HISTCONTROL=ignoreboth
124 HISTIGNORE='&: *:x:X:[bf]g'
125 HISTFILE="$HOME/.sh_history"
128 export HISTCONTROL HISTIGNORE HISTFILE HISTFILESIZE HISTSIZE
130 # Used by bash/mc for hostname completion
131 HOSTFILE="$HOME"/lib/config/hosts
134 MAIL="/var/mail/$USER"
135 MAILPATH="$MAIL:$HOME/mail/admin:$HOME/mail/block:$HOME/mail/bulk"
136 if [ -d "$HOME"/mail/lists/ ]; then
137 MAILPATH="$MAILPATH:`echo $HOME/mail/lists/* | sed 's/ /:/g'`"
141 BROWSER="links2:links:elinks:w3m:lynx"
143 *rxvt*|screen*|*term*|vt100)
149 #all_proxy="http://localhost:3128"
150 #ftp_proxy="$all_proxy"
151 #gopher_proxy="$all_proxy"
152 #http_proxy="$all_proxy"
153 #https_proxy="$all_proxy"
154 auto_proxy="file:///home/phd/admin/WWW/Mozilla/mozilla.pac"
155 no_proxy="localhost,127.0.0.1"
156 #export all_proxy ftp_proxy http_proxy https_proxy auto_proxy no_proxy # gopher_proxy
157 export auto_proxy no_proxy
162 # set variable identifying the chroot you work in (used in the prompt below)
163 if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then
164 debian_chroot="`cat /etc/debian_chroot`"
169 # display the user, host and current working directory
170 # in the terminal title
172 *rxvt*|screen*|*term*|vt100)
173 OPS1="\[\033]0;${debian_chroot:+($debian_chroot)}\u@\h:\w\007\]"
176 OPS1=${OPS1}"\[\033k${debian_chroot:+($debian_chroot)}\u@\h:\w\033\\\\\]" # Set screen/tmux caption
186 OPS1=${OPS1}"${debian_chroot:+($debian_chroot)}\u@\h \W "
190 OPS1="${debian_chroot:+($debian_chroot)}`/usr/bin/whoami`@`/bin/hostname -s` "
195 export OPS1 # PROMPT_DIRTRIM
197 ### biff controls new mail notification
199 ### mesg controls messages (write/talk) from other users
201 # make mail(1) use a pager
204 PYTHONSTARTUP="$HOME"/lib/python/init.py
208 email="phd@phdru.name"
210 GIT_AUTHOR_NAME="$name"
211 GIT_AUTHOR_EMAIL="$email"
212 GIT_COMMITTER_NAME="$name"
213 GIT_COMMITTER_EMAIL="$email"
214 export GIT_AUTHOR_NAME GIT_AUTHOR_EMAIL GIT_COMMITTER_NAME GIT_COMMITTER_EMAIL
216 HGUSER="$name <$email>"
221 if test -f .hushlogin && ! cmp -s .motd /etc/motd; then
222 tee $HOME/.motd < /etc/motd
226 # No need to set DISPLAY - ssh sets DISPLAY and calls xauth
227 #DISPLAY="`who am i | awk '{print substr($6, 2, length($6)-2 )}' | sed -e 's/:.*$//'`:0.0"
230 if [ -n "$DISPLAY" ]; then
231 # mutt, python and vim
234 [ -n "$HAS_LESS" ] && . "$HOME"/lib/config/less/light_bg
237 BROWSER="firefox:seamonkey:chromium:google-chrome:opera:xlinks2:$BROWSER"
239 ### X Window System Configuration
240 #XAPPLRESDIR="$HOME/lib/X11/app-defaults/"; export XAPPLRESDIR
241 ### Old-style XNLSPATH
242 #XNLSPATH=/usr/X11R6/lib/X11/nls; export XNLSPATH
244 # For GTK2/GLib to convert filenames between internal and locale encodings
245 G_FILENAME_ENCODING="@locale"
246 export G_FILENAME_ENCODING
247 #G_BROKEN_FILENAMES=1
248 #export G_BROKEN_FILENAMES
250 # X Input Method, for Multi key (Compose) to work
253 export GTK_IM_MODULE QT_IM_MODULE
259 # nVidia OpenGL full scene anti-aliasing
261 #export __GL_FSAA_MODE
264 [ -n "$HAS_LESS" ] && unset HAS_LESS
267 # read in usepkg function
268 # . "$HOME"/lib/config/usepkg.sh
276 # If SUN console, start the windows system
278 # if [ `tty` = /dev/console ] ; then
279 # if [ "$TERM" = sun -o "$TERM" = AT386 ] ; then
281 # if [ ${OPENWINHOME:-""} = "" ] ; then
282 # OPENWINHOME=/usr/openwin
287 # echo "Starting OpenWindows in 5 seconds (type Control-C to interrupt)"
290 # "$OPENWINHOME"/bin/openwin
292 # clear # get rid of annoying cursor rectangle
293 # #exit # logout after leaving windows system