mirror of
https://github.com/SchildiChat/element-web.git
synced 2024-10-01 01:26:12 -04:00
Merge pull request #9408 from pacien/custom-profiledir
Add support for custom profile directory
This commit is contained in:
commit
b3bee52ad1
@ -250,6 +250,8 @@ Desktop app configuration
|
|||||||
|
|
||||||
To run multiple instances of the desktop app for different accounts, you can launch the executable with the `--profile` argument followed by a unique identifier, e.g `riot-web --profile Work` for it to run a separate profile and not interfere with the default one.
|
To run multiple instances of the desktop app for different accounts, you can launch the executable with the `--profile` argument followed by a unique identifier, e.g `riot-web --profile Work` for it to run a separate profile and not interfere with the default one.
|
||||||
|
|
||||||
|
Alternatively, a custom location for the profile data can be specified using the `--profile-dir` flag followed by the desired path.
|
||||||
|
|
||||||
To change the config.json for the desktop app, create a config file which will be used to override values in the config which ships in the package:
|
To change the config.json for the desktop app, create a config file which will be used to override values in the config which ships in the package:
|
||||||
+ `%APPDATA%\$NAME\config.json` on Windows
|
+ `%APPDATA%\$NAME\config.json` on Windows
|
||||||
+ `$XDG_CONFIG_HOME\$NAME\config.json` or `~/.config/$NAME/config.json` on Linux
|
+ `$XDG_CONFIG_HOME\$NAME\config.json` or `~/.config/$NAME/config.json` on Linux
|
||||||
|
@ -42,7 +42,9 @@ const Store = require('electron-store');
|
|||||||
// migrating to mitigate any risk of it being used maliciously.
|
// migrating to mitigate any risk of it being used maliciously.
|
||||||
let migratingOrigin = false;
|
let migratingOrigin = false;
|
||||||
|
|
||||||
if (argv['profile']) {
|
if (argv['profile-dir']) {
|
||||||
|
app.setPath('userData', argv['profile-dir']);
|
||||||
|
} else if (argv['profile']) {
|
||||||
app.setPath('userData', `${app.getPath('userData')}-${argv['profile']}`);
|
app.setPath('userData', `${app.getPath('userData')}-${argv['profile']}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user