diff --git a/notebook/notebookapp.py b/notebook/notebookapp.py index 7579b0d2b8..9cd325a1f2 100755 --- a/notebook/notebookapp.py +++ b/notebook/notebookapp.py @@ -1317,7 +1317,11 @@ def init_webapp(self): @property def display_url(self): - ip = self.ip if self.ip else _('[all ip addresses on your system]') + hostname = socket.gethostname() + if self.ip in ('localhost', '127.0.0.1', hostname): + ip = self.ip + else: + ip = hostname url = self._url(ip) if self.token: # Don't log full token if it came from config @@ -1625,7 +1629,7 @@ def start(self): '\n', 'Copy/paste this URL into your browser when you connect for the first time,', 'to login with a token:', - ' %s' % url_concat(self.connection_url, {'token': self.token}), + ' %s' % url_concat(self.display_url, {'token': self.token}), ])) self.io_loop = ioloop.IOLoop.current()