0

I would like to open a Jupyter notebook page on the boot of my Mac. Specifically, I use the launchctl to start the Jupyter notebook.

However, after the reboot, the web page showed the password or token to verify:

enter image description here

Here is the launchctl script I use on High Sierra. I find it painstaking to bother to type in the token. So is it possible to ignore the token verification on reboot, just like it is when you type in jupyter notebook?

<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC -//Apple Computer//DTD PLIST 1.0//EN http://www.apple.com/DTDs/PropertyList-1.0.dtd > <plist version="1.0"> <dict> <key>Label</key> <string>me.jupyter</string> <key>ProgramArguments</key> <array> <string>/usr/local/bin/jupyter</string> <string>notebook</string> <string>--no-browser</string> <string>--port</string> <string>9090</string> <string>--notebook-dir</string> <string>/Users/me/jupyter/</string> </array> <key>KeepAlive</key> <true /> <key>RunAtLoad</key> <true /> <key>StandardErrorPath</key> <string>/Users/me/jupyter/jupyter-notebook.stderr</string> <key>StandardOutPath</key> <string>/Users/mejupyter/jupyter-notebook.stdout</string> </dict> </plist> 
2
  • Is the image shown in my post? Now my Wi-Fi is pretty slow but I could not find it yet... Commented Nov 10, 2017 at 14:46
  • github.com/jupyter/notebook/issues/2254 Commented Nov 10, 2017 at 15:09

2 Answers 2

1

This might work for you:

If you do not care about the security of the server, you can first create a jupyer config file with: cd ~/.jupyter jupyter notebook --generate-config Then set the c.NotebookApp.token parameter to an empty string in the configuration file created c.NotebookApp.token = '' As said in comment, Setting to an empty string disables authentication altogether, which is NOT RECOMMENDED.

Source: https://github.com/jupyter/notebook/issues/2254

Sign up to request clarification or add additional context in comments.

3 Comments

I see. But as long as I run the server on localhost, it would not be that unsafe, right?
It's perfectly safe if you run it only locally. The reason password/token protection was made the default is presumably that a lot of people do not understand the difference between a public webserver and localhost.
I wouldnt call running a local instance of anything without any authentication safe, but, as they say, "Security is a state of mind".
1

Actually in later versions of Jupyter notebook, you must explicitly run the server with the parameter --NotebookApp.token=. So add it to the plist file.

And as the other answer notes, writes the following on the config file:

c.NotebookApp.token = '' 

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.