CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Bugs

OpenFOAM's bashrc removing elements from $PATH

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 22, 2016, 21:21
Default OpenFOAM's bashrc removing elements from $PATH
  #1
Member
 
Join Date: Aug 2015
Posts: 37
Rep Power: 10
knuckles is on a distinguished road
I've got OF2.3.0 installed in /opt/. I have observed that sourcing "/opt/openfoam230/etc/bashrc" within my .bashrc removes all entries beginning in "/opt/" from my PATH variable. On my system, both LaTeX and Matlab are installed in /opt/, so this makes these commands unavailable to me. I'm not sure whether this functionality is intentional, but - from my perspective - it should not be.

Digging through the source code, I've found that the script responsible is "openfoam230/bin/foamCleanPath", and that "openfoam230/etc/bashrc" calls this script with the argument $foamOldDirs, which is some sort of list of directories to filter. Looking at the corresponding files in OF3.0.x, it appears that the relevant scripts are still the same as in 2.3.0. I'm not sure what functionality is intended, so I won't go as far as proposing a specific change.


As a workaround, I have added the line "export PATH=$PATH:/opt/texbin:/opt/matlab/bin" to my .bashrc immediately after sourcing /opt/openfoam230/etc/bashrc to re-add the missing elements to PATH
knuckles is offline   Reply With Quote

Old   March 20, 2016, 14:08
Default
  #2
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Quick note: I've reported this a few minutes ago here: http://www.openfoam.org/mantisbt/view.php?id=2031
wyldckat is offline   Reply With Quote

Reply

Tags
bashrc


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Ansys SIG$ILL error loth ANSYS 3 December 24, 2015 05:31
[Gmsh] Vertex numbering is dense KateEisenhower OpenFOAM Meshing & Mesh Conversion 7 August 3, 2015 10:49
Installing OpenFOAM 1.6 on ubuntu 9.10 nabeels OpenFOAM Installation 32 May 10, 2010 03:09
Penetrating elements in extruded mesh Michael P CFX 2 May 20, 2005 08:06
CFX4.3 -build analysis form Chie Min CFX 5 July 12, 2001 23:19


All times are GMT -4. The time now is 14:47.