[SOLVED] Some commands can't be executed by keyboard shortcuts and menulibre entry creator.

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

note: which jupyter-notebook returned the address


<span style="color:#323232;">(base) bob@bob:~
</span><span style="color:#323232;">$ which jupyter-notebook
</span><span style="color:#323232;">/home/bob/miniconda3/bin/jupyter-notebook
</span>

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


<span style="color:#323232;">/home/bob/jupyter_notebook_unofficial: line 6: jupyter: command not found
</span>

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


<span style="color:#323232;">#!/bin/bash
</span><span style="color:#323232;">jupyter notebook
</span><span style="color:#323232;">firefox http://localhost:8888/tree/Documents/Programs
</span>

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

imgur.com/a/Ze2MUqW


<span style="color:#323232;"> `./jupyter_notebook_unofficial`
</span><span style="color:#323232;">    `./home/bob/jupyter_notebook_unofficial`
</span><span style="color:#323232;">    `bash jupyter_notebook_unofficial`
</span><span style="color:#323232;">    `bash ./jupyter_notebook_unofficial`
</span><span style="color:#323232;">    `bash ./home/bob/jupyter_notebook_unofficial`
</span><span style="color:#323232;">	`bash /home/bob/jupyter_notebook_unofficial` 
</span>

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.

lelgenio,

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

Subject6051,

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?

palordrolap,

Try using the full path to the jupyterexecutable in your script rather than just its short name. That way $PATH shouldn't matter either way.

That is, unless the jupyter executable or something it calls relies on something being set in $PATH as well. Still worth a try.

Subject6051,

LMAO, IT WORKED!!! Thank you very very much dude!

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • wartaberita
  • uselessserver093
  • Food
  • [email protected]
  • aaaaaaacccccccce
  • test
  • CafeMeta
  • testmag
  • MUD
  • RhythmGameZone
  • RSS
  • dabs
  • Socialism
  • TheResearchGuardian
  • SuperSentai
  • feritale
  • oklahoma
  • Testmaggi
  • KbinCafe
  • Ask_kbincafe
  • KamenRider
  • All magazines