From: Dan Wright (dtwright_at_uiuc.edu)
Date: Tue Jun 03 2008 - 11:24:22 CDT

Hi Benjamin,

I've gotten VMD running in text-only mode on MacOSX before. I got it
running on a machine to which I only have remote access, so it's not
possible to run VMD as the user logged into the graphical interface. One
caveat is that I did this on vmd 1.8.6, and while I think these
instructions will still be valid for vmd 1.8.7, things might be a little
different. Basically, what I've done is removed all calls to Apple's
Carbon framework, which ALWAYS tries to touch the window system even if
you aren't displaying any graphics, thereby creating the problem.

0) make sure netcdf and a non-Apple TCL are installed in /usr/local

1) build plugins
   - need netcdf lib installed
   - make
   - remove 'pdf' target from 'distrib' line in autoimd/Makefile and
pdfgen/Makefile (to prevent attempts to build the documentation)
   - export PLUGINDIR=../vmd/plugins; make distrib

2) build vmd -- changes necessary to run in text mode!
   - ./configure MACOSX SILENT TCL
   - need to use non-Apple TCL in /usr/local/{lib,include}: set
     TCL_INCLUDE_DIR=/usr/local/include, TCL_LIBRARY_DIR=/usr/local/lib
   - change '-ltcl8.4-x11' to '-ltcl8.4' in src/Makefile
   - change '-framework Carbon' to '-framework CoreFoundation' in
src/Makefile
   - edit src/macosxvmdstart.C and add '#if 0' below the line that reads
     '#if defined(ARCH_MACOSX) || defined(ARCH_MACOSXX86)'; add an extra
'#endif' to the bottom of the file.
   - edit src/vmd.C, and comment out the call to 'macosxvmdstart(*argc,
argv);'
   - cd src ; make

Sorry I don't have this available as a patch, I never got around to
doing that. Hope this is helpful!

Dan

Benjamin Hall wrote:
> Hi
>
> I'm writing an a tool which uses vmd in an automated way to analyse
> various properties of a set of trajectories autonomously, and I've
> encountered a problem which specifically arises when running vmd in the
> background when not logged in (either with ssh or graphically). If
> logged in with ssh, vmd runs but gives an error message:
>
> _RegisterApplication(), FAILED TO establish the default connection to
> the WindowServer, _CGSDefaultConnection() is NULL.
>
> However, if I log out before completion, vmd aborts with the error message:
>
> FAILED TO GET ASN FROM CORESERVICES so aborting.
>
> I have tried compiling vmd without "OPENGL", "FLTK" and "TK" configure
> options (as advised in a previous post,
> http://www.ks.uiuc.edu/Research/vmd/mailing_list/vmd-l/6192.html), but
> this doesn't appear to help. I've also tried omiting plugins which might
> use gui elements, without success. I think that the error itself is
> related to a security feature of the operating system, described in the
> following technote:
>
> http://developer.apple.com/technotes/tn2005/tn2083.html
>
> Any advice on how to approach this problem would be greatly appreciated.
> Thanks in advance,
>
> Ben
>
> ************************************************************************
> Benjamin A. Hall
> Structural Bioinformatics & Computational Biochemistry Unit
> University of Oxford
> http://sbcb.bioch.ox.ac.uk/hall.php
> +44 (0)1865 275380
> benjamin.hall_at_bioch.ox.ac.uk
>
>
>
>