Comment 6 for bug 1618516

Revision history for this message
Wileam Yonatan Phan (wileamyp) wrote :

To add to the discussion, it looks like byobu also ignores my ~/.bashrc file. It is especially important for me to get this working so I can use Lmod and Spack inside byobu, both of which I load through my ~/.bashrc file with the following snippet:

# Add Lua paths
LUAROCKS_PREFIX=/usr/local
export LUA_PATH="$LUAROCKS_PREFIX/share/lua/5.3/?.lua;$LUAROCKS_PREFIX/share/lua/5.3/?/init.lua;;"
export LUA_CPATH="$LUAROCKS_PREFIX/lib/lua/5.3/?.so;;"

# Lmod
if [ -z "$_INIT_LMOD" ]; then
  # Clear previous definitions of 'module'
  type module > /dev/null 2>&1
  if [ "$?" -eq 0 ]; then
    clearLmod --quiet # Purge all modules and completely remove old Lmod setup
  fi
  export _INIT_LMOD=1 # guard variable is crucial, to avoid breaking existing modules settings
  # Activate Lmod
  export BASH_ENV=/opt/lmod/lmod/init/bash
  source ${BASH_ENV}
  # Load initial modules
  export MODULEPATH=/opt/modulefiles/Compiler:/opt/modulefiles/Linux
  export MODULEPATH_ROOT=/opt/modulefiles
  export LMOD_SYSTEM_DEFAULT_MODULES=gcc:spack
  module --initial_load --no_redirect restore
fi

# Spack
. /opt/spack/share/spack/setup-env.sh