11

Is there a way use a configuration file, maybe .ini to load in the relevant settings for QGIS when it is setup, maybe to share with various people?

  • Plugins installed and plugin repositories filled in
  • Toolbars enabled and disabled
  • Arrangement of Toolbars on the QGIS screen
  • SVG path for certain styles populated, in QGIS Menu: Options, System

"Did you find a way to make QGIS export the existing user profile to the new location specified above? – SAnderka Mar 3 '14 at 13:44" (How can I centralize QGIS connections for multiple QGIS installations)

QGIS 3.2.2-1 this is resolved

Leaving following and not removing just so it is clear that these methods, at least for me don't work.

Tried following, no success QGIS 2.2, QGIS 2.14-15

1. Can export default settings by using Open OSGeo4W

Paste:

    qgis --optionspath "X:\mynat\qgis" --configpath "X:\mynat\qgis"

(How can I centralize QGIS connections for multiple QGIS installations)

I am not sure how to import the settings, it may export your "adjusted" settings, rather than the default settings for QGIS.

2. Use settings, customisation, to export .ini settings ?

Can't import the settings using: settings, customization

3. Load QSS Plugin, create a new QGIS theme

Doesn't work for what I need to do. I don't remember it being possible to export and import themes. (http://plugins.qgis.org/plugins/LoadQSS/)

EDIT Replaced the contents of the .qgis2 file on another computer

Ran and copied the exported QGIS file from OSGeo4W script.

    qgis --optionspath "X:\mynat\qgis" --configpath "X:\mynat\qgis"

(How can I centralize QGIS connections for multiple QGIS installations)

Saved folder on new computer. On new computer went to to C:\Users\USERNAME.qgis2

Removed the contents of the .qgis2 folder

Contents:

C:\Users\USERNAME.qgis2\Cache
C:\Users\USERNAME.qgis2\gdal_pam
C:\Users\USERNAME.qgis2\processing
C:\Users\USERNAME.qgis2\project_templates
qgis (Data Base File)

Pasted contents of exported QGIS file

Open QGIS, same settings as before.

There is no .ini file to replace...

There is a possible way to import files, in QGIS 2.2 go to: Menu bar, Settings then: Options, General

See Heading: Project Files

There is: Open Project on launch, a selection box with New, Most Recent, Specific, and path location...

There is a Template Folder and Browse buttons Template folder path: C:\Users\USERNAME.qgis2\project_templates

There are also buttons called: * Set current project as default * Reset default

EDIT - How to force qgis to read Settings from somewhere else

On computer with the settings you want to use: Ran and copied the exported QGIS file from OSGeo4W script.

    qgis --optionspath "X:\mynat\qgis" --configpath "X:\mynat\qgis"

(How can I centralize QGIS connections for multiple QGIS installations)

On new computer, run OSGeo4W and used something like:

    qgis --optionspath "C:\Users\USERNAME\QGIS" --configpath 
    "C:\Users\USERNAME\QGIS"

Copy and paste .ini file from computer with the settings you want into path on the "new computer"

    "C:\Users\USERNAME\QGIS"

Open QGIS, same settings as before.

Assuming I could just replace the .ini file?

I think I am exporting the "default" .ini file by mistake?

Further Test

I think the issue might be that I haven't installed the OS GEO4W correctly. Don't think that is the issue, as of: 28/11/2017

Though I have tried to install OS GE04W

"Note Don’t blindly do a full install of OSGeo4W.

Only install QGIS and maybe other components you like. Dependencies will be included automatically.

A full install pulls in components that require third party additions, which need to be installed manually. These components render the installation unusable without those additions."

Pasted from https://www.qgis.org/en/site/forusers/alldownloads.html

Test running OSGeo4W on Virtual Box, Windows 7 Enterprise

     start "QGIS" /B "%OSGEO4W_ROOT%"\bin\qgis-bin.exe --configpath "D:\cci93\config" %*

     Start "QGIS" /B "%OSGEO4W_ROOT%"\bin\qgis-bin.exe  --configpath "C:\Users\Dev\Documents\QGIS settings\QGIS\QGIS" %*

Popup errors

qgis-bin.exe - System Error The program can't start because qgis_core.dll is missing from your computer. Try reinstalling the program to fix this problem.

qgis-bin.exe - System Error The program can’t start because qgis_gui.dll is missing from your computer. Try reinstalling the program to fix this problem.

qgis-bin.exe - System Error The program can’t start because qgis_analysis.dll is missing from your computer. Try reinstalling the program to fix this problem.

Test 3-5

I have tried to export the "settings" for QGIS 2.14-15 long term release via OSGeo4W

The following code just dumps the "default" project settings into a folder, rather than my adjusted settings, adjusted project I have got locally. Where my adjusted project has more toolbars, rearranged toolbox, some installed plugins ect...

'qgis' is not recognized as an internal or external command, operable program or batch file.

So I have used qgis-ltr, qgis-ltr-bin instead.

This doesn't work:

    C:\>start qgis --optionspath "C:\Users\Name\Documents\Buffer Saves, To do\QGIS settings" --configpath "C:\Users\Name\Documents\Buffer Saves, To do\QGIS settings

or:

    C:\>qgis --optionspath "C:\Users\Name\Documents\Buffer Saves, To do\QGIS settings" --configpath "C:\Users\Name\Documents\Buffer Saves, To do\QGIS settings

This code does work*, but only exports the "default" settings:

Try 4

    start qgis-ltr --optionspath "C:\Users\Name\Documents\Buffer Saves, To do\QGIS settings" --configpath "C:\Users\Name\Documents\Buffer Saves, To do\QGIS settings

  Try 5

    qgis-ltr-bin --optionspath "C:\Users\Name\Documents\Buffer Saves, To do\QGIS settings" --configpath "C:\Users\Name\Documents\Buffer Saves, To do\QGIS settings

Further Information

"Here is a quick tip from a GIS.SE post that I answered the other day.

The topic was keeping the WMS settings in sync over different operating systems and machines. Normally QGIS will store it settings in the registry on Windows and in different locations on Linux and OS X. So then comes the question of how do you keep them in sync if you are using different machines.

Well the answer is simple. QGIS provides --optionspath and --configpath command line options in order to move the .qgis2 and settings files.

Using these two options, or just the one depending on what you need, will allow you to store the QGIS settings in a different location. Rather then storing the settings in the registry, or .config and .plist files, it will create a .ini file and save everything there.

All in all this means you can redirect your QGIS settings to a folder on dropbox and tell your QGIS installs to load the settings from a single place keeping everything in sync. When you change a setting it will sync with Dropbox and onto your other machines.

The simple way on Windows to add the --optionspath and --configpath options is to copy the shortcut to QGIS and append it to the end of the Target. 1 --optionspath "F:mydropboxqgis" --configpath "F:mydropboxqgis" Pasted from http://nathanw.net/2014/02/24/keeping-qgis-settings-in-sync-on-different-machines/

Existing Stackexchange Questions

How to change default path for ".qgis2" folder on Windows?

Where are QGIS application setting file(s) stored?

Transferring custom QGIS settings from one computer to another?

How can I centralize QGIS connections for multiple QGIS installations

What is OSGeo4W?

  • I use a custom folder to store all settings for a portable version of qgis with the --configpath option. This works great, what kind of problems did you had with this? – Andreas Müller Apr 6 '16 at 13:07
  • Thanks for the reply (redrafted) I am not sure how to import the exported config QGIS2.ini file into QGIS 2.2 on another computer. Where the QGIS2.ini file is from running this code in OSGeo4W Code: qgis --optionspath "C:\Users\....\Documents\..." --configpath "C:\Users\....\Documents\..." This exports a folder called: QGIS, at \QGIS\QGIS. I am not sure if this script just exports the "default settings" rather than the configuration for my current QGIS 2.2 on my local system. – maskin Apr 7 '16 at 10:03
  • As far as I know, you can't Import Settings, you just force qgis to read Settings from somewhere else. If you copy the regular user folder to another place and direct qgis with -configpath it will read and write from there. – Andreas Müller Apr 7 '16 at 15:16
  • @AndreasMüller Please could you explain how to force qgis to read settings from somewhere else? Or direct qgis with -configpath? I have tried copying the .qgis2 from computer to computer without success. – maskin Apr 8 '16 at 10:17
  • I think everything you need is there and as you described, you try the right things, but there must be something wrong. So please check: You should always use the bachfile qgis.bat to start the software. In the batchfile you can use start "QGIS" /B "%OSGEO4W_ROOT%"\bin\qgis-bin.exe --configpath "%HOME%\.qgis" %* – Andreas Müller Apr 8 '16 at 13:57
2

User Profile Management was added in QGIS v3.0.0. Some information may be found at the GitHub

User profile contains information about the user profile folders on the machine. In QGIS 3 all settings, plugins, etc were moved into a %APPDATA%/profiles folder for each platform. This allows for manage different user profiles per machine vs the single default one that was allowed in the past. A user profile is all settings and anything that used to be found in .qgis3 in the users home folder.

The management tools can be accessed from the Settings menu under User Profiles.

Functionally, this implementation acts in much the same way as the process described in this question and the comments. Loading a new user profile from the menu will open a new instance of QGIS using its associated profile folder.

Merely copying any profile folder to a target installation environment will achieve the migration of settings, but this does not address a "centralized" deployment.

  • Copying the profile order is now (QGIS 3) indeed nearly enough to copy all settings to another computer or to another profile. However, if your appdata-path (the path where the profile resides) has changed (e.g. because of different user names), you should change the path names in <profile name>/QGIS/qgis.ini accordingly. Otherwise you probably get error messages until you have changed e.g. the processing output path. @maskin: Going through the settings manually within the program takes much more time than just replacing user names in qgis.ini – Rudi Uhl Mar 7 at 12:06
1

@CrystallineEntity is correct, but more detail below on my Test

Can replace profile settings at least on 1 machine, and I assume others. Used following settings and these moved.

Setup QGIS with various settings, create New profile Settings, User Profiles, New Profile called Default 2
Make a copy of: C:\Users\username\AppData\Roaming\QGIS\QGIS3\profiles And the User Profile, i.e. Default 2

  1. Copying the whole profile folder you have modified and then deleting the default profile - WORKS

    On I assume "new" machine/Tested on existing machine with QGIS complete uninstalled
    Install QGIS, open QGIS, set to not import settings
    Go to: C:\Users\username\AppData\Roaming\QGIS\QGIS3\profiles Copy Default 2 the modified user profile
    Open QGIS, got to Settings, User Profiles, select Default 2 All the settings should be there on new profile with Default 2 in title.

    Then delete the standard profile,
    C:\Users\username\AppData\Roaming\QGIS\QGIS3\profiles\default

  2. Replace the whole profile folder - WORKS

    Setup QGIS with various settings, make a copy of: C:\Users\username\AppData\Roaming\QGIS\QGIS3\profiles

    On I assume "new" machine/Tested on existing machine with QGIS complete uninstalled
    Delete the \profiles folder, and replace it with the one you modified
    C:\Users\username\AppData\Roaming\QGIS\QGIS3\profiles

Settings
Make changes to Panels/Toolbars, i.e. add Advanced Digitizing Toolbar, remove Browser Panel.
Settings, Options, General, Application, Style (QGIS restart required), Set to Windows
Settings, Options, General, Application, Check QGIS version at startup unticked
Settings, Options, System, SVG Path Set to location on local machine
Settings, Options, Data Sources, Feature and Attributes and table, Representation for Null values: make the box blank, removed the NULL
Settings, Options, Digitizing: Rubberband, Fill Colour, opacity set to 0%

Project, Project Properties, CRS
Searched for the following EPSG numbers, press Apply, Then OK, then repeat for each one.

  • WGS 84, EPSG: 4326

  • OSGB 1936 / British National Grid, EPSG: 27700

  • WGS 84 / Pseudo Mercator, EPSG:3857

Data Source Manager, Vector, Encoding set to utf-8, browse for shp file, press ADD

Identify feature, need to make the Feature title smaller, and make the value box bigger

Plugins, Manage and Install Plugins, search and install MMQGIS
Plugins, Manage and Install Plugins, Installed, Tick MMQGIS and Topology Checker.
MMQGIS option on visible on Menu bar and Topology Checker button visible

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.