From 6281d3d89c001f2151798a9ffeb72b61af7143df Mon Sep 17 00:00:00 2001 From: Nils Werner Date: Fri, 20 Jul 2018 12:18:14 +0200 Subject: [PATCH] Change XDG_CACHE_HOME when using NB_USER --- base-notebook/start.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/base-notebook/start.sh b/base-notebook/start.sh index fba744d7..3cde6105 100755 --- a/base-notebook/start.sh +++ b/base-notebook/start.sh @@ -89,7 +89,7 @@ if [ $(id -u) == 0 ] ; then # Exec the command as NB_USER with the PATH and the rest of # the environment preserved echo "Executing the command: $cmd" - exec sudo -E -H -u $NB_USER PATH=$PATH PYTHONPATH=$PYTHONPATH $cmd + exec sudo -E -H -u $NB_USER PATH=$PATH XDG_CACHE_HOME=/home/$NB_USER/.cache PYTHONPATH=$PYTHONPATH $cmd else if [[ "$NB_UID" == "$(id -u jovyan)" && "$NB_GID" == "$(id -g jovyan)" ]]; then # User is not attempting to override user/group via environment