[sharp-discuss] OS X / UNIX, how do I enable helper apps for viewing maps

Clemens Vonrhein vonrhein at globalphasing.com
Tue Dec 22 17:40:04 CET 2009


Hi Jochen,

those 'helper applications' follow the normal browser (firefox, safari
... whatever) mechanism:

 - a file is being 'served' from the httpd (server) to the browser
   (client) with a specific mime-type.

 - initially, the browser/client doesn't know what to do with it
   (since it hasn't encountered this particular mime-type before). So
   it will ask you what to do

 - since the files for viewing maps are a bit more complex (they're
   actually tar-files) you need to use a specific application for each
   of those SHARP-specific mime-types.

   E.g. if you use Coot for looking at maps (mime-type is
   "chemical/x-coot") you should point your browser to

     $BDG_home/bin/helpers.x-coot

   where $BDG_home is the installation directory of your
   SHARP/autoSHARP server.

   For other mime-types (MTZ files, MTV plots etc) we have other
   helpers.x-* files in the same location.

So the important bits are:

  1. point your browser to the correct $BDG_home/bin/helpers.x-? the
     first time it asks. If this then works for you: there is often
     some check-box in the dialog box that would allow you to make
     this decision permanent.

  2. point to the correct $BDG_home/bin location

  3. the setup file $BDG_home/bin/helpers.local contains all necessary
     information: this is the only file you should need to edit (if at
     all).

  4. if something went wrong: you might need to delete some already
     specified action from the 'preferences' menu of your browser
     ... sorry for not being too specific here, but each browser (and
     each browser version) seem to have a different layout and place
     for those ... sigh!

Does that give you some additional info to get it to work? There is
some additional but slightly out-of-date information at

  http://www.globalphasing.com/sharp/installation/bdg/chapter4.html

Cheers

Clemens

On Tue, Dec 15, 2009 at 05:40:16PM +0100, Jochen Kuper wrote:
> Dear All,
> 
> 
> this is a thread that somehow ended in 2005 seemingly without being resolved. Since I encounter the same problem as Mike at that time I wonder whether it has been solved?
> 
> Cheers,
> 
> 
> Jochen
> 
> 
> Hi Mike,
> 
> it surprises me that you should need to give the $PWD as
> well. We create a tar file in $BDG_scr (which you can set to whatever
> you want in the host-setup dialogue, usually something like
> /tmp). When this file is 'served' by the httpd to the client
> (i.e. firefox) it should already contain the whole path. But maybe OsX
> is 'special' in this respect ...
> 
> And yes: spaces in directories is a bit silly (in my opinion).
> 
> As you noticed, you should be able to create your own little
> helpers.x-SOMETHING script (I would call it something new, since an
> update of your SHARP/autoSHARP installation will overwrite your
> changed file; something like helpers.x-oOsX).
> 
> What you also probably need to change (since you needed the enclosing
> quotes) is the $BDG_home/bin/helpers script: the helpers.x-SOMETHING
> are just wrappers (because Mozilla/Firefox can't handle several
> arguments as can Netscape). And in $BDG_home/bin/helpers there might
> also be the need for quotes.
> 
> I will have a look at this ...
> 
> Cheers
> 
> Clemens
> 
> 
> On Wed, May 04, 2005 at 11:04:10AM -0700, Michael L. Quillin wrote:
> > 
> > Hi Clemens,
> > 
> > I saw this thread in the sharp-discuss archives (I apologize for not 
> > subscribing) and have been trying to sort out a similar problem. There 
> > are several issues that I have encountered trying to set up O as a 
> > viewer for SHARP under OS X. First, /usr and other directories listed 
> > in /.hidden are hidden from the OS X finder and open dialogs. Removing 
> > /usr or /sw from /.hidden will allow scripts placed under these trees 
> > to be specified as helper applications. Second, when opening map.pl 
> > with helper.x-onew manually, information about where map.pl is located 
> > is lost. I fixed this by inserting $PWD/ before $1 when calling the 
> > helpers script in helpers.x-onew. Third, since many OS X directory 
> > names (foolishly) include spaces, $PWD/$1 needs to be enclosed in 
> > double quotes. Fourth, since I am running gnome on top of X-windows I 
> > use the rooted option. Since O for OS X runs under Aqua, switching 
> > back-and-forth between O and X-windows becomes cumbersome. I fixed this 
> > by changing the xterm call in helpers.x-onew to the following:
> > 
> > echo `dirname $0`/helpers \"$PWD/$1\" chemical/x-onew > $$.com
> > chmod u+x $$.com
> > open -a /Applications/Utilities/Terminal.app $$.com
> > 
> > That opens the Aqua-based Terminal application that most people use to 
> > run O under OS X (adding $$.com to the final rm call cleans up this 
> > file as well).
> > 
> > Unfortunately, in spite of all of these changes and even though I can 
> > manually call the helper script, I cannot get Firefox to open the 
> > helper script properly. My hunch is that Firefox expects the helper 
> > application to be an OS X application rather than a simple executable 
> > file.
> > 
> > At any rate, I hope that you have not discussed this on sharp-discuss 
> > already (I didn't see any follow-up postings after mid-April). If you 
> > have any suggestions, please let me know.
> > 
> > Thanks,
> > Mike
> > 
> 
> -- 
> 
> -----------------------------------------------------------------
> Dr. Jochen Kuper
> Rudolf Virchow Center for Biomedical Research
> Josef Schneider Strasse 2, Haus D15
> 97070 Wuerzburg
> +49 (0) 9313180391
> jochen.kuper at virchow.uni-wuerzburg.de
> 
> 
> 
> 
> 

> _______________________________________________
> sharp-discuss mailing list
> sharp-discuss at globalphasing.com
> https://www.globalphasing.com/mailman/listinfo/sharp-discuss

-- 

***************************************************************
* Clemens Vonrhein, Ph.D.     vonrhein AT GlobalPhasing DOT com
*
*  Global Phasing Ltd.
*  Sheraton House, Castle Park 
*  Cambridge CB3 0AX, UK
*--------------------------------------------------------------
* BUSTER Development Group      (http://www.globalphasing.com)
***************************************************************


More information about the sharp-discuss mailing list