3 # Allow the user to override command-line flags, http://bugs.gentoo.org/357629
4 # This is based on Debian's chromium-browser package, and is intended
5 # to be consistent with Debian.
6 if [ -f /etc/chromium-browser/default ] ; then
7 . /etc/chromium-browser/default
10 # Always use our ffmpeg libs.
12 export LD_LIBRARY_PATH=$CHROMIUM_DIR${LD_LIBRARY_PATH:+:"$LD_LIBRARY_PATH"}
14 # for to find xdg-settings
15 export PATH=@libdir@${PATH:+:"$PATH"}
17 # chromium needs /dev/shm being mounted
18 m=$(awk '$2 == "/dev/shm" && $3 == "tmpfs" {print}' /proc/mounts)
21 Chromium needs /dev/shm being mounted for Shared Memory access.
23 To do so, invoke (as root):
24 mount -t tmpfs -o rw,nosuid,nodev,noexec none /dev/shm
29 # Set CHROME_VERSION_EXTRA visible in the About dialog and in about:version
30 export CHROME_VERSION_EXTRA="PLD Linux"
32 # Let the wrapped binary know that it has been run through the wrapper
33 export CHROME_WRAPPER="$(readlink -f "$0")"
35 # Google Chrome has a number of command line switches which change the behavior of Chrome
36 # This param allows you to set extra args for browser startup.
37 # See: http://peter.sh/experiments/chromium-command-line-switches/
38 CHROME_FLAGS_FILE="${XDG_CONFIG_HOME:-$HOME/.config}/chromium/Chrome Flags"
39 if [ -f "$CHROME_FLAGS_FILE" ]; then
40 # All lines starting with # are ignored
41 CHROMIUM_USER_FLAGS=$(grep -v '^#' "$CHROME_FLAGS_FILE")
44 # Prefer user defined CHROMIUM_USER_FLAGS (from env) over system
45 # default CHROMIUM_FLAGS (from /etc/chromium-browser/default).
46 CHROMIUM_FLAGS=${CHROMIUM_USER_FLAGS:-"$CHROMIUM_FLAGS"}
48 # Google guys cannot properly handle comma, so download speed/est is shown
49 # as not a number (NaN). Workaround that with LC_NUMERIC=C
52 # load PepperFlash if present
53 PEPFLASH=$(readlink -f $CHROMIUM_DIR/../browser-plugins/PepperFlash)
54 if [ -f $PEPFLASH/manifest.ver ]; then
55 . $PEPFLASH/manifest.ver
56 PEPPERFLASH_ARGS="--ppapi-flash-path=$PEPFLASH/libpepflashplayer.so --ppapi-flash-version=$version"
59 exec $CHROMIUM_DIR/chromium-browser $PEPPERFLASH_ARGS $CHROMIUM_FLAGS "$@"