Load local plugin automatically in QGIS

For a PyQGIS (hence, multi-platform) answer, you can create a startup.py file at /home/USER/.qgis2/python/ (or C:\Users\USER\.qgis2\python\ for Windows), and write this code inside:

from PyQt4.QtCore import QSettings
packageName = 'myPlugin' # Name of your plugin folder
QSettings().setValue( "PythonPlugins/" + packageName, True )

This will activate the plugin for you when QGIS starts.


To do this you have to tweak windows registry.

If you are running windows and QGIS 2.x then QGIS settings are stored in registry under "HKEY_CURRENT_USER\SOFTWARE\QGIS\QGIS2".

In particular, you can enable/disable plugins by setting true/false for the variable with a plugin name under "...\QGIS2\PythonPlugins"

Here's the command to run in windows command prompt to "uncheck" autoTrace plugin:

REG ADD "HKEY_CURRENT_USER\SOFTWARE\QGIS\QGIS2\PythonPlugins" /v "autoTrace" /t REG_SZ /d false /f

You can also save it as a batch file and run it under the certain conditions.

More on editing windows registry