Code Monkey home page Code Monkey logo

Comments (4)

ellisonbg avatar ellisonbg commented on May 16, 2024 3

from jupyterlab-desktop.

lucbouchard1 avatar lucbouchard1 commented on May 16, 2024

@ellisonbg ,

Do you know the best way to change the token the jupyterlab frontend uses? I have the main process starting the jupyter server and sending the token to the frontend via the message layer, I just can't get the frontend to actually use the token.

I tried modifying the DOM so the jupyter-config-data element contains the appropriate data; however, it appears the jupyterlab code picks up the configuration before I create an instance of JupyterLab, so it just starts up using whatever was in the jupyter-config-data when it was served. Is there a property in the JupyterLab instance I can modify to set the token?

from jupyterlab-desktop.

ellisonbg avatar ellisonbg commented on May 16, 2024

from jupyterlab-desktop.

lucbouchard1 avatar lucbouchard1 commented on May 16, 2024

I'm already parsing the output of notebook list --json in the main process to get the token, and it's already being sent to the render process using the ipc library. What I can't figure out is getting the render process to connect to the jupyter server with the token that is sent. Previously, the render process got the token using the jupyter-config-data element in index.html, which has a token field that is manually set by the user. I tried using JavaScript to modify the DOM before it starts Jupyterlab so the token is set to the right value, but that doesn't work.

My guess is that the jupyter-config-data is loaded into a global scope somewhere when the page renders, I just can't figure out the best way to modify that.

from jupyterlab-desktop.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.