classification
Title: Permission denied: 'xdg-settings' when executing 'jupyter notebook' from command line
Type: behavior Stage: patch review
Components: Versions: Python 3.7
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: SBC King, miss-islington, ned.deily, python-dev, remi.lapeyre, ronaldoussoren
Priority: normal Keywords: patch

Created on 2020-06-17 13:20 by SBC King, last changed 2020-06-24 12:59 by ronaldoussoren.

Pull Requests
URL Status Linked Edit
PR 20936 merged python-dev, 2020-06-17 13:29
PR 21051 merged miss-islington, 2020-06-22 09:06
PR 21052 merged miss-islington, 2020-06-22 09:06
Messages (9)
msg371739 - (view) Author: SBC King (SBC King) * Date: 2020-06-17 13:20
error was caused by the permission problem with 'xdg-settings'. I checked that Google Chrome is my default browser. I tried the following command by changing the c.NotebookApp.allow_root to True in the jupyter_notebook_config.py file, and it can successfully open jupyter notebook in the browser Safari:
sudo jupyter notebook
msg371740 - (view) Author: SBC King (SBC King) * Date: 2020-06-17 13:28
error was caused by the permission problem with 'xdg-settings'. I checked that Google Chrome is my default browser. I tried the following command by changing the c.NotebookApp.allow_root to True in the jupyter_notebook_config.py file, and it can successfully open jupyter notebook in the browser Safari:
sudo jupyter notebook. this is just a workaround however.
msg371966 - (view) Author: RĂ©mi Lapeyre (remi.lapeyre) * Date: 2020-06-20 22:06
Can you give more information about your issue here. This part of the code was written like this on purpose as the comment says:


        # OS X can use below Unix support (but we prefer using the OS X
        # specific stuff)


We have to be sure that there is a bug here before changing the code, that changing the code will definitely fix the issue and that it won't create others.
msg371986 - (view) Author: SBC King (SBC King) * Date: 2020-06-21 08:12
yeah there is a bug as web browsers won't open when you launch them from python code please have a look at this issue posted on jupyternotebook github : https://github.com/jupyter/notebook/issues/3746 It was posted on the wrong place as it was not an issue with Jupiter but an issue with python.
msg371990 - (view) Author: Ronald Oussoren (ronaldoussoren) * (Python committer) Date: 2020-06-21 09:18
I've commented on the attached PR.

IMHO a correct fix is to catch and ignore PermissionError when calling xdg-settings (on all platforms). An xdg-settings executable that cannot be started due to permission problems is similar to that executable not being available at all.
msg371991 - (view) Author: SBC King (SBC King) * Date: 2020-06-21 09:27
yeah I've updated the pr please review
msg372055 - (view) Author: Ronald Oussoren (ronaldoussoren) * (Python committer) Date: 2020-06-22 09:06
New changeset 9e27bc0c1efc7478872f98729f87886e9333548f by Krishna Chivukula in branch 'master':
bpo-41005: Fixed perrmission error (GH-20936)
https://github.com/python/cpython/commit/9e27bc0c1efc7478872f98729f87886e9333548f
msg372248 - (view) Author: Ronald Oussoren (ronaldoussoren) * (Python committer) Date: 2020-06-24 12:58
New changeset adf8708c44945bfa68db8b02c6a1f560f05a5151 by Miss Islington (bot) in branch '3.8':
bpo-41005: Fixed perrmission error (GH-20936) (GH-21052)
https://github.com/python/cpython/commit/adf8708c44945bfa68db8b02c6a1f560f05a5151
msg372249 - (view) Author: Ronald Oussoren (ronaldoussoren) * (Python committer) Date: 2020-06-24 12:59
New changeset d518ed0baaa31ca25cd88ac8996c7a7d563b2a1f by Miss Islington (bot) in branch '3.9':
bpo-41005: Fixed perrmission error (GH-20936) (GH-21051)
https://github.com/python/cpython/commit/d518ed0baaa31ca25cd88ac8996c7a7d563b2a1f
History
Date User Action Args
2020-06-24 12:59:25ronaldoussorensetmessages: + msg372249
2020-06-24 12:58:45ronaldoussorensetmessages: + msg372248
2020-06-22 09:06:28miss-islingtonsetpull_requests: + pull_request20223
2020-06-22 09:06:21miss-islingtonsetnosy: + miss-islington
pull_requests: + pull_request20222
2020-06-22 09:06:14ronaldoussorensetmessages: + msg372055
2020-06-21 09:27:32SBC Kingsetmessages: + msg371991
2020-06-21 09:18:43ronaldoussorensetmessages: + msg371990
2020-06-21 09:01:29SilentGhostsetnosy: + ronaldoussoren, ned.deily
2020-06-21 08:12:28SBC Kingsetmessages: + msg371986
2020-06-20 22:06:44remi.lapeyresetnosy: + remi.lapeyre
messages: + msg371966
2020-06-17 13:29:19python-devsetkeywords: + patch
nosy: + python-dev

pull_requests: + pull_request20115
stage: patch review
2020-06-17 13:28:57SBC Kingsetmessages: + msg371740
2020-06-17 13:20:54SBC Kingcreate