<div dir="ltr"><div><div>Thanks Luiz for the alternative solution. I will try that later.<br><br></div>Best regards,<br></div>Zhang Qun<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Nov 16, 2017 at 7:53 PM, Luiz Motta <span dir="ltr"><<a href="mailto:motta.luiz@gmail.com" target="_blank">motta.luiz@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi <span style="font-size:12.8px">Zhang,</span><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">In my plugins, I use the '__file__' for get the path of my plugin.</span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">Example in '__ini__.py':</span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">import os</span></div><div><span style="font-size:12.8px">dirPlugin = os.path.dirname(__file__)</span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px"><br></span></div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">2017-11-16 8:47 GMT-02:00 Patrick Dunford <span dir="ltr"><<a href="mailto:enzedrailmaps@gmail.com" target="_blank">enzedrailmaps@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div text="#000000" bgcolor="#FFFFFF">
    <p>There are sometimes reasons why this method may not work (I think
      Ubuntu does have a particular limitation in this regard)</p>
    <p>One option is you can create a shortcut on the menu and pass the
      variable value in that shortcut.<br>
    </p>
    For example one of the Qgis shortcuts on the Whiskers menu in XFCE
    on my computer uses this command to start a version of Qgis that I
    built from source and installed to a different path:<br>
    <br>
    env LD_LIBRARY_PATH=/home/patrick/<wbr>apps/lib
    /home/patrick/apps/bin/qgis<br>
    <br>
    where env is passing that variable into the environment that Qgis
    starts with.<div><div class="m_-8213820957429209105h5"><br>
    <br>
    <div class="m_-8213820957429209105m_-3457585042417144660moz-cite-prefix">On 16/11/17 23:33, Zhang Qun wrote:<br>
    </div>
    </div></div><blockquote type="cite"><div><div class="m_-8213820957429209105h5">
      <div dir="ltr">
        <div>
          <div>
            <div>
              <div>
                <div>
                  <div>
                    <div>
                      <div>Dear all,<br>
                        <br>
                      </div>
                      I want to use the <code class="m_-8213820957429209105m_-3457585042417144660gmail-docutils m_-8213820957429209105m_-3457585042417144660gmail-literal"><span class="m_-8213820957429209105m_-3457585042417144660gmail-pre">QGIS_PLUGINPATH</span></code>
                      environment variable to point to the directory
                      where my plugin are located but did not manage to
                      get it work.<br>
                      <br>
                    </div>
                    I'm on Ubuntu16.04 and running QGIS 2.18.<br>
                    <br>
                  </div>
                  I set the variable in terminal by:<br>
                  $ export
                  QGIS_PLUGINPATH=~/QGIS_Plugins<wbr>/rndf-editor/RNDFEditor/<br>
                  <br>
                </div>
                and launch the QGIS in this terminal (I guess in order
                to get the variable effective I have to run within the
                terminal right?)<br>
                <br>
              </div>
              $ qgis<br>
              <br>
            </div>
            But my plugin still did not get to show under the manu
            Plugin.<br>
            <br>
          </div>
          Can anyone advise me the correct way to do it? Thanks.</div>
        <div><br>
        </div>
        <div>Best regards,</div>
        <div>Zhang Qun<br>
        </div>
      </div>
      <br>
      <fieldset class="m_-8213820957429209105m_-3457585042417144660mimeAttachmentHeader"></fieldset>
      <br>
      </div></div><pre>______________________________<wbr>_________________
QGIS-Developer mailing list
<a class="m_-8213820957429209105m_-3457585042417144660moz-txt-link-abbreviated" href="mailto:QGIS-Developer@lists.osgeo.org" target="_blank">QGIS-Developer@lists.osgeo.org</a>
List info: <a class="m_-8213820957429209105m_-3457585042417144660moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" target="_blank">https://lists.osgeo.org/mailma<wbr>n/listinfo/qgis-developer</a>
Unsubscribe: <a class="m_-8213820957429209105m_-3457585042417144660moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" target="_blank">https://lists.osgeo.org/mailma<wbr>n/listinfo/qgis-developer</a></pre>
    </blockquote>
    <br>
  </div>

<br>______________________________<wbr>_________________<br>
QGIS-Developer mailing list<br>
<a href="mailto:QGIS-Developer@lists.osgeo.org" target="_blank">QGIS-Developer@lists.osgeo.org</a><br>
List info: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailma<wbr>n/listinfo/qgis-developer</a><br>
Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailma<wbr>n/listinfo/qgis-developer</a><br></blockquote></div><br></div>
</div></div><br>______________________________<wbr>_________________<br>
QGIS-Developer mailing list<br>
<a href="mailto:QGIS-Developer@lists.osgeo.org">QGIS-Developer@lists.osgeo.org</a><br>
List info: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="noreferrer" target="_blank">https://lists.osgeo.org/<wbr>mailman/listinfo/qgis-<wbr>developer</a><br>
Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="noreferrer" target="_blank">https://lists.osgeo.org/<wbr>mailman/listinfo/qgis-<wbr>developer</a><br></blockquote></div><br></div>