How to run 4nec2 under Linux?

4nec2 is a completely free Nec2, Nec4 and windows based tool for creating, viewing, optimizing and checking 2D and 3D style antenna geometry structures and generate, display and/or compare near/far-field radiation patterns for both the starting and experienced antenna modeler.

When running frequency sweeps, linear or logarithmic style SWR, Gain, F/B-ratio and impedance line-charts are produced. With the included Optimizer and Sweeper one is able to optimize antenna- and/or other environment-variables for Gain, resonance, SWR, efficiency and/or F/B, F/R-ratio. With the sweeper one is able to graphically display the effect of changing one or more of these variables for a specified range of values/frequencies.

For the starting modeler a graphically based 3D geometry-editor is included which requires no additional NEC knowledge while still enabling you to create and visualize and compare current-distribution, far/near-field patterns and Gain/SWR charts. More experienced modelers can use the gradient style and/or the genetic algorithm based optimizers to improve their designs.

To list some of its features or see some screenshots, click the appropriate links below on the left. To download and try the software click upmost two links below on the right (setup.exe) or the third link for a single zip containing all separate files.

Get the 4nec2 package here.

You can run 4nec2 under Unix and Wine. The below is an explanation I got from a user running 4nec2 on Linux.

Ubuntu 12.04 and later features a new, improved version of wine which allows to run 4nec2 directly, without any modification or additional files. The following procedure applies to an older Ubuntu version or any other distribution. Anyway, try first to run 4nec2 directly.

The following is a description of how to get 4nec2 to run under Linux and Wine. It is by no means perfect but it is the best I’ve come up with so far. If you discover any enhancements let me know and I’ll add them to the these intsructions so everyone can benefit:

1. Install Wine.

2. Edit the Wine configuration file “.wine/config” as follows:

* In the section [DllOverrides] set the DLL’s ole32.dll and oleaut32.dll to native:

"oleaut32" = "native, builtin"
"ole32" = "native, builtin"

* In the section [x11drv] prevent the window manager from managing created windows:

"Managed" = "N"

3. Copy the following DLLs to the the Wine “windows/system” directory (I use DLLs copy from a legal copy of Windows 98):


4. Unzip the 4nec2 ZIP files as follows:

unzip 4nec2v***.zip

 (*** = version number)

5. Install the base 4nec2 application (eg. to Program Files/4nec2):

wine Setup_4nec2.exe

6. Run 4nec2:

wine 4nec2.exe