Nobody-86
Nobody-86

Reputation: 191

Is it possible to run openfoam from a bash script in an org-mode sourceblock?

I have an org-mode document and would like to run openfoam from a sourceblock. As OS I use Windows 10 where I have openfoam installed in an Ubuntu WSL (Windows subsystem for Linux) environment.

Basically I think that bash scripts are recognized and executed correctly by org, because this example gives correct output:

#+begin_src bash :results output
  lsb_release -a
#+end_src

#+RESULTS:
: Distributor ID:   Ubuntu
: Description:  Ubuntu 20.04 LTS
: Release:  20.04
: Codename: focal

But this code block here returns an error message

#+begin_src bash :results output
  gmshToFoam geometry.msh
#+end_src

bash: line 1: gmshToFoam: command not found

I suspect that an environment variable is missing because the command is not recognized. When I start the Linux shell manually the command is recognized. Is it possible that the $HOME/.bashrc file is not loaded by org?

Upvotes: 0

Views: 272

Answers (0)

Related Questions