<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">hi,<div>in Mac OSX Lion there is nomore file/folder ~/.MacOSX/environment.plist</div><div>i also donīt know exactly in which file i had to add the environment variables.</div><div>in the users home directory i found the files:</div><div>.profile</div><div>.bash_profile</div><div>these files are empty</div><div><br></div><div><div>with the command "echo $PATH" i get the following environment variables:</div><div>/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/sw/bin:/sw/sbin:/usr/X11R6/bin:/usr/local/pgsql/share/contrib/postgis-1.5/:/usr/local/pgsql/bin</div></div><div><br></div><div>i found these in the file:</div><div>/etc/paths</div><div><br></div><div>and under the folder </div><div>/etc/paths.d/</div><div><br></div><div>but these are really not for all applications. i hope i can find the real files where i can put in environment variables for the whole system. any idea?</div><div><br></div><div>here i found some tips:</div><div><a href="http://stackoverflow.com/questions/7501678/set-environment-variables-on-mac-os-x-lion">http://stackoverflow.com/questions/7501678/set-environment-variables-on-mac-os-x-lion</a></div><div><br></div><div>i followed your tipp and starteted qgis from the terminal and everything went fine with the postgis manager.</div><div><br></div><div>the following code in the QGis Python Console donīt solve the problem:</div><div><blockquote type="cite"><div>import os<br>path = os.getenv("PATH")<br>pgpath = "/usr/local/pgsql/share/contrib/postgis-1.5/:/usr/local/pgsql-9.1/bin:/usr/local/pgsql-9.1/bin"<br>path = pgpath if path == None or path == "" else path + os.pathsep + pgpath<br>os.putenv("PATH", path)</div></blockquote></div><div><br></div><div><br></div><div><div><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; font-family: Arial; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; font-family: Helvetica; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div><div style="font-family: Helvetica; ">regards</div></div></span></div></span></div></span></div></span></div></span></div></span></div></span></div></span></div></div><font class="Apple-style-span" face="Arial"><br class="Apple-interchange-newline"></font></div><div>Florian</div></div><div><br></div><div><br></div><div><br></div><div><br></div><div><div>Am 22.01.2012 um 00:03 schrieb Giuseppe Sucameli:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>Hi,<br><br>On Fri, Jan 20, 2012 at 9:51 PM, Florian Beyerbach<br><<a href="mailto:Florian.Beyerbach@gmx.de">Florian.Beyerbach@gmx.de</a>> wrote:<br><blockquote type="cite">i use the tool terminal and the path environment variables are:<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">mbp-wlan:~ fbeyerbach$ echo $PATH<br></blockquote><blockquote type="cite">/sw/bin:/sw/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/usr/X11R6/bin:/usr/local/pgsql/share/contrib/postgis-1.5/:/usr/local/pgsql-9.1/bin:/usr/local/pgsql-9.1/bin<br></blockquote><br>I've no MacOS, but few months ago I understood how it works.<br>Each application defines what environment variables it needs, but<br>the user can change them editing ~/.MacOSX/environment.plist<br><br>What you wrote is the value of PATH defined for terminal,<br>not the one for all the applications you run.<br><br>A way to have the same terminal's environment in an application<br>is to run the application from terminal.<br>Could you try again running Qgis from terminal?<br><br>Another solution could be to add environment variables before<br>PostGis Manager launches shp2pgsql, just setting PATH using<br>the QGis Python Console (menu Plugins):<br><br>import os<br>path = os.getenv("PATH")<br>pgpath = "/usr/local/pgsql/share/contrib/postgis-1.5/:/usr/local/pgsql-9.1/bin:/usr/local/pgsql-9.1/bin"<br>path = pgpath if path == None or path == "" else path + os.pathsep + pgpath<br>os.putenv("PATH", path)<br><br>In addition, there's a opened ticket [1] to add a panel to set/override<br>environment variables withing QGis to help OSX users.<br><br>I hope this helps.<br>Regards.<br><br>[1] <a href="http://hub.qgis.org/issues/3097">http://hub.qgis.org/issues/3097</a><br><br><blockquote type="cite">i think this should work. any idea?<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Am 20.01.2012 um 20:18 schrieb Giuseppe Sucameli:<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><blockquote type="cite">Hi Florian,<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">On Fri, Jan 20, 2012 at 7:54 PM, Sandro Santilli <<a href="mailto:strk@keybit.net">strk@keybit.net</a>> wrote:<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">On Fri, Jan 20, 2012 at 07:14:07PM +0100, Florian Beyerbach wrote:<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">it is the first time i use this community support. if i make any mistake iīm sorry.<br></blockquote></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">I think this message should be sent to the qgis-user mailing list<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">as the plugin is a QGis plugin.<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">i try to use the PostGIS Manager Plugin 0.5.15 for QGIS 1.7.3 with the postgresql 9.1 and postgis 1.5.3 database on my MacBookPro with Mac OSX Lion 10.7.2.<br></blockquote></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">know i want to "Load Data from Shapefile", i chose the shape file in the dialog and after i click the load button<br></blockquote></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">i get the error message: "Message: Filename: None".<br></blockquote></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">PostGis Manager assumes that shp2pgsql executable is in PATH<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">environment variable. It's unable to find it, so it throws an OSError<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">exception.<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">I'm sure that after adding shp2pgsql to the PATH env var it should<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">work fine, but I've no Mac so I cannot say how to do this...<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">I hope this helps.<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Regards.<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">I have no idea what the problem is, can anybody help me?<br></blockquote></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">I think the db_manager plugin superceeds the PostGIS Manager one.<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">Giuseppe (in Cc) is the author of db_manager, but can probably also<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">help with the PostGIS Manager plugin.<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">--strk;<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"> ()   Free GIS & Flash consultant/developer<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"> /\   <a href="http://strk.keybit.net/services.html">http://strk.keybit.net/services.html</a><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">--<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Giuseppe Sucameli<br></blockquote></blockquote><blockquote type="cite"><br></blockquote><br><br><br>-- <br>Giuseppe Sucameli<br></div></blockquote></div><br></body></html>