1# 2# First we set up a bunch of environment variables that we want everyone 3# to inherit 4# 5 6export HOME=/boot/home 7export LC_CTYPE="en_US.UTF-8" 8 9BUILDHOME=/boot/system/develop 10 11case `uname -m` in 12BePC|Intel|unknown) 13 BE_HOST_CPU=x86 14 ;; 15BeMac|BeBox) 16 BE_HOST_CPU=ppc 17 ;; 18*) 19 BE_HOST_CPU=`uname -m` 20esac 21 22# not used by Haiku, but by (legacy) applications (e.g. Pe) 23BH=$BUILDHOME/headers 24BEINCLUDES="$BH;$BH/be;$BH/posix;$BH/glibc;$BH/cpp;$BH/be/app;$BH/be/device;$BH/be/interface;$BH/be/locale;$BH/be/media;$BH/be/midi;$BH/be/midi2;$BH/be/net;$BH/be/kernel;$BH/be/storage;$BH/be/support;$BH/be/game;$BH/be/opengl;$BH/be/drivers;$BH/gnu;$BH/be/mail;$BH/be/translation;$BH/be/devel;$BH/be/add-ons/graphics;$BH/be/be_apps/NetPositive;$BH/be/be_apps/Tracker" 25 26export BUILDHOME 27export BEINCLUDES 28export BE_HOST_CPU 29 30if [ "$SAFEMODE" != "yes" ]; then 31 export PATH=.:$HOME/config/non-packaged/bin:$HOME/config/bin:/boot/system/non-packaged/bin:/bin:/boot/system/apps:/boot/system/preferences 32 export LIBRARY_PATH="%A/lib:$HOME/config/non-packaged/lib:$HOME/config/lib:/boot/system/non-packaged/lib:/boot/system/lib" 33 export ADDON_PATH="%A/add-ons:$HOME/config/non-packaged/add-ons:$HOME/config/add-ons:/boot/system/non-packaged/add-ons:/boot/system/add-ons" 34else 35 export PATH=.:/bin:/boot/system/apps:/boot/system/preferences 36 export LIBRARY_PATH="%A/lib:/boot/system/lib" 37 export ADDON_PATH="%A/add-ons:/boot/system/add-ons" 38fi 39 40# Locale 41export LC_MESSAGES=`locale --message` 42export LC_NUMERIC=`locale --format` 43export LC_TIME=`locale --time` 44export LC_COLLATE=$LC_MESSAGES 45export LC_CTYPE=$LC_MESSAGES 46export LC_MONETARY=$LC_NUMERIC 47 48if [ "$SAFEMODE" != "yes" ]; then 49 if [ -f $HOME/config/settings/boot/UserSetupEnvironment ]; then 50 . $HOME/config/settings/boot/UserSetupEnvironment 51 fi 52fi 53 54export USER=`id -un` 55export GROUP=`id -gn` 56 57# 58# Haiku setup for 59# XDG Base Directory Specification 60# 61# http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html 62 63# defaults to ~/.config 64export XDG_CONFIG_HOME="`finddir B_USER_SETTINGS_DIRECTORY`" 65 66# defaults to ~/.local/share 67export XDG_DATA_HOME="`finddir B_USER_NONPACKAGED_DATA_DIRECTORY`" 68 69# defaults to ~/.local/state 70export XDG_STATE_HOME="`finddir B_USER_VAR_DIRECTORY`" 71 72# defaults to /etc/xdg 73export XDG_CONFIG_DIRS="`finddir B_SYSTEM_SETTINGS_DIRECTORY`" 74# XXX: Should we add B_USER_ETC_DIRECTORY? 75 76# default to /usr/local/share/:/usr/share/ 77export XDG_DATA_DIRS="`finddir B_SYSTEM_NONPACKAGED_DATA_DIRECTORY`:\ 78`finddir B_SYSTEM_DATA_DIRECTORY`" 79 80# defaults to ~/.cache 81export XDG_CACHE_HOME="`finddir B_USER_CACHE_DIRECTORY`" 82 83# TODO: 84# This one is used for session stuff (sockets, pipes...) 85# It must be owned by the user, with permissions 0700. 86# It is supposed to be cleaned up on last log-out. 87# Apps will fall back to /tmp usually anyway. 88#export XDG_RUNTIME_DIR="`finddir B_USER_VAR_DIRECTORY`/tmp" 89