I used to editing script like php on geany and when try to use it I prefer pressing F5 than running command in terminal `$ php script.php`. but I realize that when I use geany terminal, it didn't recognized the `$PATH` that was set on .bashrc, like when using nodejs for example `$cmd = "node -v"; exec($cmd);` it just said `sh: 1: node: not found` if I install the nodejs from nvm. is there anyway to add the same `$PATH` on geany terminal?
Do you use the embedded terminal widget at the bottom to execute the command (this is setting "execute programs in the VTE" in the preferences dialog in the VTE tab)? Or is there a new terminal window popping out to execute the command?
In the former case, what does `echo $PATH` show and how does it look like when you check the `$PATH` in a normal terminal where it works?
In the latter case, play with the setting "Terminal" in the "Tools" tab in the preferences dialog (https://geany.org/manual/#tools-preferences). You could try another terminal emulator or change the command to force it executing a Bash. It could be that another shell is started in the terminal emulator and so your `.bashrc` is not used.
It seems you posted this also on https://askubuntu.com/questions/1540536/geany-terminal-path, linking the issues could help others to not double the work trying to help you.
reinforcers left a comment (geany/geany#4227)
what I'm using is the one that popping out new terminal window but without prompt

i did try `$cmd = 'echo $PATH'; exec($cmd);` weirdly doesn't show anything. but if I run `echo $PATH` directly on terminal it shows all path completly
/home/xxxxxx/.nvm/versions/node/v20.18.2/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/xxxxxx/Android/platform-tools:/home/xxxxxx/gradle/bin
the setting "Terminal" in the "Tools" tab shows `x-terminal-emulator -e "/bin/sh %c"`
eht16 left a comment (geany/geany#4227)
the setting "Terminal" in the "Tools" tab shows `x-terminal-emulator -e "/bin/sh %c"`
Try changing to `x-terminal-emulator -e "/bin/bash %c"` so that Bash is started and not Dash.
reinforcers left a comment (geany/geany#4227)
Try changing to `x-terminal-emulator -e "/bin/bash %c"` so that Bash is started and not Dash.
I did and still nothing, I guess nothing can be done for this on my case
Closed #4227 as completed.
reinforcers left a comment (geany/geany#4227)
after reading some suggestion in, linux mint forum, looks like I finally work it out
1. the `x-terminal-emulator` need to be change to the os terminal default in my case `gnome-terminal` 2. yes `"/bin/sh %c"` need to be change but also add `--login` so it become `"/bin/bash --login %c"` 3. it still won't run .bashrc file so the added PATH in .bashrc file need to be copied to .profile
and voila it is done
github-comments@lists.geany.org