this post was submitted on 04 Sep 2023
29 points (93.9% liked)

Linux

48083 readers
774 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
 

Apparently, I just had to give the full path /home/bob/miniconda3/bin/jupyter-notebook works perfectly! Thanks to @palordrolap@kbin.social for solving it for me.

note: which jupyter-notebook returned the address

(base) bob@bob:~
$ which jupyter-notebook
/home/bob/miniconda3/bin/jupyter-notebook

btw, this issue as old as time. Even Jesus had this problem while using Linux :(

Edit 2: I was wrong. It's using bash. I got a echo $SHELL and it was /bin/bash. but even though the jupyter-notebook path has been added to $PATH variable, it just won't execute.

Edit 1: I don't think keyboard shortcuts and menulibre don't use bash shell. After reading logs I realized that it was as if jupyter-notebook wasn't even installed when I am executing through shortcuts and menulibre. I have added the jupyter path variable to .bashrc, the only way this can not work is if the bloody thing isn't running on bash shell.

Terminal log when executed by terminal

Log when executed by a shortcut

/home/bob/jupyter_notebook_unofficial: line 6: jupyter: command not found

Demonstration

Firefox command work perfectly without any problem, but jupyter notebook command which works in terminal doesn't work on either keyboard shortcuts or on menulibre. The file has max permissions to run

Script Copy

#!/bin/bash
jupyter notebook
firefox http://localhost:8888/tree/Documents/Programs

What I have tried

  1. I have tried to run in terminal, not run in terminal on menulibre
  2. I have tried entering these commands in the command column

https://imgur.com/a/Ze2MUqW

 `./jupyter_notebook_unofficial`
    `./home/bob/jupyter_notebook_unofficial`
    `bash jupyter_notebook_unofficial`
    `bash ./jupyter_notebook_unofficial`
    `bash ./home/bob/jupyter_notebook_unofficial`
	`bash /home/bob/jupyter_notebook_unofficial` 

I have also tried all this combinations with and without .sh at the end of the file name.

All of these would work on terminal but not as shortcuts or on menulibre.

you are viewing a single comment's thread
view the rest of the comments
[–] lelgenio@lemmy.ml 1 points 1 year ago (1 children)

Maybe your .bashrc has some logic that conditionally modifies your environment when run in a interactive terminal?

[–] Subject6051@lemmy.ml 1 points 1 year ago

Maybe your .bashrc has some logic that conditionally modifies your environment when run in a interactive terminal?

what do I do to check for this?