터미널에서 Jupyter-Notebook을 열면 Telegram Desktop이 열립니다!

터미널에서 Jupyter-Notebook을 열면 Telegram Desktop이 열립니다!

저는 우분투 20.04.2 LTS를 사용하고 있습니다.

터미널에서 Jupyter-Notebook을 열려고 하면 텔레그램 데스크톱 앱이 열립니다.

Jupyter-Notebook은 실제로 백그라운드에서 열립니다. 그래서 브라우저를 열고 사용할 수 있습니다.

출력은 다음과 같습니다.

(geospatial) siavash@siavash-fra:~$ jupyter-notebook 
[I 16:59:52.522 NotebookApp] Serving notebooks from local directory: /home/siavash
[I 16:59:52.522 NotebookApp] The Jupyter Notebook is running at:
[I 16:59:52.522 NotebookApp] http://localhost:8888/?token=192817dbf13703bc25bbd1f348df5e9c1c7c9275d579aef3
[I 16:59:52.522 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 16:59:52.526 NotebookApp] 
    
    To access the notebook, open this file in a browser:
        file:///home/siavash/.local/share/jupyter/runtime/nbserver-5326-open.html
    Or copy and paste one of these URLs:
        http://localhost:8888/?token=192817dbf13703bc25bbd1f348df5e9c1c7c9275d579aef3

(telegram-desktop:5339): lib_base-WARNING **: 16:59:53.204: Unfortunately, GTK integration conflicts with qgtk2 platformtheme and style. Therefore, QT_QPA_PLATFORMTHEME and QT_STYLE_OVERRIDE will be unset.
lib_base-Message: 16:59:53.204: This can be ignored by setting DESKTOP_APP_I_KNOW_ABOUT_GTK_INCOMPATIBILITY environment variable to any value, however, if qgtk2 theme or style is used, this will lead to a crash.
lib_base-Message: 16:59:53.204: GTK integration can be disabled by setting DESKTOP_APP_DISABLE_GTK_INTEGRATION to any value. Keep in mind that this will lead to some features being unavailable.
Gtk-Message: 16:59:53.412: Failed to load module "canberra-gtk-module"
Gtk-Message: 16:59:53.413: Failed to load module "canberra-gtk-module"
[ALSOFT] (EE) Failed to set real-time priority for thread: Operation not permitted (1)

나도 살펴봤어이것비슷한 질문이지만 내 대답은 아닙니다.

답변1

문제를 발견했습니다. 텔레그램을 설치한 후 이상하게도 텔레그램이 HTML 파일을 여는 기본 응용 프로그램으로 만들어졌습니다. 그렇기 때문에 jupyter-notebook터미널에서 실행한 후 텔레그램으로 링크를 열려고 시도합니다.

따라서 문제를 해결하려면 HTML 파일을 찾으면 됩니다. 마우스 오른쪽 버튼을 클릭하세요. 이동 Properties. 탭 에서 Open With브라우저를 선택하고 을 클릭하세요 Set as default.

문제가 해결되었습니다. 다음번에는 텔레그램이 열리지 않습니다. 대신 브라우저에서 jupyter-notebook을 실행하게 됩니다.

답변2

알다시피, jupyter 노트북을 다음을 통해 실행해야 합니다.다른 포트.

저는 이 버그를 재현할 수 없었고, telegram-desktop이 다른 포트를 사용하도록 강제하는 방법도 찾지 못했습니다. 하지만 jupyter 노트북이 8888.

먼저 파일이 /home/USERNAME/.jupyter/jupyter_notebook_config.py존재하는지 확인하세요. 그렇지 않은 경우 를 실행하십시오 jupyter notebook --generate-config.

그런 다음 이 파일을 열고 다음 줄의 주석 처리를 제거하여 포트를 로 변경합니다 8889. 예:

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

파일을 저장하고 jupyter 노트북을 다시 실행하세요. 이제부터 텔레그램 데스크톱이 열리지 않아야 합니다.

관련 정보