You are not logged in.
Hi,
I can't get this to work for some reason. I just want a button on my desktop that I can press that runs a few simple lines of code.
Running the sh script via terminal works completely file (/home/user/Desktop/jupyterlabstart.sh)
I have a jupyterlabstart.sh script:
cd /mnt/datahdd/
conda activate
jupyter lab
read -n1 -p "Press any key to exit."
exit
and a desktop entry file:
[Desktop Entry]
Name=Custom JupyterLab instance starter
Comment=JupyterLab
Exec=sh /home/yasser/Desktop/jupyterlabstart.sh
Terminal=true
Type=Application
Icon=blueman-trust
Path=
StartupNotify=false
But for some reason, when I double click the desktop application I get:
/home/user/Desktop/jupyterlabstart.sh: line 2: conda: command not found
/home/user/Desktop/jupyterlabstart.sh: line 3: jupyter: command not found
edit:
So thought i'd edit the script a little:
cd /mnt/datahdd/
/home/user/miniconda3/bin/conda activate
/home/user/miniconda3/bin/jupyter lab
read -n1 -p "Press any key to exit."
exit
and now it's working, but I get the error:
CommandNotFoundError: Your shell has not been properly configured to use 'conda activate'.
To initialize your shell, run
$ conda init <SHELL_NAME>
Last edited by fstabme (2021-01-05 21:28:39)
Offline
Non interactive /bin/sh isn't an interactive bash - it won't source most of the config files/profiles.
Apparently getting conda to behave is't simple, cause it manipulates your bashrc, https://stackoverflow.com/questions/555 … ell-script
=> run it in an interactive bash (explained in the link)
Online