From 643b992690c91b9bcfdfd7ce5f72ff7e3cf37b87 Mon Sep 17 00:00:00 2001 From: Mark Einon Date: Mon, 15 Oct 2018 09:51:18 +0100 Subject: [PATCH] Fix copy/paste-ability of default URL presented on startup Currently the default URL message given on the console on startup is: --- Copy/paste this URL into your browser when you connect for the first time, to login with a token: http://(myip.com or 127.0.0.1):8888/?token=8fdc8 ... --- This will always need editing to use. Replace with host IP (e.g. 'myip.com') to make it copy/pastable again. --- notebook/notebookapp.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/notebook/notebookapp.py b/notebook/notebookapp.py index 56ec6deba..f26ad45ae 100755 --- a/notebook/notebookapp.py +++ b/notebook/notebookapp.py @@ -1432,7 +1432,7 @@ class NotebookApp(JupyterApp): url += '/' else: if self.ip in ('', '0.0.0.0'): - ip = "(%s or 127.0.0.1)" % socket.gethostname() + ip = "%s" % socket.gethostname() else: ip = self.ip url = self._url(ip)