Attached is a patch that takes into account your feedback. On 9/22/21 8:19 PM, Maxim Cournoyer wrote: > Hello Jesse, > > Jesse writes: ... > + #:environment-variables ; TODO use search-paths magic instead of hard-coding these things. > + (list "GI_TYPELIB_PATH=/run/current-system/profile/lib/girepository-1.0" > + "GUILE_LOAD_COMPILED_PATH=/run/current-system/profile/lib/guile/3.0/site-ccache:/run/current-system/profile/share/guile/site/3.0" > + "GUILE_LOAD_PATH=/run/current-system/profile/share/guile/site/3.0" > + "HOME=/var/lib/jupyter" > + "JUPYTER_PATH=/run/current-system/profile/share/jupyter" > + "PATH=/run/current-system/profile/bin:/run/current-system/profile/sbin" > + "PYTHONPATH=/run/current-system/profile/lib/python3.8/site-packages" > + "R_LIBS_SITE=/run/current-system/profile/site-library/" > + "TEXMF=/run/current-system/profile/share/texmf-dist" > + "TEXMFCNF=/run/current-system/profile//share/texmf-dist/web2c" > >> + "XDG_DATA_DIRS=/run/current-system/profile/share") >> + > Hmm. Would it work if search paths were set on the 'jupyter' package > instead? The above is too fragile, with hard coded versions baked in. > > ... > I haven't tried it, but it looks promising. If we can find a better > solution than the hard coded version values in the environment variables > list, I think it'd be in good shape for inclusion, although a system > test would be a nice to have. > > Thank you! > > Maxim The weird thing about this particular service is it is more useful with libraries Jupyter and the kernels are not dependent on. This part is leftover from when I wrote it several months ago for a home server. (I actually used this service to work on notebooks using the Guile kernel working with sqlite and to try the other kernels.) I found that it couldn't find the packages I need and the web shell was broken, so I settled for hard-coding these variables until I could find time to fix them. I included a TODO with an idea I have not yet implemented: use the search-paths to give Jupyter the environment variables it needs the same way a profile sets up its search paths. I thought it might be a good idea to associate the service with its own profile for security reasons. This would also fix a bug where the Jupyter Notebook icon appears on the desktop but fails to start a new Jupyter server. Another idea I had is the service could be isolated in its own container with the network exposed and the home directory shared, but I have no idea how that would work or if it would even add more security. However, this could potentially allow multiple Jupyter services to run simultaneously on different ports. However, one problem is the resulting server might be unusable because the login information would be in a log file hidden in a container. I'll work on the search-paths idea and send an update when I'm done. I'm also open to other suggestions on how to fix the hard-coded values. I don't think this will be ready to merge until that problem is fixed, but I've attached the patch anyway for curious users who want to try it out. I would appreciate help implementing the container idea if it's feasible. -Jesse