Ubuntu 18.04 allows the system wide definition of command line options that are passed to the Chromium browser provided by the package chromium-browser. The flags are set in the file /etc/chromium-browser/default. Example file content:

# Default settings for chromium-browser. This file is sourced by /bin/sh from
# /usr/bin/chromium-browser

# Options to pass to chromium-browser

Where can I set the command line options for the snap version (installed using sudo snap install chromium ) of the Chromium browser?


1 Answer 1


In the snap version you can set CHROMIUM_FLAGS inside ~/.chromium-browser.init with the same content as /etc/chromium-browser/default

For example


Source: https://bugs.launchpad.net/ubuntu/+source/chromium-browser/+bug/1837746


In addition to the flags, snap application doesn't have access to /dev/shm. Please use one of the following solutions:

  • Install chromium in dev mode snap install chromium --devmode to disable confinement
  • Use /dev/shm/snap.chromium instead of /dev/shm in your flag
  • Thank you for your answer. :) I copied the old configuration file to the location but unfortunately my specified flag is not set.
    – Marcello90
    Commented Mar 5, 2020 at 21:45
  • I'm pretty sure that you have another problem, chromium snap are not allowed to write to /dev/shm as seen by the log Failed to create directory: /dev/shm/Default/Code Cache/js when running with your flags
    – jrandiny
    Commented Mar 6, 2020 at 2:25
  • I have been successful in running chromium with your flag by installing it in devmode (disable confinement) snap install chromium --devmode
    – jrandiny
    Commented Mar 6, 2020 at 2:33
  • Or you can create /dev/shm/snap.chromium which the snap have access to. mkdir /dev/shm/snap.chromium and set CHROMIUM_FLAGS="--disk-cache-dir=/dev/shm/snap.chromium"
    – jrandiny
    Commented Mar 6, 2020 at 2:37

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .