I am teaching a GIS course in a local collage using QGIS (qgis4w). The way our lab pc's work is that they delete all added material every start up from the C:\ drive. They also have a D:\ drive where data can be saved. My question is, is there a way to enable plugin installation in this configuration. I thought of something like moving the plugin definition file and the plugin folder to D:\
2 Answers
Sure thing. There are two options here:
One is that you can start QGIS with the --configpath arg so that all the configuration including plugins are stored at a custom path. Like so:
qgis.bat --configpath "D:\{somepath}"
You can put that in a .bat file and get the students to launch that.
This also has the advantage of being able to run QGIS, set it up how you like it, install some plugins, then just move the whole D:\{somepath} to a new home e.g. each machines D:\ so that each student has the same setup.
OR
You can set the QGIS_PLUGINPATH variable before you load QGIS which will tell QGIS to load extra plugins from that path. Like:
set QGIS_PLUGINPATH = D:\{somepath}
However with QGIS_PLUGINPATH QGIS will still install into the users home folder on the main drive (C:)
- 34,706
- 5
- 97
- 148
Given this hierarchy:
C:
└── PathToYourPlugins
├── Plugin1
└── Plugin2
In QGIS 3:
Navigate "Settings > Options > System", go to "Environment", check "use custom variables"(1) and add a new variable(2) as following:
(3) Append, QGIS_PLUGINPATH, C:\PathToYourPlugins
If you have plugins in multiple locations, you can add them all separated by semicolons like this: C:\PathToYourPlugins;C:\PathToMorePlugins
- 5
- 5
- 184
- 1
- 5
-
2Thanks, This is long waited – yair suari Feb 22 '20 at 06:45
