Updated 2.1 Multiple Profiles (markdown)

Thorin-Oakenpants 2017-03-27 07:49:24 +13:00
parent b75f83580b
commit 5924edf3f6

@ -18,12 +18,18 @@ In this example, a profile called `ghacks test` was created in the default `\App
![](https://github.com/ghacksuserjs/ghacks-user.js/blob/master/wikipiki/profiles02.png) ![](https://github.com/ghacksuserjs/ghacks-user.js/blob/master/wikipiki/profiles02.png)
Firefox only wants you to use a single profile at once. However, you can use concurrent profiles if you like.
To do this, youll just need to launch Firefox with the `-no-remote` switch. You could do this from the Run dialog or terminal, or just modify an existing Firefox shortcut. For example, if you created the Profile Manager shortcut above, you could just add `-no-remote` so that it reads `-p -no-remote` at the end of the Target box.
Here is a [Mozilla Support](https://support.mozilla.org/t5/Install-and-Update/Use-the-Profile-Manager-to-create-and-remove-Firefox-profiles/ta-p/2914) page with lots of pictures. Here is a [Mozilla Support](https://support.mozilla.org/t5/Install-and-Update/Use-the-Profile-Manager-to-create-and-remove-Firefox-profiles/ta-p/2914) page with lots of pictures.
### Firefox [Portable] ### Firefox [Portable] Method 1
You can't use the Profile Manager or controls in `about:profiles` with Firefox Portable. You can't use the Profile Manager or controls in `about:profiles` with Firefox Portable.
### Firefox [Portable] Method 2
Here is a typical Firefox Portable profile layout Here is a typical Firefox Portable profile layout
``` ```
-FirefoxPortable -FirefoxPortable
@ -31,11 +37,10 @@ Here is a typical Firefox Portable profile layout
-Data -Data
-plugins -plugins
-profile -profile
-settings -settings\FirefoxPortableSettings.ini
FirefoxPortableSettings.ini
-Other -Other
FirefoxPortable.exe FirefoxPortable.exe
FirefoxPortable.ini FirefoxPortable.ini
``` ```
Here is a multiple profile layout Here is a multiple profile layout
@ -46,38 +51,67 @@ Here is a multiple profile layout
-default -default
-plugins -plugins
-profile -profile
-settings -settings\FirefoxPortableSettings.ini
FirefoxPortableSettings.ini
-hardened -hardened
-plugins -plugins
-profile -profile
-settings -settings\FirefoxPortableSettings.ini
FirefoxPortableSettings.ini
-relaxed -relaxed
-plugins -plugins
-profile -profile
-settings -settings\FirefoxPortableSettings.ini
FirefoxPortableSettings.ini
-Other -Other
FirefoxPortable.exe Firefox.bat
FirefoxPortable.ini FirefoxPortable.exe
FirefoxPortableDefault.ini FirefoxPortable.ini
FirefoxPortableHardened.ini FirefoxPortableDefault.ini
FirefoxPortableRelaxed.ini FirefoxPortableHardened.ini
FirefoxPortableRelaxed.ini
``` ```
Where for each FirefoxPortableSettings.ini you need to specify the profile folder: eg here is the `relaxed` one For each `settings\FirefoxPortableSettings.ini` you will need to modify the `LastProfileDirectory` value. Note that the path is not relative, and this breaks the portability factor. Here is the `relaxed` one
``` ```ini
[FirefoxPortableSettings] [FirefoxPortableSettings]
LastProfileDirectory=D:\Portable\FirefoxPortable\Data\relaxed\profile LastProfileDirectory=D:\Portable\FirefoxPortable\Data\relaxed\profile
SubmitCrashReport=0 SubmitCrashReport=0
``` ```
and for each ini in the root folder you need to add the following directories: eg here is the `relaxed` one Also, for each ini in the root directory you will need to add the following lines. Note that `AllowMultipleInstances` when true allows you to run concurrent profiles. Here is the `relaxed` one
``` ```ini
AllowMultipleInstances=true
ProfileDirectory=Data\relaxed\profile ProfileDirectory=Data\relaxed\profile
SettingsDirectory=Data\relaxed\settings SettingsDirectory=Data\relaxed\settings
``` ```
To launch a profile, you use a bat file to replace `FirefoxPortable.ini` with the profile one of your choice. More to come
To launch any profile, you run a bat file located in the root directory, which replaces `FirefoxPortable.ini` with the profile one of your choice and then runs FirefoxPortable.exe
```batch
@echo off
echo Which profile:
echo 1 (default)
echo 2 (hardened)
echo 3 (relaxed)
set /p Input=
if /i "%Input%"=="1" (goto Profile1)
if /i "%Input%"=="2" (goto Profile2)
if /i "%Input%"=="3" (goto Profile3)
REM if /i not "%Input%"=="y" (exit /b)
exit /b
:Profile1
copy /Y FirefoxPortableDefault.ini FirefoxPortable.ini
FirefoxPortable
exit /b
:Profile2
copy /Y FirefoxPortableHardened.ini FirefoxPortable.ini
FirefoxPortable
exit /b
:Profile3
copy /Y FirefoxPortableRelaxed.ini FirefoxPortable.ini
FirefoxPortable
exit /b
```