CustomChromiumFlags is a sandbox setting in Sandboxie Ini available since v1.14.2 / 5.69.2. This setting allows you to pass additional command line flags to Chromium-based browsers when they are launched within the sandbox. Sandboxie automatically injects these flags into the browser's startup command line, enabling fine-tuned control over browser behavior for enhanced compatibility and functionality within the sandboxed environment.
[DefaultBox]
CustomChromiumFlags=--disable-features=PrintCompositorLPAC --disable-gpuCustomChromiumFlags=--disable-features=PrintCompositorLPAC [<flag 1> <flag 2> ...]When CustomChromiumFlags is configured, Sandboxie modifies the command line of applications identified as Chromium-based browsers during process initialization:
-
Browser Detection: The setting applies only to applications classified as Chrome through the
SpecialImageconfiguration or automatic detection1. -
Command Line Injection: During kernel initialization, Sandboxie intercepts the process parameters and reconstructs the command line by inserting the custom flags2 between the executable path and existing arguments3.
-
Child Process Filtering: The flags are only added to main browser processes, not to child processes that contain the
--type=parameter, preventing duplication and potential conflicts4.
Sandboxie includes a default value to ensure browser compatibility:
CustomChromiumFlags=--disable-features=PrintCompositorLPACThis default flag disables the Print Compositor LPAC (Low Privilege App Container) feature which can cause compatibility issues in sandboxed environments5.
-
Basic GPU Acceleration Disable:
CustomChromiumFlags=--disable-features=PrintCompositorLPAC --disable-gpu
-
Multiple Performance Flags:
CustomChromiumFlags=--disable-features=PrintCompositorLPAC --no-sandbox --disable-web-security
-
Debugging Options:
CustomChromiumFlags=--disable-features=PrintCompositorLPAC --enable-logging --log-level=0
- Browser Compatibility: The default
PrintCompositorLPACflag prevents printing-related crashes and ensures stable browser operation within sandboxes - Flag Validation: Users should carefully validate custom flags as some may compromise sandbox security or browser stability
- Automatic Application: The setting automatically applies to all applications defined as Chrome browsers, whether configured manually or detected automatically
The setting is processed during DLL initialization when Sandboxie detects a Chromium-based browser. The system:
- Queries the configuration using
SbieApi_QueryConfAsIswith the keyCustomChromiumFlags6 - Allocates additional memory for the expanded command line to accommodate the custom flags
- Reconstructs the command line by copying the executable path, inserting the custom flags, and appending remaining arguments7
- Hooks the
GetCommandLineWandGetCommandLineAfunctions to return the modified command line to the application
This setting works with all Chromium-based browsers, including:
- Google Chrome
- Microsoft Edge (Chromium)
- Brave Browser
- Opera
- Vivaldi
- Any other browser built on the Chromium engine
- SpecialImage - Used to classify applications as Chromium browsers
Related Sandboxie Plus setting: Not directly exposed in UI (uses default value automatically)
Footnotes
-
Browser detection in
dllmain.c: Applications are classified asDLL_IMAGE_GOOGLE_CHROMEthrough theSpecialImageconfiguration system, which maps browser executables to the Chrome image type for specialized handling. ↩ -
List of Chromium Command Line Switches -
https://peter.sh/experiments/chromium-command-line-switches/↩ -
Command line reconstruction in
kernel.c: The system callsSbieDll_FindArgumentEndto locate the boundary between the executable path and arguments, then allocates expanded memory and reconstructs the command line with injected flags. ↩ -
Child process filtering in
kernel.c: The condition!wcsstr(ProcessParms->CommandLine.Buffer, L" --type=")ensures that only main browser processes receive the custom flags, excluding renderer and utility processes. ↩ -
Default configuration in
Templates.ini: The default--disable-features=PrintCompositorLPACflag prevents Low Privilege App Container printing issues that can cause browser instability in sandboxed environments. ↩ -
Configuration query in
kernel.c:SbieApi_QueryConfAsIs(NULL, L"CustomChromiumFlags", 0, CustomChromiumFlags, ARRAYSIZE(CustomChromiumFlags))retrieves the setting value during kernel initialization. ↩ -
Command line modification in
kernel.c: The system copies the original executable path, appends the custom flags with proper spacing, and concatenates the remaining arguments to create the modified command line. ↩