Florent,
Maybe obsolete already.
You could also source the user specific .profile in the galaxy startup script.
We have chosen for maybe the unsafe manner sourcing etc/profile...but to that 
only developers (a few) have access anyway for installing system wide 
commands/utils...
I never checked the ~/.profile whether its sourced. We directly put etc/profile 
there!
Cheers,
Alex

-----Oorspronkelijk bericht-----
Van: Florent Angly [mailto:florent.an...@gmail.com] 
Verzonden: maandag 14 februari 2011 8:18
Aan: Bossers, Alex
CC: galaxy-user@lists.bx.psu.edu
Onderwerp: Re: [galaxy-user] Galaxy does not find my executables

Hi Alex,

Thanks for the pointers! The fact that Galaxy only reads /etc/profile and not 
the profile of the user that runs it, ~/.profile, entirely explains why it 
cannot find Grinder or Velvet:
I run Galaxy on a Mac OS X and I have many programs installed from MacPorts. 
All these programs get installed under /opt/local/bin/, which is outside of the 
usual Mac paths (to avoid any conflict). So, every user on this Mac has to have 
/opt/local/bin added to its path in its ~/.profile to be able to use MacPorts 
program. I did this for my galaxy user, but if Galaxy does not read ~/.profile, 
then it won't find the programs I installed.

I am surprised that you report that Galaxy does not read ~/.profile in fact, 
because on this wiki page, 
https://bitbucket.org/galaxy/galaxy-central/wiki/Config/ProductionServer, it is 
advised to set up the $TEMP environment variable for Galaxy. How is one 
supposed to do that? I don't think that it would be advisable to ask people to 
edit their system-wide /etc/profile...

So, how do I have to setup environment variables so that they will be used by 
Galaxy?

Best,

Florent




On 14/02/11 06:01, Bossers, Alex wrote:
> Florent,
> maybe your questions better reside in the dev-list but anyway we have 
> encounter similar things for various reasons.
> When plugging binaries/tools outside galaxy it works setting paths and 
> such.... but PATH environments and other ENVironmental variables are usually 
> not directly set for the running galaxy user (since it phusically doesn't get 
> into shell. We therefore source the /etc/profile in the galaxy server startup 
> script to be sure to have the correct environmentals set as is for the other 
> users. What I do not understand is that the tools seem to work when logged in 
> fysically as galaxy user....in our case the tools wouldn't have worked.
> Are you sure (I think you are but you never know) that its a perl script? 
> Ocassionally we have seen something like this but was solved by omitting the 
> interpreter part in the tool config xml or setting it to bash.
> Good luck.
> Alex
>
> ________________________________________
> Van: galaxy-user-boun...@lists.bx.psu.edu 
> [galaxy-user-boun...@lists.bx.psu.edu] namens Florent Angly 
> [florent.an...@gmail.com]
> Verzonden: zondag 13 februari 2011 9:03
> Aan: galaxy-user@lists.bx.psu.edu
> Onderwerp: [galaxy-user] Galaxy does not find my executables
>
> Hi list,
>
> I am writing a wrapper for a Grinder, a Perl program installed 
> globally on my Galaxy server.
>
> Galaxy runs as user 'galaxy':
> $ ps aux | grep paster
> galaxy   26807   0.0  0.8  2636308 136364   ??  S     2:52PM   0:19.15
> python ./scripts/paster.py serve universe_wsgi.ini
>
> When logged in as user galaxy, I can run Grinder:
> $ Grinder --help
> Usage:
>              Grinder [options]
>              Grinder --help
>              Grinder --version
> ...
>
> Grinder's location is:
> $ which Grinder
> /opt/local/bin/Grinder
>
> In grinder.xml:
> If I put:<command interpreter="perl">
> In the Galaxy webinterface, I get the error: Can't open perl script
> "/Users/galaxy/galaxy_dist/tools/ngs_simulation/Grinder": No such file 
> or directory Obviously, here, Galaxy assumes wrongly that tool is 
> installed under the Galaxy ~/tools/ngs_simulation/ folder.
>
> So I tried to omit the interpreter:<command> And I got the error: 
> /bin/sh: Grinder: command not found This is surprising, since Grinder 
> is found if I run it on the command-line as user galaxy
>
> I noticed that I have the same issue with the Velvet wrapper (also 
> located in /opt/local/bin) and thought that this could be an 
> environment issue. And indeed the environment within a wrapper is:
> PERL=/usr/bin/perl
> PATH=/usr/bin:/bin:/usr/sbin:/sbin
>
> While on the command line, the environment is:
> PERL=/opt/local/bin/perl
> PATH=/opt/local/bin:/opt/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin:/sw/
> bin
>
> This difference in environment explains why Galaxy cannot find Grinder 
> or Velvet.
>
> Does this make any sense? Does Galaxy modify the environment? Why 
> would the environment be different?
>
> Thanks for your help,
>
> Florent
>
> _______________________________________________
> The Galaxy User list should be used for the discussion of Galaxy 
> analysis and other features on the public server at usegalaxy.org.  
> For discussion of local Galaxy instances and the Galaxy source code, 
> please use the Galaxy Development
> list:
>
>    http://lists.bx.psu.edu/listinfo/galaxy-dev
>
> To manage your subscriptions to this and other Galaxy lists, please 
> use the interface at:
>
>    http://lists.bx.psu.edu/




_______________________________________________
The Galaxy User list should be used for the discussion of Galaxy analysis and
other features on the public server at usegalaxy.org.  For discussion of local
Galaxy instances and the Galaxy source code, please use the Galaxy Development
list:

  http://lists.bx.psu.edu/listinfo/galaxy-dev

To manage your subscriptions to this and other Galaxy lists, please use the
interface at:

  http://lists.bx.psu.edu/

Reply via email to