Documentshow-to-add-custom-chromium-flags-on-raspberry-pi

How to Add Custom Chromium Flags on Raspberry Pi

Pass your own flags to Chromium through a customizations file that survives updates.

PiSignage already includes most of the Chrome customizations needed for signage. Some setups need extra flags, for example for language specific content. You can pass flags to Chromium when it shows a webpage or runs in kiosk mode by using the system wide customizations directory.

Which directory does your player use

OS release Customizations directory
Trixie, Bookworm (PiSignage 5.x) /etc/chromium.d/
Bullseye (PiSignage 3.3.0+) /etc/chromium-browser/customizations/
Buster /etc/chromium.d/

If you are not sure which directory exists on the player, run

ls -d /etc/chromium.d /etc/chromium-browser/customizations 2>/dev/null

For 5.x players, if /etc/chromium-browser does not exist, put the 01-pisignage file in /etc/chromium.d/.

Steps for PiSignage 5.x (Bookworm and Trixie)

Open a terminal on the Raspberry Pi, or SSH in. You can also use the terminal in Screens.

  1. Create the customizations file
    sudo nano /etc/chromium.d/01-pisignage
    
  2. Add your flags on a single line that begins with $CHROMIUM_FLAGS. Replace the example flag with your own, space separated, all inside the double quotes.
    CHROMIUM_FLAGS="$CHROMIUM_FLAGS --disable-features=MediaRouter"
    
    Do not leave out $CHROMIUM_FLAGS. A plain assignment would override the defaults that Raspberry Pi OS sets in its own files in this directory (hardware video decode and GPU options, for example) instead of adding to them.
  3. Press Ctrl+O to save and Ctrl+X to exit nano.
  4. Restart the player for the changes to apply
    sudo reboot
    

Steps for PiSignage 3.3.0+ on Bullseye

  1. Create the customizations file
    sudo nano /etc/chromium-browser/customizations/01-pisignage
    
  2. Add your flags. All flags go inside double quotes on a single CHROMIUM_FLAGS= line.
    CHROMIUM_FLAGS="--noerrdialogs --disable-features=MediaRouter"
    
  3. Press Ctrl+O to save and Ctrl+X to exit nano.
  4. Restart the PiSignage player service or reboot the Pi
    sudo reboot
    

Buster players should use /etc/chromium.d/ instead.

How it works

  1. The Chromium launcher script reads all files in the customizations directory before starting the browser.
  2. Any CHROMIUM_FLAGS variable defined there is added to the browser's command line arguments.
  3. It works regardless of which --user-data-dir is used.
  4. The file is preserved across system updates and Chromium package upgrades.

Tips

  1. Use a descriptive filename such as 01-pisignage so you know where the flags come from. The 01- prefix sets the load order when there are multiple files.
  2. To temporarily disable your flags without deleting them, rename the file. Rename it back to re-enable.
    sudo mv /etc/chromium-browser/customizations/01-pisignage /etc/chromium-browser/customizations/01-pisignage.disabled
    
    On 5.x players use the same command with the /etc/chromium.d/ path.

Need help

If you are not sure which flags to use, write to support@pisignage.com. Support covers what to include.