CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Programming & Development (
-   -   Edit .C file (

McCarra November 28, 2010 07:54

Edit .C file
Hello everybody,

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


wyldckat November 28, 2010 11: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,

All times are GMT -4. The time now is 07:28.