profile 7.7 KB

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