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.
11 #if test -n "$BASH_VERSION"; then
13 #elif test -n "$KSH_VERSION"; then
15 #elif test -n "$FCEDIT"; then
17 #elif test -n "$ZSH_VERSION"; then
19 #elif test -n "$PS3"; then
25 if [ -z "$USER" ]; then
26 USER="$LOGNAME"; export USER
29 # the default umask is set in /etc/profile; for setting the umask
30 # for ssh logins, install and configure the libpam-umask package.
33 ### umask sets a mask for the default file permissions,
34 ### umask 022 is less restrictive, 077 more paranoid
37 PATH="$HOME"/bin:"$HOME"/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
38 # MANPATH="$HOME"/man:/usr/local/man:/usr/share/man:/usr/man
39 # LD_LIBRARY_PATH=/usr/local/lib:/usr/lib:/lib
40 export PATH # MANPATH # LD_LIBRARY_PATH
45 *UTF-8) # LC_CTYPE is already set
48 *) LC_CTYPE=ru_RU.KOI8-R
51 LC_COLLATE="$LC_CTYPE"
53 export LANG LC_CTYPE LC_COLLATE
60 ### uncomment to select an alternate timezone (/etc/localtime is default)
61 # TZ=/usr/share/zoneinfo/Europe/Moscow; export TZ
63 ### NEWS Configuration
66 export ORGANIZATION # NNTPSERVER
68 (set -P 2>/dev/null) && set -P # follow physical paths, not symlinks
70 # Interactive only commands
72 #if test -f .hushlogin && ! cmp -s .motd /etc/motd; then
73 # tee $HOME/.motd < /etc/motd
76 if [ -z "$TERM" ]; then
77 eval `tset -Q -s -m 'network:?xterm'`
82 if which less >/dev/null 2>&1; then
88 # mutt, python and vim
91 [ -n "$HAS_LESS" ] && . "$HOME"/lib/config/less/dark_bg
94 *rxvt*|screen*|*term*|vt100)
97 [ -n "$HAS_LESS" ] && . "$HOME"/lib/config/less/light_bg
101 if [ -x /usr/bin/dircolors ]; then
102 test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
105 if [ -n "$HAS_LESS" ]; then
109 *UTF-8) LESSCHARSET=utf-8
112 *) LESSCHARSET=koi8-r
116 LESSEDIT='vim ?lt+%lt. -- %f'
117 export LESS LESSCHARSET LESSEDIT # LESSCHARDEF
119 # make less more friendly for non-text input files, see lesspipe(1)
120 #[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
127 EDITOR="$HOME"/.vim/vim.sh
130 export EDITOR FCEDIT VISUAL
132 FIGNORE='.o:~:.pyc:.pyo:.tmp*'
135 HISTCONTROL=erasedups:ignoreboth
136 HISTIGNORE='&: *:?:??:clear:exit:logout:llp'
137 HISTFILE="$HOME/.sh_history"
140 HISTTIMEFORMAT='%Y-%m-%d %T '
141 export HISTCONTROL HISTIGNORE HISTFILE HISTFILESIZE HISTSIZE HISTTIMEFORMAT
143 # Used by bash/mc for hostname completion
144 HOSTFILE="$HOME"/lib/config/hosts
147 MAIL="/var/mail/$USER"
148 MAILPATH="$MAIL:$HOME/mail/admin:$HOME/mail/block:$HOME/mail/bulk"
149 if [ -d "$HOME"/mail/lists/ ]; then
150 MAILPATH="$MAILPATH:`echo $HOME/mail/lists/* | sed 's/ /:/g'`"
153 if [ -n "$STY" -a "$WINDOW" != 0 ]; then
157 BROWSER="links2:links:elinks:w3m:lynx"
159 *rxvt*|screen*|*term*|vt100)
165 #all_proxy="http://localhost:3128"
166 #ftp_proxy="$all_proxy"
167 #gopher_proxy="$all_proxy"
168 #http_proxy="$all_proxy"
169 #https_proxy="$all_proxy"
170 auto_proxy="file:///home/phd/admin/WWW/Mozilla/mozilla.pac"
171 no_proxy="localhost,127.0.0.1"
172 #export all_proxy ftp_proxy http_proxy https_proxy auto_proxy no_proxy # gopher_proxy
173 export auto_proxy no_proxy
178 # set variable identifying the chroot you work in (used in the prompt below)
179 if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then
180 debian_chroot="`cat /etc/debian_chroot`"
183 if test -n "$BASH_VERSION"; then
186 PS1="${debian_chroot:+($debian_chroot)}`/usr/bin/whoami`@`/bin/hostname -s` > "
189 ### biff controls new mail notification
191 ### mesg controls messages (write/talk) from other users
193 # make mail(1) use a pager
196 PYTHONSTARTUP="$HOME"/lib/python/init.py
200 email="phd@phdru.name"
202 GIT_AUTHOR_NAME="$name"
203 GIT_AUTHOR_EMAIL="$email"
204 GIT_COMMITTER_NAME="$name"
205 GIT_COMMITTER_EMAIL="$email"
206 export GIT_AUTHOR_NAME GIT_AUTHOR_EMAIL GIT_COMMITTER_NAME GIT_COMMITTER_EMAIL
208 HGUSER="$name <$email>"
213 # Enable plumbing commands to be completed
214 GIT_COMPLETION_SHOW_ALL_COMMANDS=1
215 export GIT_COMPLETION_SHOW_ALL_COMMANDS
217 #SCREENDIR="$HOME"/tmp/screen
219 #mkdir -p "$SCREENDIR"
220 #chmod 700 "$SCREENDIR"
223 # No need to set DISPLAY - ssh sets DISPLAY and calls xauth
224 #DISPLAY="`who am i | awk '{print substr($6, 2, length($6)-2 )}' | sed -e 's/:.*$//'`:0.0"
227 if [ -n "$DISPLAY" ]; then
228 #xhost +local:root > /dev/null 2>&1
229 PATH=$PATH:/usr/games
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
263 # Bigger fonts for Qt
264 QT_QPA_PLATFORMTHEME=qt5ct
266 export QT_QPA_PLATFORMTHEME #QT_SCALE_FACTOR
269 [ -n "$HAS_LESS" ] && unset HAS_LESS
272 # read in usepkg function
273 # . "$HOME"/lib/config/usepkg.sh
281 # If SUN console, start the windows system
283 # if [ `tty` = /dev/console ] ; then
284 # if [ "$TERM" = sun -o "$TERM" = AT386 ] ; then
286 # if [ ${OPENWINHOME:-""} = "" ] ; then
287 # OPENWINHOME=/usr/openwin
292 # echo "Starting OpenWindows in 5 seconds (type Control-C to interrupt)"
295 # "$OPENWINHOME"/bin/openwin
297 # clear # get rid of annoying cursor rectangle
298 # #exit # logout after leaving windows system