Google Chrome and Chromium share much of their underlying architecture, but configuration paths and methods differ between the two. While Chromium on Linux systems often uses /etc/chromium/chromium.conf
for system-wide startup options, Google Chrome does not use this file. Instead, Chrome relies on alternative mechanisms for setting flags and launch parameters. Adjusting these options can control browser behavior, set environment variables, or pass custom arguments to Chrome at startup.
Modify Chrome Startup Flags Using /etc/opt/chrome/default
Step 1: Open a terminal window with root or sudo privileges. This is necessary because you will be editing files in system directories.
Step 2: Navigate to the directory /etc/opt/chrome/
. If the directory does not exist, you may need to create it:
sudo mkdir -p /etc/opt/chrome/
Step 3: Create or edit the default
file in this directory. This file allows you to specify extra flags for Chrome’s startup. Open it using a text editor such as nano:
sudo nano /etc/opt/chrome/default
Step 4: Add a line beginning with CHROME_FLAGS=
followed by the desired command-line options. For example, to disable the sandbox and enable remote debugging, you would enter:
CHROME_FLAGS="--no-sandbox --remote-debugging-port=9222"
Step 5: Save and close the file. Chrome will now read these flags on launch, applying your custom settings system-wide for all users.
Step 6: Restart Chrome for the changes to take effect. Any user who launches Chrome from the default system path will inherit these options automatically.
Set Chrome Flags with Desktop Entry Modification
Step 1: Locate the Chrome desktop entry file, usually found at /usr/share/applications/google-chrome.desktop
or ~/.local/share/applications/google-chrome.desktop
for user-specific installations.
Step 2: Open the desktop entry file with a text editor. You may need root privileges for system-wide entries:
sudo nano /usr/share/applications/google-chrome.desktop
Step 3: Find the line starting with Exec=
. This line defines how Chrome launches. To add flags, append them to the command. For example:
Exec=/usr/bin/google-chrome-stable %U --disable-gpu --incognito
Step 4: Save the file and exit. When Chrome is started via this desktop entry (such as from a menu or shortcut), it will use your specified flags.
Pass Flags Directly from the Command Line
Step 1: Open a terminal window.
Step 2: Launch Chrome with desired flags by typing:
google-chrome-stable --disable-gpu --incognito
This method applies only to the current launch and does not persist across sessions or for other users.
Using these approaches, you can control Chrome’s startup behavior similarly to how /etc/chromium/chromium.conf
works for Chromium. System administrators may prefer the /etc/opt/chrome/default
method for persistent, system-wide configuration, while individual users might find desktop entry or command-line methods more convenient for temporary or user-specific changes.
With these configuration paths and methods, you can reliably set Chrome startup options to match your system or user requirements. If you need to revert changes, simply edit or remove the added flags from the relevant files.
Member discussion