All pastes #2055301 Raw Edit

Unnamed

public text v1 · immutable
#2055301 ·published 2011-05-08 13:42 UTC
rendered paste body
#v3.02 set variables so everything can be found...
PATH="/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/X11R7/bin:/root/my-applications/bin"
LD_LIBRARY_PATH="/lib:/usr/lib:/usr/X11R7/lib:/root/my-applications/lib"
#needed for pkg-config app to work properly...
PKG_CONFIG_PATH="/usr/lib/pkgconfig"
if [ -d /opt/gnome2 ];then
 LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/opt/gnome2/lib"
 PATH="$PATH:/opt/gnome2/bin"
 PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/opt/gnome2/lib/pkgconfig"
fi
if [ -d /opt/qt4 ];then
 LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/opt/qt4/lib"
 [ -d /opt/qt4/bin ] && PATH="$PATH:/opt/qt4/bin" #if devx sfs.
 PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/opt/qt4/lib/pkgconfig"
 export QT4DIR="/opt/qt4"
 #export QTDIR="/opt/qt4" #i think v3.99removed.
 [ -d /opt/qt4/include ] && export CPLUS_INCLUDE_PATH="/opt/qt4/include" #devx
fi
#v3.99 added, for older qt3...
if [ -e /usr/lib/qt ];then
 export QTDIR=/usr/lib/qt
 [ -d /usr/lib/qt/bin ] && PATH=/usr/lib/qt/bin:${PATH}
 LD_LIBRARY_PATH=/usr/lib/qt/lib:$LD_LIBRARY_PATH
fi
export QT_XFT=true

if [ -d /opt/mozilla.org ];then
 [ -d /opt/mozilla.org/lib ] && LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/opt/mozilla.org/lib"
 [ -d /opt/mozilla.org/bin ] && PATH="$PATH:/opt/mozilla.org/bin" #may not exist.
 [ -d /opt/mozilla.org/lib/pkgconfig ] && PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/opt/mozilla.org/lib/pkgconfig"
 [ -e /opt/mozilla.org/lib/mozilla ] && export MOZILLA_FIVE_HOME="/opt/mozilla.org/lib/mozilla" #link created unleashed.
fi
MOZ_PLUGIN_PATH="/usr/lib/mozilla/plugins"
if [ -e /usr/lib/seamonkey ];then
 LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/lib/seamonkey"
 export MOZILLA_FIVE_HOME="/usr/lib/seamonkey"
 MOZ_PLUGIN_PATH="${MOZ_PLUGIN_PATH}:/usr/lib/seamonkey/plugins"
fi
if [ -d /opt/samba ];then
 LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/opt/samba/lib"
 PATH="$PATH:/opt/samba/bin"
fi
export PATH LD_LIBRARY_PATH PKG_CONFIG_PATH MOZ_PLUGIN_PATH
#some builds of moz need this, also maybe render faster...
export MOZ_DISABLE_PANGO=1

#for gtk...
export GDK_USE_XFT=1
#v4.00 for Open Office, force ue of GTK...
export OOO_FORCE_DESKTOP="gnome"

#100208 rox-filer needs this for GTK >= 2.18, fixes focus problem...
if [ `grep -E '^gtk+-2|libgtk2.0' /root/.packages/woof-installed-packages | head -n 1 | cut -f 3 -d '|' | cut -f 2 -d '.'` -ge 18 ];then
 export GDK_NATIVE_WINDOWS=true
fi

ulimit -c 0
if [ `id -gn` = `id -un` -a `id -u` -gt 14 ]; then
 umask 002
else
 umask 022
fi
USER=`id -un`
PS1="# "
LOGNAME=$USER
HISTSIZE=1000
HISTFILE="$HOME/.history"
EDITOR=mp
INPUTRC=/etc/inputrc

#TERM=linux
#v2.13... v405 remove...
#if [ -f /usr/bin/urxvt ];then
# #now using urxvt...
# TERM="rxvt-unicode"
#else
 TERM="xterm"
#fi

# used by XRN, change to your news server...
# NNTPSERVER="news.dodo.com.au"
# GS_FONTPATH="/usr/lib/X11/fonts/Type1"
export PS1 USER LOGNAME HISTSIZE INPUTRC EDITOR TERM
XFINANSDIR="/root/.xfinans"
export XFINANSDIR

#v2.10 MU: rox crashes with DRI modules. solution:
export XLIB_SKIP_ARGB_VISUALS=1



#this line gets edited by chooselocale script...
#LANG:en_US.utf8 w004 going back to non-utf8...
LANG=en_GB
export LANG

#v426 recommended by MU, avoid crashing for non-English locales on some apps...
export LC_COLLATE=en_US

#this is for antialiased fonts in gtk1 apps...
#LD_PRELOAD=/usr/lib/libgdkxft.so
#export LD_PRELOAD
#WISH mini-console needs this...
HOSTNAME="`cat /etc/hostname | tr -d "\n"`"
export HOSTNAME

#v2.17 have uncommented this...
SHELL="/bin/bash"
export SHELL
#...this causes a problem with characters in text-mode apps running in rxvt. for example, in mp
#a vertical line character displays as a 3. so leave the default shell as Busybox sh.
#...no, have a fix, from alienX. added TERM=xterm to /root/.bashrc.
#v2.0.0 additional note: now have /bin/sh a symlink to /bin/bash, so above not used.

#w003 no longer needed as woof now uses utf8...
#w004 no, leave in, have made utf8 optional...
##Sylpheed 2.0.1 requires this (also some other gtk2 apps)...
export G_FILENAME_ENCODING=@locale

#v1.0.6
#sylpheed uses metamail which requires this...
export MM_RUNASROOT=1

#v1.0.6
DEFAULTBROWSER="`cat /usr/local/bin/defaultbrowser | tail -n 1 | tr -s " " | cut -f 2 -d " "`"
DEFAULTDRAW="`cat /usr/local/bin/defaultdraw  | tail -n 1 | tr -s " " | cut -f 2 -d " "`"
DEFAULTHTMLEDITOR="`cat /usr/local/bin/defaulthtmleditor  | tail -n 1 | tr -s " " | cut -f 2 -d " "`"
DEFAULTMEDIAPLAYER="`cat /usr/local/bin/defaultmediaplayer  | tail -n 1 | tr -s " " | cut -f 2 -d " "`"
DEFAULTPAINT="`cat /usr/local/bin/defaultpaint  | tail -n 1 | tr -s " " | cut -f 2 -d " "`"
DEFAULTSPREADSHEET="`cat /usr/local/bin/defaultspreadsheet  | tail -n 1 | tr -s " " | cut -f 2 -d " "`"
DEFAULTTEXTEDITOR="`cat /usr/local/bin/defaulttexteditor  | tail -n 1 | tr -s " " | cut -f 2 -d " "`"
DEFAULTWORDPROCESSOR="`cat /usr/local/bin/defaultwordprocessor  | tail -n 1 | tr -s " " | cut -f 2 -d " "`"
DEFAULTIMAGEVIEWER="`cat /usr/local/bin/defaultimageviewer | tail -n 1 | tr -s " " | cut -f 2 -d " "`"
DEFAULTIMAGEEDITOR="`cat /usr/local/bin/defaultimageeditor | tail -n 1 | tr -s " " | cut -f 2 -d " "`"
export DEFAULTBROWSER DEFAULTDRAW DEFAULTHTMLEDITOR DEFAULTMEDIAPLAYER DEFAULTPAINT DEFAULTSPREADSHEET DEFAULTTEXTEDITOR DEFAULTWORDPROCESSOR DEFAULTIMAGEVIEWER DEFAULTIMAGEEDITOR

#v2.02 rarsa provided this...
#freedesktop base directory spec: standards.freedesktop.org/basedir-spec/latest/
export XDG_DATA_HOME=$HOME/.local/share
export XDG_CONFIG_HOME=$HOME/.config
export XDG_DATA_DIRS=/usr/share:/usr/local/share
export XDG_CONFIG_DIRS=/etc/xdg #v2.14 changed from /usr/etc
export XDG_CACHE_HOME=$HOME/.cache

#v2.13...
export HISTFILESIZE=2000
export HISTCONTROL=ignoredups

#v4.00 run e3vi whenever vi excuted...
alias vi=e3vi

#w468 'netpbm' utilities need to be told where rgb.txt is...
[ -f /usr/share/X11/rgb.txt ] && export RGBDEF=/usr/share/X11/rgb.txt

#w482 convenient to set this i think...
export PREFIX='/usr'

#v2.12
#xorgwizard creates this file, run once only...
if [ ! -f /tmp/bootcnt.txt ];then
 [ -f /etc/resolutionfix ] && eval `cat /etc/resolutionfix`
fi

#v4.84 Rox select problem
export GDK_NATIVE_WINDOWS=true

ulimit -c 0
if [ `id -gn` = `id -un` -a `id -u` -gt 14 ]; then
 umask 002
else
 umask 022
fi
USER=`id -un`
#PS1="# "
PS1="\[\e]2;\w\a\e[32m\]$USER\\$ \[\e[0m\]"
LOGNAME=$USER
HISTSIZE=1000
HISTFILE="$HOME/.history"
EDITOR=mp
INPUTRC=/etc/inputrc

#v2.16 this need arose when considering SFS files that may require special env. variables.
#this code is lifted straight from Vector...
# Append any additional sh scripts found in /etc/profile.d/:
#for profile_script in /etc/profile.d/*.sh ; do
for profile_script in /etc/profile.d/* ; do #w482 any files.
 [ "`echo -n "$profile_script" | grep 'txt$'`" != "" ] && continue #w482
  #if [ -x $profile_script ]; then
. $profile_script
  #fi
done
unset profile_script

#v2.16 have gone to full ls, now need this...
#auto: only creates ansi color codes if o/p to a tty, not in a script...
alias ls='ls --color=auto'
##v2.17 no color in terminal window. G2: sh (link to bash) does not read any
##config file, unless do this...
#export ENV="/root/.bashrc"
#...no, instead have exported SHELL=bash, see above.

#v1.0.5
#personal customisation file...
[ -r /etc/profile.local ] && . /etc/profile.local

if [ ! -f /usr/bin/X ];then
 #v2.00r1 now support a text-mode-only puppy...
 if [ -f /usr/local/bin/elinks ];then
  if [ ! -f /tmp/bootcnt.txt ];then
   touch /tmp/bootcnt.txt
   exec /usr/local/bin/elinks file:///usr/share/doc/index.html
  fi
 else
  echo
  echo "\\033[1;31mSorry, cannot start X. Link /usr/bin/X missing."
  echo -n "(suggestion: type 'xorgwizard' to run the Xorg Video Wizard)"
  echo -e "\\033[0;39m"
 fi
else
 #want to go straight into X on bootup only...
 if [ ! -f /tmp/bootcnt.txt ];then
  touch /tmp/bootcnt.txt
  # aplay -N /usr/share/audio/bark.au
  dmesg > /tmp/bootkernel.log
  exec xwin
 fi
fi