profile 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213
  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. #120407 hide error msg on screen if 915resolution fails.
  8. #120525 shinobar: we don't need this: export LC_COLLATE=en_US
  9. #130224 npierce: fix hard-to-see yellow text in terminal.
  10. #140627 add 64 support
  11. ARCH=`uname -m`
  12. [ "$ARCH" = "x86_64" ] && lsuffix=64 || lsuffix=
  13. PATH="/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/X11R7/bin:/root/my-applications/bin:/usr/games"
  14. #100626 add /usr/local/lib...
  15. LD_LIBRARY_PATH="/lib${lsuffix}:/usr/lib${lsuffix}:/usr/X11R7/lib:/root/my-applications/lib:/usr/local/lib"
  16. if [ -d /opt/gnome2 ];then
  17. LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/opt/gnome2/lib"
  18. PATH="$PATH:/opt/gnome2/bin"
  19. fi
  20. if [ -d /opt/qt4 ];then
  21. LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/opt/qt4/lib"
  22. [ -d /opt/qt4/bin ] && PATH="$PATH:/opt/qt4/bin" #if devx sfs.
  23. export QT4DIR="/opt/qt4"
  24. #export QTDIR="/opt/qt4" #i think v3.99removed.
  25. [ -d /opt/qt4/include ] && export CPLUS_INCLUDE_PATH="/opt/qt4/include" #devx
  26. fi
  27. #v3.99 added, for older qt3...
  28. if [ -e /usr/lib${lsuffix}/qt ];then
  29. export QTDIR=/usr/lib${lsuffix}/qt
  30. [ -d /usr/lib${lsuffix}/qt/bin ] && PATH=/usr/lib${lsuffix}/qt/bin:${PATH}
  31. LD_LIBRARY_PATH=/usr/lib${lsuffix}/qt/lib:$LD_LIBRARY_PATH
  32. fi
  33. export QT_XFT=true
  34. if [ -d /opt/mozilla.org ];then #101220 path fixes.
  35. [ -e /opt/mozilla.org/lib/mozilla ] && LD_LIBRARY_PATH="/opt/mozilla.org/lib/mozilla:${LD_LIBRARY_PATH}"
  36. [ -e /opt/mozilla.org/lib/firefox ] && LD_LIBRARY_PATH="/opt/mozilla.org/lib/firefox:${LD_LIBRARY_PATH}"
  37. [ -d /opt/mozilla.org/bin ] && PATH="/opt/mozilla.org/bin:${PATH}" #may not exist.
  38. [ -e /opt/mozilla.org/lib/mozilla ] && export MOZILLA_FIVE_HOME="/opt/mozilla.org/lib/mozilla"
  39. [ -e /opt/mozilla.org/lib/firefox ] && export MOZILLA_FIVE_HOME="/opt/mozilla.org/lib/firefox"
  40. fi
  41. MOZ_PLUGIN_PATH="/usr/lib${lsuffix}/mozilla/plugins"
  42. if [ -e /usr/lib${lsuffix}/seamonkey ];then
  43. LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/lib${lsuffix}/seamonkey"
  44. export MOZILLA_FIVE_HOME="/usr/lib${lsuffix}/seamonkey"
  45. MOZ_PLUGIN_PATH="${MOZ_PLUGIN_PATH}:/usr/lib${lsuffix}/seamonkey/plugins"
  46. fi
  47. FIREFOX=$(find /usr/lib${lsuffix} -type d -name 'firefox*'|tail -1) #slacko
  48. if [ -d "$FIREFOX" ];then
  49. LD_LIBRARY_PATH="$FIREFOX:$LD_LIBRARY_PATH"
  50. export MOZILLA_FIVE_HOME="$FIREFOX"
  51. fi
  52. if [ -d /opt/samba ];then
  53. LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/opt/samba/lib"
  54. PATH="$PATH:/opt/samba/bin"
  55. fi
  56. export PATH LD_LIBRARY_PATH MOZ_PLUGIN_PATH
  57. #some builds of moz need this, also maybe render faster...
  58. export MOZ_DISABLE_PANGO=1
  59. #for gtk...
  60. export GDK_USE_XFT=1
  61. #v4.00 for Open Office, force ue of GTK...
  62. export OOO_FORCE_DESKTOP="gnome"
  63. #100509 not needed with rox_filer 20100408smw...
  64. ##100208 rox-filer needs this for GTK >= 2.18, fixes focus problem... 100423 fix...
  65. #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
  66. # export GDK_NATIVE_WINDOWS=true
  67. #fi
  68. ulimit -c 0
  69. if [ `id -gn` = `id -un` -a `id -u` -gt 14 ]; then
  70. umask 002
  71. else
  72. umask 022
  73. fi
  74. USER=`id -un`
  75. PS1="# "
  76. LOGNAME=$USER
  77. HISTSIZE=1000
  78. HISTFILE="$HOME/.history"
  79. EDITOR=mp
  80. INPUTRC=/etc/inputrc
  81. #TERM=linux
  82. #v2.13... v405 remove...
  83. #if [ -f /usr/bin/urxvt ];then
  84. # #now using urxvt...
  85. # TERM="rxvt-unicode"
  86. #else
  87. TERM="xterm"
  88. #fi
  89. # used by XRN, change to your news server...
  90. # NNTPSERVER="news.dodo.com.au"
  91. # GS_FONTPATH="/usr/lib/X11/fonts/Type1"
  92. export PS1 USER LOGNAME HISTSIZE INPUTRC EDITOR TERM
  93. XFINANSDIR="/root/.xfinans"
  94. export XFINANSDIR
  95. #v2.10 MU: rox crashes with DRI modules. solution:
  96. export XLIB_SKIP_ARGB_VISUALS=1
  97. #this line gets edited by chooselocale script...
  98. # w004 going back to non-utf8... 101120 back to utf8... 101121 off again...
  99. #110409 change .utf8 to .UTF-8 ...
  100. #LANG=en_US.UTF-8
  101. LANG=en_US
  102. export LANG
  103. #v426 recommended by MU, avoid crashing for non-English locales on some apps...
  104. #120525 shinobar: don't think we need this...
  105. #export LC_COLLATE=en_US
  106. #this is for antialiased fonts in gtk1 apps...
  107. #LD_PRELOAD=/usr/lib${lsuffix}/libgdkxft.so
  108. #export LD_PRELOAD
  109. #WISH mini-console needs this...
  110. HOSTNAME="`cat /etc/hostname | tr -d "\n"`"
  111. export HOSTNAME
  112. #v2.17 have uncommented this...
  113. SHELL="/bin/bash"
  114. export SHELL
  115. #...this causes a problem with characters in text-mode apps running in rxvt. for example, in mp
  116. #a vertical line character displays as a 3. so leave the default shell as Busybox sh.
  117. #...no, have a fix, from alienX. added TERM=xterm to /root/.bashrc.
  118. #v2.0.0 additional note: now have /bin/sh a symlink to /bin/bash, so above not used.
  119. #w003 no longer needed as woof now uses utf8...
  120. #w004 no, leave in, have made utf8 optional...
  121. ##Sylpheed 2.0.1 requires this (also some other gtk2 apps)...
  122. export G_FILENAME_ENCODING=@locale
  123. #v1.0.6
  124. #sylpheed uses metamail which requires this...
  125. export MM_RUNASROOT=1
  126. #v1.0.6
  127. DEFAULTBROWSER="`cat /usr/local/bin/defaultbrowser | tail -n 1 | tr -s " " | cut -f 2 -d " "`"
  128. DEFAULTDRAW="`cat /usr/local/bin/defaultdraw | tail -n 1 | tr -s " " | cut -f 2 -d " "`"
  129. DEFAULTHTMLEDITOR="`cat /usr/local/bin/defaulthtmleditor | tail -n 1 | tr -s " " | cut -f 2 -d " "`"
  130. DEFAULTMEDIAPLAYER="`cat /usr/local/bin/defaultmediaplayer | tail -n 1 | tr -s " " | cut -f 2 -d " "`"
  131. DEFAULTPAINT="`cat /usr/local/bin/defaultpaint | tail -n 1 | tr -s " " | cut -f 2 -d " "`"
  132. DEFAULTSPREADSHEET="`cat /usr/local/bin/defaultspreadsheet | tail -n 1 | tr -s " " | cut -f 2 -d " "`"
  133. DEFAULTTEXTEDITOR="`cat /usr/local/bin/defaulttexteditor | tail -n 1 | tr -s " " | cut -f 2 -d " "`"
  134. DEFAULTWORDPROCESSOR="`cat /usr/local/bin/defaultwordprocessor | tail -n 1 | tr -s " " | cut -f 2 -d " "`"
  135. DEFAULTIMAGEVIEWER="`cat /usr/local/bin/defaultimageviewer | tail -n 1 | tr -s " " | cut -f 2 -d " "`"
  136. DEFAULTIMAGEEDITOR="`cat /usr/local/bin/defaultimageeditor | tail -n 1 | tr -s " " | cut -f 2 -d " "`"
  137. export DEFAULTBROWSER DEFAULTDRAW DEFAULTHTMLEDITOR DEFAULTMEDIAPLAYER DEFAULTPAINT DEFAULTSPREADSHEET DEFAULTTEXTEDITOR DEFAULTWORDPROCESSOR DEFAULTIMAGEVIEWER DEFAULTIMAGEEDITOR
  138. #v2.02 rarsa provided this...
  139. #freedesktop base directory spec: standards.freedesktop.org/basedir-spec/latest/
  140. export XDG_DATA_HOME=$HOME/.local/share
  141. export XDG_CONFIG_HOME=$HOME/.config
  142. export XDG_DATA_DIRS=/usr/share:/usr/local/share
  143. export XDG_CONFIG_DIRS=/etc/xdg #v2.14 changed from /usr/etc
  144. export XDG_CACHE_HOME=$HOME/.cache
  145. #v2.13...
  146. export HISTFILESIZE=2000
  147. export HISTCONTROL=ignoredups
  148. #v4.00 run e3vi whenever vi excuted... 100530 no, busybox vi now used...
  149. #alias vi=e3vi
  150. #w468 'netpbm' utilities need to be told where rgb.txt is...
  151. [ -f /usr/share/X11/rgb.txt ] && export RGBDEF=/usr/share/X11/rgb.txt
  152. #w482 convenient to set this i think...
  153. export PREFIX='/usr'
  154. #v2.12
  155. #xorgwizard creates this file, run once only...
  156. if [ ! -f /tmp/bootcnt.txt ];then
  157. [ -f /etc/resolutionfix ] && eval `cat /etc/resolutionfix` 2>/dev/null #120407
  158. fi
  159. #v2.16 this need arose when considering SFS files that may require special env. variables.
  160. #this code is lifted straight from Vector...
  161. # Append any additional sh scripts found in /etc/profile.d/:
  162. #for profile_script in /etc/profile.d/*.sh ; do
  163. for profile_script in /etc/profile.d/* ; do #w482 any files.
  164. [ "`echo -n "$profile_script" | grep 'txt$'`" != "" ] && continue #w482
  165. #if [ -x $profile_script ]; then
  166. . $profile_script
  167. #fi
  168. done
  169. unset profile_script
  170. #v2.16 have gone to full ls, now need this...
  171. #auto: only creates ansi color codes if o/p to a tty, not in a script...
  172. alias ls='ls --color=auto'
  173. ##v2.17 no color in terminal window. G2: sh (link to bash) does not read any
  174. ##config file, unless do this...
  175. #export ENV="/root/.bashrc"
  176. #...no, instead have exported SHELL=bash, see above.
  177. #130224 npierce: fix hard-to-read yellow in white terminal. refer: http://murga-linux.com/puppy/viewtopic.php?t=84298&start=210
  178. #reference: refer http://blog.twistedcode.org/2008/04/lscolors-explained.html
  179. export LS_COLORS='bd=33:cd=33'
  180. #v1.0.5
  181. #personal customisation file...
  182. [ -r /etc/profile.local ] && . /etc/profile.local
  183. ###END###