CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (https://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   Edit .C file (https://www.cfd-online.com/Forums/openfoam-programming-development/82496-edit-c-file.html)

McCarra November 28, 2010 06:54

Edit .C file
 
Hello everybody,

How can I edit a .C file? My gedit says [Read-Only].

thanks

wyldckat November 28, 2010 10:09

Greetings José,

My guess is that you are using Ubuntu 10.04 or 10.10 and have installed the Debian packages of OpenFOAM. If this is the case, the OpenFOAM source code is installed in /opt, which is a system folder and can only be edited using superuser powers, i.e. using sudo or using "su -" to change to the user root.

The proper way of editing OpenFOAM code is to copy the desired library or application into your user area, modifying it for building it in your user space and then doing the desired modifications. See this tutorial: How to add temperature to icoFoam
Also, you can see in the official user guide, this section: Compiling applications and libraries
Either that, or build OpenFOAM from source in your own user space: Source Pack Installation

Best regards,
Bruno


All times are GMT -4. The time now is 06:37.