I’ve already written a couple of times about my efforts to use antenna modeling software to design a new antenna for the back yard. My original plan for a four-band vertical is perhaps overly-ambitious, so I may scale back to designing some sort of short vertical for 20m that’s both sturdy enough and inconspicuous enough to leave erected in the back yard for more than a few hours at a time. In the mean time, I continue to use Phil Salas’ ultimate portable vertical when I get the chance. But I digress.

Since I launched this little project, I managed to sidetrack myself by converting completely over from Windows XP to Ubuntu Linux. If you know me (or perhaps you can detect this from my blog entries), you know that I tend to be thinking about several different ideas at the same time, and this often results in my making little or no progress on any of them because I can’t focus on any single idea for very long. Maybe it’s an attention span deficit or something. And such appears to be the case with my antenna project. But while I continue to enjoy learning about the wonders of Linux (and I confess I’m thoroughly enjoying Ubuntu so far), I figured it was time to get back to antenna designing.

Back in my pre-Ubuntu days I was using a free package called 4Nec2 for doing antenna design work. Linux has a similar package called xnec2c which is also a graphical (GUI-based) implementation of the NEC-2 antenna modeling package. I figured I’d use xnec2c for doing my antenna design work in Ubuntu.

So I installed xnec2c and started it up. It looked cool enough, but I had no luck actually getting a model defined or calculated, and as far as I can tell there isn’t any documentation for this particular package. It didn’t help matters any that the GUI extended beyond the borders of my 1024×768 notebook display so that I couldn’t see all the controls. I probably could have gotten this figured out given enough time and effort, but I didn’t have the patience for it (see attention span above).

Instead, I decided to see if I could get 4Nec2 running in Ubuntu using Wine. Even if you’re a newbie to Linux, you probably already know that Wine is a package in Linux that allows you to run some Windows software under Linux. Wine is fairly easy to install and get running. It didn’t get installed as part of my installation of Ubuntu, but you can easily install it using the Synaptic Package Manager. Once it’s installed, you configure it by typing “wincfg” at a command prompt (which you can get by pressing Alt-F2). During configuration, you’ll be shown a multi-tabbed dialog box in which you can change various default settings. There’s really no reason to change any of the settings, but go ahead and tab through the various tabs and see what there is to see.

Once you have Wine configured, it’s easy to install and run Windows software, although you may not be able to run everything that runs under Windows. In my case, my next step was to download and install 4Nec2. It downloaded as a zip file that contained a single setup.exe file. Once I unzipped the setup.exe file, running it (to install the software) was a simple matter of opening a terminal window, cd’ing to the directory containing setup.exe, and typing wine setup.exe and running the setup program just like you would in Windows.

When you ran winecfg, it created a virtual C: drive for you in your home directory (in my case, /home/dave/.wine/drive_c). This is where Windows programs get installed under Wine. When you want to actually run one of the installed Windows programs, you simply type something like

wine “/home/dave/.wine/drive_c/Program Files/AppDir/app.exe”

(with the appropriate substitutions, of course).

Wine has plenty of other features and capabilities. I’ve just briefly touched on the highlights here. Look at the Community Ubuntu documentation for Wine to learn much more.

To make a long story short, I was very pleased to learn that 4Nec2 would run just fine using Wine in Ubuntu, so 4Nec2 will continue to be my antenna modeling tool of choice, at least for this project. More to come on that as I make progress.

5 thoughts on “Antenna Modeling, Courtesy of Ubuntu and Wine

  1. Hello Dave,

    just stumbled over your article about your antenna modelling experiments on Linux/Ubuntu.

    Nice to read that you succeeded in running 4nec2 on it.

    Reply
  2. Hello Dave,
    I have been using SuperNEC earlier, but have just converted to Linux (Ubuntu). And am really new at this. I have installed two packages (necpp and xnec2c) but don’t know how to “run” them. Can you help me here please?
    Thanks.

    Dhiraj

    Reply
  3. Hello Dave,

    I do not use Ubuntu but Suse (now 11.0) Till now I used 4nec2 by temporarily going to Windows. I followed your article and ‘lo and behold’ 4nec2 is running nicely with Wine and Suse. Thanks!

    Reply

Leave a reply

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> 

required