Opening Jupyter-Notebook in terminal opens Telegram Desktop!

I found the problem: After installing telegram, strangely enough it makes telegram the default application for opening HTML files. That's why after running jupyter-notebook in the terminal, it tries to open the link with telegram.

So to solve the problem, simply find any HTML file. Right click on it. Go to Properties. In Open With tab select your browser and click on Set as default.

The problem is solved. Next time telegram won't open. Instead you'll have jupyter-notebook running on your browser.


As noticed, you should run jupyter notebook through a different port.

I wasn't able to reproduce this bug, and also couldn't find a way to force telegram-desktop to use a different port, but you can configure jupyter notebook to use a port other than 8888.

First, check if the file /home/USERNAME/.jupyter/jupyter_notebook_config.py exists. If not, run jupyter notebook --generate-config.

Then, open this file and uncomment the following line, changing the port to 8889, for example:

c.NotebookApp.port = 8888
                      ^ Change this port to 8889

Save the file and run jupyter notebook again. From now on, telegram desktop should not open.