Could someone please point me to documentation on how to enable dotfiles in JupyterHub? We’re deploying JupyterHub in a Docker container and using a jupyterhub_config.py
. Thank you for your help.
What do you mean by “enable dotfiles?” Do you want Jupyter-specific dotfiles to be read, dotfiles to be visible in the user’s home directory, etc.?
I want dotfiles to be visible to our users in the file browser. With that said, I made some progress on this since posting my question and was able to get hidden “dotfiles” files enabled.
I added the following configuration to the jupyterhub_config.py
config file.
c.DockerSpawner.args = [
"--ContentsManager.allow_hidden=True",
]
This gives the user the option to select “Show Hidden Files” from the View menu. See the screenshot below. But I want this enabled by default.
My second question is how can enabled “Show Hidden Files” by default?
Thank you.
When you enable “Show Hidden Files” in the browser UI, it will create a file in ~/.jupyter/lab/user-settings/@jupyterlab
folder to remember this choice. If you persist your home directory, the subsequent spawns will read from those settings files and enable the option by default.
If you want to enable this option right from the very first spawn, you will need to create it manually before spawning single user server and place it in correct location.