Friday, May 3, 2024
 Popular · Latest · Hot · Upcoming
3
rated 0 times [  3] [ 0]  / answers: 1 / hits: 2570  / 2 Years ago, sat, july 2, 2022, 10:32:56

I'm currently running Ubuntu MATE 21.10.

As an experiment (to be ready to Firefox deb → Snap migration) I have removed deb-packaged Firefox from it by


sudo apt-get autopurge firefox

and installed Snap version of Firefox with


snap install firefox


$ snap list firefox 
Name Version Rev Tracking Publisher Notes
firefox 96.0.2-1 886 latest/stable mozilla✓ -


Its permissions are default: only "Use any connected joystick" and "Read access to network settings" are disabled.


Also I have installed Jupyter Notebook from official repositories on this system by


sudo apt-get install jupyter-notebook

When I launch Jupyter Notebook using jupyter-notebook from terminal it shows some greeting message:



$ jupyter-notebook 
[I 18:24:31.237 NotebookApp] Serving notebooks from local directory: /home/i
[I 18:24:31.237 NotebookApp] Jupyter Notebook 6.2.0 is running at:
[I 18:24:31.237 NotebookApp] http://localhost:8888/?token=7d0bbefd6ff58eddf9a1dbbd3d63e273282311d5b346cbe3
[I 18:24:31.237 NotebookApp] or http://127.0.0.1:8888/?token=7d0bbefd6ff58eddf9a1dbbd3d63e273282311d5b346cbe3
[I 18:24:31.237 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 18:24:31.295 NotebookApp]

To access the notebook, open this file in a browser:
file:///home/i/.local/share/jupyter/runtime/nbserver-2252-open.html
Or copy and paste one of these URLs:
http://localhost:8888/?token=7d0bbefd6ff58eddf9a1dbbd3d63e273282311d5b346cbe3
or http://127.0.0.1:8888/?token=7d0bbefd6ff58eddf9a1dbbd3d63e273282311d5b346cbe3



then opens Firefox with error message inside it:



Access to the file was denied


The file at /home/i/.local/share/jupyter/runtime/nbserver-2252-open.html is not readable.


It may have been removed, moved, or file permissions may be preventing access.



From the same machine I can access this file using terminal



$ ls -al /home/i/.local/share/jupyter/runtime/nbserver-2252-open.html
-rw-rw-r-- 1 i i 673 Jan 28 18:24 /home/i/.local/share/jupyter/runtime/nbserver-2252-open.html


or using deb-packaged Epiphany.


I already know that there is a workaround by visiting localhost's URLs (http://localhost:8888/?token=7d0bbefd6ff58eddf9a1dbbd3d63e273282311d5b346cbe3
or http://127.0.0.1:8888/?token=7d0bbefd6ff58eddf9a1dbbd3d63e273282311d5b346cbe3), but it is not user-friendly and break normal expected workflow.


More From » permissions

 Answers
4

Just make a launcher to circumvent the snap restraint.


A simple launcher would look like:


#!/bin/bash
export JUPYTER_DATA_DIR=/home/$USER/Public
export JUPYTER_RUNTIME_DIR=/home/$USER/Public

jupyter-notebook

...or skip the launcher and set the environment variables wherever convenient.


[#830] Saturday, July 2, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
polcomposte

Total Points: 421
Total Questions: 92
Total Answers: 109

Location: Uzbekistan
Member since Mon, Jul 20, 2020
4 Years ago
polcomposte questions
Wed, Dec 14, 22, 02:45, 1 Year ago
Sat, Apr 9, 22, 01:36, 2 Years ago
Mon, Dec 26, 22, 01:52, 1 Year ago
Fri, May 20, 22, 12:03, 2 Years ago
;