[ADMB Users] ADMB and Cygwin

Arni Magnusson arnima at hafro.is
Mon Jul 5 16:01:47 PDT 2010


Hi Takis and Mark,

Alas, I haven't seen Cygwin since I tried it out back in 2003, so I can't 
test this on my computer.

My first response is that you may want to consider using c:/~ as the home 
directory for both Cygwin and ADMB-IDE. I use that directory to store 
settings for R, Emacs, and some smaller programs. I find it convenient to 
store such files in one directory, for backup purposes and when setting up 
a new machine.

My guess is that it's not the name c:/~ that has a magical effect on 
Cygwin, but rather that Cygwin keeps an eye on the environment variable 
called HOME. After the ADMB-IDE installer sets this variable to c:/~, 
Cygwin treats that directory as its home. That's how R and Emacs work, and 
you may notice other programs storing user settings in files starting with 
a dot.

If ADMB requires the HOME variable to be defined, and Cygwin then starts 
to use that directory, then the practical thing to do is to see if they 
can share their home. If you prefer their home to be 
c:/cygwin/home/besbeas, then you can redefine the HOME environment 
variable to that directory name.

Point by point:

1. Yes, the installer defines the HOME variable as c:/~, and creates that 
directory containing program settings.

2. Cygwin has made itself at home in c:/~, maybe that's okay?

3. To redefine HOME, you can adjust that environment variable. There are 
many helpful resources about environment variables on the web.

4. If Cygwin can't run the admb script, it's probably because admb.bat is 
in c:/admb/gcc440/bin, but the PATH variable in Cygwin does not include 
that directory. According to the Cygwin FAQ, you can set the PATH in 
c:/~/.bashrc. It's also possible that Bash scripts 
(http://admb-project.org/community/editing-tools/admb-ide/scripts-gcc-linux.zip/view) 
are better for Cygwin's digestion.

5. Your current profile makes Cygwin recognize the HOME environment 
variable, which is exactly the behavior I would prefer.

I'm shooting in the dark here, so I would appreciate to hear from Cygwin 
users. It would be useful to add a Cygwin sentence or two to the ADMB-IDE 
manual.

Arni



On Mon, 5 Jul 2010, Mark Maunder wrote:

> Arni,
>
> Any advice on the Cygwin issue below.
>
> Thanks,
>
> Mark
>
>
>
> ________________________________
>
> From: P.T.Besbeas [mailto:P.T.Besbeas at kent.ac.uk]
> Sent: Mon 7/5/2010 10:10 AM
> To: Mark Maunder
> Subject: RE: ADMB Course at Kent
>
> Hi Mark,
>
> Many thanks for a very nice workshop, and for your hard work today, 
> which is greatly appreciated.
>
> I'll see you at the drinks reception later on tonight, but if you email 
> Arni (?) about the cygwin problem I will be very grateful and it might 
> get more attention. Here's a brief account:
>
> 1) The IDE installation we did together appears to have created a 
> directory c:/~, with sub-directories emacs and icons.
>
> 2) Interestingly this directory has confused cygwin, which now uses it 
> as it's home directory, rather than what was being used previously (ie 
> c:/cygwin/home/besbeas). This means that the command $ cd and when 
> cygwin starts take you to c:/~. A number of .files are subsequently 
> appearing, eg
>
> $ ls
> .     ..     .bash_history    .emacs   .recentf   emacs   icons
>
> 3) The obvious thing we tried together (renaming c:/~) doesnt seem to 
> work as re-starting cygwin creates a new c:/~ and you are back to square 
> 1.
>
> 4) Interestingly, when we first did this, you appeard to be able to run 
> admb from cygwin, but this is no longer the case:
>
> $ admb
> bash: admb: command not found
>
> I would find it very practical if I could call admb from a cygwin 
> window.
>
> 5) Anders mention smthg about changing
> c:/cygwin/etc/default/etc/profile
> but I'm not sure. However I'm attaching this file for
> suggestions.
>
> Many thanks, and I'll see a bit later.
>
> Takis
>



More information about the Users mailing list