[Ifeffit] Status of ifeffit, atoms, athena, etc on MacOS X
Matt Newville
newville at cars.uchicago.edu
Wed Mar 6 14:31:19 CST 2002
Hi,
> I have ifeffit and atoms running just fine on MacOS X, thanks to
> Francois' hard work figuring some things out and Matt's quick port of
> ifeffit.
>
> 1. Does anyone have Athena running?
Not yet. I'm still struggling with the perl/Tk part. I've tried
twice, but haven't gotten it to work yet.
> 2. Is anyone able to run ifeffit from Terminal.app, as opposed to
> running it from an xterm? When I try this, I get an error message,
> "PGPLOT /xw: cannot connect to X server". When I do ps -aux | grep
> pgp I see a process
>
> charlesb 3239 0.0 0.1 67316 672 std- S 0:00.04
> /sw/pgplot/pgxwin_server -display :0.0
>
> so clearly I need to something to tell terminal.app about the pgplot
> server? Anyone have advice on this? I just don't know where to look
> beyond this point.
>
> Why do I care about this distinction? (1) Terminal.app supports
> cut/copy/paste, (2) terminal.app is scriptable, which means that you
> can define define macros, or use script menu to put in common command
> blocks. In principle, this means that you could use Applescript
> studio to control ifeffit from a mac-native gui.
Can you run any X applications from the Terminal.app? Assuming
you can, here's a thought (I'll try this out too): From a
'real xterm' launch ifeffit and do a simple plot
~> ifeffit
Ifeffit> testplot
Ifeffit> quit
This should leave the PGPLOT window up and alive and ready for
the next connection. (If the PGPLOT window goes away when you
quit ifeffit, setting environmental variable PGPLOT_DEV to
'/xserve' should fix that).
Then run ifeffit in a Terminal.App. This might/should be able
to find and use the already-running PGPLOT window. It sounds
kludgy, but if this works we can probably use it to rig
something to auto-start PGPLOT from a non-xterm.
> 3. Has anyone run ifeffit using aquaterm?
I haven't tried. It looks interesting ....
Bruce's suggestion:
BR> #!/usr/bin/perl -w
BR> use Tk;
BR> use Ifeffit qw(get_scalar);
BR> use Tk::Dialog;
BR> my $x = get_scalar('etok');
BR> my $top=MainWindow->new();
BR> $top->Label(-text=>"Ifeffit sez etok=$x") ->pack();
BR> $top->Button(-text=>'Done', -command=>sub{exit})->pack();
BR> MainLoop;
The Ifeffit part of this should work:
#!/usr/bin/perl
use Ifeffit qw(get_scalar);
$x = get_scalar('etok');
print " Ifeffit sez etok=$x\n";
but, I don't have the perl/Tk working. To get 'use Ifeffit;'
to work, this:
cd ifeffit_1.0b/src/macosx
make
sudo make install
cd ../../wrappers/perl
perl Makefile.PL
sudo make install
should do the trick (ie, install Ifeffit.pm after installing
the base library). This ought to build and install athena too.
For what it's worth, python/Tkinter and gifeffit run OK for me.
--Matt
More information about the Ifeffit
mailing list