Preconfiguration of Desktop Apps

The desktop client will look for a graperc.json file at startup. If there is one, it will be used. Settings which user was able to set up in the app will be disabled in favour of the preconfigured settings.

Location of graperc.json

Apps on any platform will look for the graperc.json file. Default points to this file are:

  • C:\Users<Username>\AppData\Roaming\Grape on Windows for both setup (for the current user and for all users). graperc.json is specific to each user.

  • $XDG_CONFIG_HOME or ~/.config on Linux.

  • ~/Library/Application Support on macOS.

Structure of graperc.json

Content of graperc.json should be in JSON format and follow this structure:

{
	"name": "production",
	"host": {
		"cloudProtocol": "https:",
		"cloudDomain": "chatgrape.com",
		"path": "chat",
		"onPremisesProtocol": "https:",
		"onPremisesDomain": "uebergrape.chatgrape.com"
	},
	"allowPrerelease": false,
	"autoUpdateEnabled": true,
	"currentDomainType": "onPremises",
	"lastUrl": "https://uebergrape.chatgrape.com/chat/channel/1/office"
}

Configurable options

  • onPremisesDomain - specifies the domain that the app should connect to when using on-premise setup. Use the organization subdomain. Do not add “https://”.

  • allowPrerelease - boolean value, which specifies if the user wants to get updates from GitHub pre-releases, which are usually beta’s releases.

  • autoUpdateEnabled - boolean value, with which you can enable/disable the auto-update feature.

  • currentDomainType - type of current environment used. Will affect the selected tab in “Choose domain” page.

  • lastUrl - URL to open at startup. After the user will close the app, the last visited URL will rewrite this field automatically.