Advertisement
s243a

/etc/profile

Aug 4th, 2019
252
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 6.63 KB | None | 0 0
  1. #set variables so everything can be found...
  2. #100622 PKG_CONFIG_PATH is determined in 3builddistro (Woof), written to /etc/profile.d/pkgconfig
  3. #110426 added /usr/games to PATH
  4. #110804 fix double-login when exit from X, allow /etc/profile to complete. see also "echo -n '# '" in /usr/bin/xwin at exit.
  5. #110807 revert 110804
  6. #120221 moved code to start X to /root/.profile
  7. #120525 shinobar: we don't need this: export LC_COLLATE=en_US
  8. #130224 npierce: fix hard-to-see yellow text in terminal.
  9. #140627 add 64 support
  10.  
  11. ARCH=`uname -m`
  12. [ "$ARCH" = "x86_64" ] && lsuffix=64 || lsuffix=
  13. export PERL5LIB="/usr/lib/urxvt:/etc/perl:/usr/local/lib/i386-linux-gnu/perl/5.24.1:/usr/local/share/perl/5.24.1:/usr/lib/i386-linux-gnu/perl5/5.24:/usr/share/perl5:/usr/lib/i386-linux-gnu/perl/5.24:/usr/share/perl/5.24:/usr/local/lib/site_perl:/usr/lib/i386-linux-gnu/perl-base"
  14.  
  15. PATH="/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/X11R7/bin:/root/my-applications/bin:/usr/games"
  16. LD_LIBRARY_PATH="/lib${lsuffix}:/usr/lib${lsuffix}:/usr/X11R7/lib:/root/my-applications/lib:/usr/local/lib"
  17. if [ -d /lib/i386-linux-gnu ]; then #added by s243a
  18.   LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/lib/i386-linux-gnu"
  19. fi
  20. if [ -d /usr/lib/i386-linux-gnu ]; then #added by s243a
  21.   LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/lib/i386-linux-gnu"
  22. fi
  23. if [ -d /usr/lib/i386-linux-gnu ]; then #added by s243a
  24.   LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/lib/i386-gnu"
  25. fi
  26.  
  27.  
  28. if [ -d /opt/gnome2 ];then
  29.  LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/opt/gnome2/lib"
  30.  PATH="$PATH:/opt/gnome2/bin"
  31. fi
  32.  
  33. if [ -d /opt/qt4 ];then
  34.  LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/opt/qt4/lib"
  35.  [ -d /opt/qt4/bin ] && PATH="$PATH:/opt/qt4/bin" #if devx sfs.
  36.  export QT4DIR="/opt/qt4"
  37.  [ -d /opt/qt4/include ] && export CPLUS_INCLUDE_PATH="/opt/qt4/include" #devx
  38. fi
  39.  
  40. #v3.99 added, for older qt3...
  41. if [ -e /usr/lib${lsuffix}/qt ];then
  42.  export QTDIR=/usr/lib${lsuffix}/qt
  43.  [ -d /usr/lib${lsuffix}/qt/bin ] && PATH=/usr/lib${lsuffix}/qt/bin:${PATH}
  44.  LD_LIBRARY_PATH=/usr/lib${lsuffix}/qt/lib:$LD_LIBRARY_PATH
  45. fi
  46. export QT_XFT=true
  47.  
  48. if [ -d /opt/mozilla.org ];then #101220 path fixes.
  49.  [ -e /opt/mozilla.org/lib/mozilla ] && LD_LIBRARY_PATH="/opt/mozilla.org/lib/mozilla:${LD_LIBRARY_PATH}"
  50.  [ -e /opt/mozilla.org/lib/firefox ] && LD_LIBRARY_PATH="/opt/mozilla.org/lib/firefox:${LD_LIBRARY_PATH}"
  51.  [ -d /opt/mozilla.org/bin ] && PATH="/opt/mozilla.org/bin:${PATH}" #may not exist.
  52.  [ -e /opt/mozilla.org/lib/mozilla ] && export MOZILLA_FIVE_HOME="/opt/mozilla.org/lib/mozilla"
  53.  [ -e /opt/mozilla.org/lib/firefox ] && export MOZILLA_FIVE_HOME="/opt/mozilla.org/lib/firefox"
  54. fi
  55.  
  56. MOZ_PLUGIN_PATH="/usr/lib${lsuffix}/mozilla/plugins"
  57. if [ -e /usr/lib${lsuffix}/seamonkey ];then
  58.  LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/lib${lsuffix}/seamonkey"
  59.  export MOZILLA_FIVE_HOME="/usr/lib${lsuffix}/seamonkey"
  60.  MOZ_PLUGIN_PATH="${MOZ_PLUGIN_PATH}:/usr/lib${lsuffix}/seamonkey/plugins"
  61. fi
  62.  
  63. FIREFOX=$(find /usr/lib${lsuffix} -type d -name 'firefox*'|tail -1) #slacko
  64. if [ -d "$FIREFOX" ];then
  65.   LD_LIBRARY_PATH="$FIREFOX:$LD_LIBRARY_PATH"
  66.   export MOZILLA_FIVE_HOME="$FIREFOX"
  67. fi
  68.  
  69. if [ -d /opt/samba ];then
  70.  LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/opt/samba/lib"
  71.  PATH="$PATH:/opt/samba/bin"
  72. fi
  73.  
  74. export PATH LD_LIBRARY_PATH MOZ_PLUGIN_PATH
  75. export MOZ_DISABLE_PANGO=1
  76. export GDK_USE_XFT=1 #for gtk...
  77. export OOO_FORCE_DESKTOP="gnome" #Open Office, force ue of GTK...
  78.  
  79. ulimit -c 0
  80. if [ `id -gn` = `id -un` -a `id -u` -gt 14 ]; then
  81.  umask 002
  82. else
  83.  umask 022
  84. fi
  85. USER=`id -un`
  86. PS1="# "
  87. LOGNAME=$USER
  88. HISTSIZE=1000
  89. HISTFILE="$HOME/.history"
  90. EDITOR=mp
  91. INPUTRC=/etc/inputrc
  92. TERM=rxvt
  93. [ -d /usr/share/terminfo ] && export TERMINFO=/usr/share/terminfo
  94.  
  95. # used by XRN, change to your news server...
  96. # NNTPSERVER="news.dodo.com.au"
  97. # GS_FONTPATH="/usr/lib/X11/fonts/Type1"
  98. export PS1 USER LOGNAME HISTSIZE INPUTRC EDITOR TERM
  99. XFINANSDIR="/root/.xfinans"
  100. export XFINANSDIR
  101.  
  102. export XLIB_SKIP_ARGB_VISUALS=1 #rox crashes with DRI modules. solution:
  103.  
  104. #this line gets edited by chooselocale script...
  105. #LANG=en_US.UTF-8
  106. LANG=en_CA
  107. export LANG
  108.  
  109. [ -f /etc/hostname ] && read HOSTNAME < /etc/hostname
  110. export HOSTNAME
  111.  
  112. SHELL="/bin/bash"
  113. export SHELL
  114.  
  115. ##Sylpheed 2.0.1 requires this (also some other gtk2 apps)...
  116. export MM_RUNASROOT=1 #sylpheed uses metamail which requires this...
  117.  
  118. BROWSER=/usr/local/bin/defaultbrowser
  119. DEFAULTBROWSER=/usr/local/bin/defaultbrowser
  120. DEFAULTDRAW=/usr/local/bin/defaultdraw
  121. DEFAULTHTMLEDITOR=/usr/local/bin/defaulthtmleditor
  122. DEFAULTMEDIAPLAYER=/usr/local/bin/defaultmediaplayer
  123. DEFAULTPAINT=/usr/local/bin/defaultpaint
  124. DEFAULTSPREADSHEET=/usr/local/bin/defaultspreadsheet
  125. DEFAULTTEXTEDITOR=/usr/local/bin/defaulttexteditor
  126. DEFAULTWORDPROCESSOR=/usr/local/bin/defaultwordprocessor
  127. DEFAULTIMAGEVIEWER=/usr/local/bin/defaultimageviewer
  128. DEFAULTIMAGEEDITOR=/usr/local/bin/defaultimageeditor
  129. export BROWSER DEFAULTBROWSER DEFAULTDRAW DEFAULTHTMLEDITOR DEFAULTMEDIAPLAYER DEFAULTPAINT DEFAULTSPREADSHEET DEFAULTTEXTEDITOR DEFAULTWORDPROCESSOR DEFAULTIMAGEVIEWER DEFAULTIMAGEEDITOR
  130.  
  131. #v2.02 rarsa provided this...
  132. #freedesktop base directory spec: standards.freedesktop.org/basedir-spec/latest/
  133. export XDG_DATA_HOME=$HOME/.local/share
  134. export XDG_CONFIG_HOME=$HOME/.config
  135. export XDG_DATA_DIRS=/usr/share:/usr/local/share
  136. export XDG_CONFIG_DIRS=/etc/xdg #v2.14 changed from /usr/etc
  137. export XDG_CACHE_HOME=$HOME/.cache
  138.  
  139. export HISTFILESIZE=2000
  140. export HISTCONTROL=ignoredups
  141.  
  142. #w468 'netpbm' utilities need to be told where rgb.txt is...
  143. [ -f /usr/share/X11/rgb.txt ] && export RGBDEF=/usr/share/X11/rgb.txt
  144.  
  145. export PREFIX='/usr' #convenient to set this i think...
  146.  
  147. #v2.16 this need arose when considering SFS files that may require special env. variables.
  148. #this code is lifted straight from Vector...
  149. # Append any additional sh scripts found in /etc/profile.d/:
  150. #for profile_script in /etc/profile.d/*.sh ; do
  151. for profile_script in /etc/profile.d/* ; do #w482 any files.
  152.     case "$profile_script" in *txt) continue ;; esac
  153.     . $profile_script
  154. done
  155. unset profile_script
  156.  
  157. #v2.16 have gone to full ls, now need this...
  158. #auto: only creates ansi color codes if o/p to a tty, not in a script...
  159. alias ls='ls --color=auto'
  160.  
  161. #130224 npierce: fix hard-to-read yellow in white terminal. refer: http://murga-linux.com/puppy/viewtopic.php?t=84298&start=210
  162. export LS_COLORS='bd=33:cd=33' #refer http://blog.twistedcode.org/2008/04/lscolors-explained.html
  163.  
  164. #personal customisation file...
  165. [ -r /etc/profile.local ] && . /etc/profile.local
  166.  
  167. # fix gtk3 WARNING **: Error retrieving accessibility bus address: org.freedesktop.DBus.Error.ServiceUnknown: The name org.a11y.Bus was not provided by any .service files
  168. export NO_AT_BRIDGE=1
  169.  
  170. ###END###
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement