Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

/opt/tljh/user/bin not getting included in user PATH on Debian #926

Open
kjmalek opened this issue Jul 25, 2023 · 2 comments
Open

/opt/tljh/user/bin not getting included in user PATH on Debian #926

kjmalek opened this issue Jul 25, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@kjmalek
Copy link

kjmalek commented Jul 25, 2023

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

  1. Install TLJH 1.0.0b1 on a fresh Debian VM
  2. Access JupyterHub as an admin
  3. Open a new terminal
  4. Run echo $PATH

Your personal set up

  • OS:
    Debian 11/12; VirtualBox VM
  • Version(s):
    TLJH 1.0.0b1
@kjmalek kjmalek added the bug Something isn't working label Jul 25, 2023
@welcome
Copy link

welcome bot commented Jul 25, 2023

Thank you for opening your first issue in this project! Engagement like this is essential for open source projects! 🤗

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.
welcome
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! 👋

Welcome to the Jupyter community! 🎉

@kjmalek
Copy link
Author

kjmalek commented Aug 2, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant