Feature request #6961

add additional path for python plugins in system options

Added by Regis Haubourg about 11 years ago. Updated about 5 years ago.

Status:Closed
Priority:Low
Assignee:-
Category:Python plugins
Pull Request or Patch supplied:No Resolution:fixed/implemented
Easy fix?:No Copied to github as #:16071

Description

Currently, it is possible to list additionnal path(s) for C++ plugins. It would be nice to add also path(s) for python plugins.
QGIS_PLUGINPATH environnement variable permits to achieve it, but it supposes to have admin rights on the system.
Regards,
Régis

History

#1 Updated by Larry Shaffer about 11 years ago

Hi Régis,

This should be pretty straightforward to do.

QGIS_PLUGINPATH environnement variable permits to achieve it, but it supposes to have admin rights on the system.

Which system requires admin rights to set environment variables? I'm assuming Windows. I'm also assuming you already tried adding the QGIS_PLUGINPATH to the new Custom Environment Variables table, yes?

#2 Updated by Regis Haubourg about 11 years ago

Hi Larry,
right, I did try to modify QGIS_PLUGINPATH in the new Custom Environment Variables table, but it remained greyed out, even on a Windows XP with admin rights.. tested with revision 7e29d7c

#3 Updated by Larry Shaffer about 11 years ago

  • Status changed from Open to Feedback

Hi Régis,

Could you test if commit 9182ab2 fixes the greyed-out issue for you? Looks like those QtDesigner-made connections maybe got erased when I was doing some final fiddling with the layout for the variable tables.

It won't fix the admin/standard user issue. If you get it working with an admin account, please test with standard user. If it doesn't work for the standard user, I should probably grey the custom vars table, notifying the user as to why, or hide it. Then, just need a way to figure out if the current user on Windows is an admin or standard user.

There seems to be other, third-party solutions, like SetEnv for setting user-defined env vars, but not sure if it could be included with the OSGeo4W installer. That utility also seems to have issues with Windows 7 and 8.

Also, I don't develop on Windows, so another dev will need to help implement any further Windows-specific changes.

#4 Updated by Regis Haubourg about 11 years ago

Hi Larry,
tested on Win XP with admin rights. It works OK. two remarks:
1- the tab of system environemment variable is editable, even if it is read only in reality. Cool for copy/paste values, but a bit confusing. Is it possible to copy paste values from this tab, but without allowing it to be editable (not really important, very few user will try that).

2- I realized that QGIS_PLUGINPATH path list is not traced in log messages panel. It would be nice for debugging purposes.

Thanks very much Larry!

#5 Updated by Larry Shaffer about 11 years ago

BTW, Juergen added the Windows env var support with commit 314d144

regis Haubourg wrote:

1- the tab of system environemment variable is editable, even if it is read only in reality. Cool for copy/paste values, but a bit confusing. Is it possible to copy paste values from this tab, but without allowing it to be editable (not really important, very few user will try that).

Yeah, I couldn't find a simple read-only way of doing the copy, that didn't include allowing editing as well. I thought about putting a textChanged connection on the cells that would auto-revert the contents on leaving or changing. Still looking into it.

2- I realized that QGIS_PLUGINPATH path list is not traced in log messages panel. It would be nice for debugging purposes.

Do you mean it should be part of this log output?:

Application state:
QGIS_PREFIX_PATH env var:        
...

#6 Updated by Regis Haubourg about 11 years ago

Ok, thanks to Jurgen too,

Do you mean it should be part of this log output?:

Application state:
QGIS_PREFIX_PATH env var:

It could be something like :

Prefix: C:/Program Files/Quantum Gis/apps/qgis
Plugin Path: C:/Program Files/Quantum Gis/apps/qgis/plugins
Python Plugin Path(s) //Nas01/appdata2008/haubourg/AppData/Roaming/.qgis/python/plugins ; F:/MyOtherPluginLocation
Package Data Path: C:/Program Files/Quantum Gis/apps/qgis/.
Active Theme Name: default
Active Theme Path: :/images/themes/default/
Default Theme Path: :/images/themes/default/
SVG Search Paths: C:/Program Files/Quantum Gis/apps/qgis/./svg/
//Nas01/appdata2008/haubourg/AppData/Roaming/.qgis/svg/
User DB Path: C:/Program Files/Quantum Gis/apps/qgis/./resources/qgis.db

#7 Updated by Regis Haubourg over 9 years ago

can be closed. has been done in QGIS 2.0

#8 Updated by Paolo Cavallini over 9 years ago

  • Status changed from Feedback to Closed
  • Resolution set to fixed/implemented

#9 Updated by Alain FERRATON about 5 years ago

I don't know if a version of QGIS has displayed in the logs the paths of the python plugins but this doesn't seem to be the case with QGIS 3

cf :
2019-02-27T14:35:53 INFO État de l'application
variable d'environnement QGIS_PREFIX_PATH : C:/Program Files/QGIS 3.4/apps/qgis-ltr
Préfixe: C:/Program Files/QGIS 3.4/apps/qgis-ltr
Chemin des extensions: C:/Program Files/QGIS 3.4/apps/qgis-ltr/plugins
Chemin des paquets de données: C:/Program Files/QGIS 3.4/apps/qgis-ltr/.
Nom du thème actif: default
Chemin du thème actif: C:/Program Files/QGIS 3.4/apps/qgis-ltr/./resources/themes\default\icons/
Chemin du thème par défaut: :/images/themes/default/
Chemins de recherche SVG: C:/PROGRA~1/QGIS3~1.4I/apps/qgis/./svg/
C:/Users/alain.ferraton/AppData/Roaming/QGIS/QGIS3\profiles\default/svg/
C:/Program Files/QGIS 3.4/apps/qgis-ltr/./svg/
C:\Users\alain.ferraton\AppData\Roaming\QGIS\QGIS3\profiles\default/svg/
Chemin de la BD utilisateur: C:/Program Files/QGIS 3.4/apps/qgis-ltr/./resources/qgis.db
Chemin de la BD d'authentification: C:\Users\alain.ferraton\AppData\Roaming\QGIS\QGIS3\profiles\default/qgis-auth.db

Also available in: Atom PDF