]>
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. | |
8 | # Also symlinks for nss/nspr libs can be found from our dir. | |
9 | export LD_LIBRARY_PATH=@libdir@${LD_LIBRARY_PATH:+:"$LD_LIBRARY_PATH"} | |
10 | ||
11 | # for to find xdg-settings | |
12 | export PATH=@libdir@${PATH:+:"$PATH"} | |
13 | ||
14 | # chromium needs /dev/shm being mounted | |
15 | m=$(awk '$2 == "/dev/shm" && $3 == "tmpfs" {print}' /proc/mounts) | |
16 | if [ -z "$m" ]; then | |
17 | cat >&2 <<-'EOF' | |
18 | Chromium needs /dev/shm being mounted for Shared Memory access. | |
19 | ||
20 | To do so, invoke (as root): | |
21 | mount -t tmpfs -o rw,nosuid,nodev,noexec none /dev/shm | |
22 | ||
23 | EOF | |
bd7a3039 | 24 | fi |
4edced9c ER |
25 | |
26 | # Set CHROME_VERSION_EXTRA visible in the About dialog and in about:version | |
27 | export CHROME_VERSION_EXTRA="PLD Linux" | |
28 | ||
aa6a00d6 ER |
29 | # Google Chrome has a number of command line switches which change the behavior of Chrome |
30 | # This param allows you to set extra args for browser startup. | |
31 | # See source for possible choices: | |
32 | # http://git.chromium.org/gitweb/?p=chromium.git;f=chrome/common/chrome_switches.cc;hb=HEAD | |
ddb60ff1 | 33 | # Also: http://peter.sh/experiments/chromium-command-line-switches/ |
aa6a00d6 ER |
34 | CHROME_FLAGS_FILE="${XDG_CONFIG_HOME:-$HOME/.config}/chromium/Chrome Flags" |
35 | if [ -f "$CHROME_FLAGS_FILE" ]; then | |
36 | # All lines starting with # are ignored | |
37 | CHROME_FLAGS=$(grep -v '^#' "$CHROME_FLAGS_FILE") | |
38 | fi | |
39 | ||
f0506bfd | 40 | exec @libdir@/chromium-browser --password-store=detect $CHROME_FLAGS "$@" |