the-littlest-jupyterhub
the-littlest-jupyterhub copied to clipboard
/opt/tljh/user/bin not getting included in user PATH on Debian
Bug description
On Debian, opt/tljh/user/bin was not appended to the user's PATH when initialized with the Systemdspawner
To work around the issue, I need to modify /etc/profile to include the environment in the PATH.
Expected behaviour
On Ubuntu installs, the user's PATH is properly set and enables users to use Conda along with any packages installed in the user environment.
$ echo $PATH
/opt/tljh/user/bin:/usr/local/bin:/usr/bin:/bin ...
Actual behaviour
On Debian installs, users do not have default access to Conda and packages installed in the user environment from the terminal.
$ echo $PATH
/usr/local/bin:usr/bin:/bin ...
How to reproduce
- Install TLJH 1.0.0b1 on a fresh Debian VM
- Access JupyterHub as an admin
- Open a new terminal
- Run
echo $PATH
Your personal set up
- OS: Debian 11/12; VirtualBox VM
- Version(s): TLJH 1.0.0b1
Thank you for opening your first issue in this project! Engagement like this is essential for open source projects! :hugs:
If you haven't done so already, check out Jupyter's Code of Conduct. Also, please try to follow the issue template as it helps other other community members to contribute more effectively.
You can meet the other Jovyans by joining our Discourse forum. There is also an intro thread there where you can stop by and say Hi! :wave:
Welcome to the Jupyter community! :tada:
This bug appears to be getting caused by the order in which Debian sets environment variables as documented here: https://wiki.debian.org/EnvironmentVariables. All other environment variables created by the SystemdSpawner are getting appropriately set, but upon starting the shell in JupyterLab, Debian overrides the systemd service PATH environment variable with the PATH variable set within '/etc/profile'. To address the issue, you can either modify '/etc/profile' to append '/opt/tljh/user/bin' or create a '.bash_profile' within each Jupyter users home directory that updates the PATH.