2

I have made a launcher on my xubuntu desktop which calls a script named dev_blog.sh.

dev_blog.sh contains :

#!/usr/bin/zsh echo ça marche pyenv activate zinnia /usr/bin/zsh 

When I call the launcher from the desktop, my terminal opens and I can read :

dev_blog.sh:3: command not found: pyenv

Whereas when I type the same line in the same terminal, it works.

Here's the content of my .zshrc :

export ZSH=/home/proph73/.oh-my-zsh ZSH_THEME="agnoster" PATH="$HOME/bin:$HOME/.local/bin:$PATH" export PYENV_ROOT="$HOME/.pyenv" export PATH="$PYENV_ROOT/bin:$PATH" eval "$(pyenv init -)" eval "$(pyenv virtualenv-init -)" source $ZSH/oh-my-zsh.sh` 

1 Answer 1

1

PATH="$HOME/bin:$HOME/.local/bin:$PATH" move this to your .profile or use the full path to the executable in your shortcut $(which pyenv)

Sign up to request clarification or add additional context in comments.

2 Comments

Thanks for the answer but it does not change anything.
Using the full path should work. The problem genesis is that shortcuts don't run in a shell, and your .zshrc file doesn't get executed by the shortcut. You could try sourcing the .zshrc from your launcher. If things still aren't working you can start a log file and print values to be sure things are as expected. echo "path=$PATH" >> /tmp/muhlog.log

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.