]>
Commit | Line | Data |
---|---|---|
bd7a3039 ER |
1 | #!/bin/sh |
2 | ||
4edced9c ER |
3 | # Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. |
4 | # Use of this source code is governed by a BSD-style license that can be | |
5 | # found in the LICENSE file. | |
6 | ||
7 | # Always use our ffmpeg libs. | |
4edced9c ER |
8 | export LD_LIBRARY_PATH=@libdir@${LD_LIBRARY_PATH:+:"$LD_LIBRARY_PATH"} |
9 | ||
10 | # for to find xdg-settings | |
11 | export PATH=@libdir@${PATH:+:"$PATH"} | |
12 | ||
13 | # chromium needs /dev/shm being mounted | |
14 | m=$(awk '$2 == "/dev/shm" && $3 == "tmpfs" {print}' /proc/mounts) | |
15 | if [ -z "$m" ]; then | |
16 | cat >&2 <<-'EOF' | |
17 | Chromium needs /dev/shm being mounted for Shared Memory access. | |
18 | ||
19 | To do so, invoke (as root): | |
20 | mount -t tmpfs -o rw,nosuid,nodev,noexec none /dev/shm | |
21 | ||
22 | EOF | |
bd7a3039 | 23 | fi |
4edced9c ER |
24 | |
25 | # Set CHROME_VERSION_EXTRA visible in the About dialog and in about:version | |
26 | export CHROME_VERSION_EXTRA="PLD Linux" | |
27 | ||
aa6a00d6 ER |
28 | # Google Chrome has a number of command line switches which change the behavior of Chrome |
29 | # This param allows you to set extra args for browser startup. | |
1693275a | 30 | # See: http://peter.sh/experiments/chromium-command-line-switches/ |
aa6a00d6 ER |
31 | CHROME_FLAGS_FILE="${XDG_CONFIG_HOME:-$HOME/.config}/chromium/Chrome Flags" |
32 | if [ -f "$CHROME_FLAGS_FILE" ]; then | |
33 | # All lines starting with # are ignored | |
34 | CHROME_FLAGS=$(grep -v '^#' "$CHROME_FLAGS_FILE") | |
35 | fi | |
36 | ||
1693275a | 37 | # Google guys cannot properly handle comma, so download speed/est is shown |
6a2c5f4d | 38 | # as not a number (NaN). Workaround that with LC_NUMERIC=C |
1693275a | 39 | export LC_NUMERIC=C |
6a2c5f4d | 40 | |
1693275a | 41 | exec @libdir@/chromium-browser $CHROME_FLAGS "$@" |