From 4edced9c9065013896a5d9b3dbf341d64e7ef98a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Elan=20Ruusam=C3=A4e?= Date: Tue, 2 Feb 2010 11:04:35 +0000 Subject: [PATCH] - update from chromium-browser-bin Changed files: chromium-browser.sh -> 1.3 --- chromium-browser.sh | 83 ++++++++++++++------------------------------- 1 file changed, 26 insertions(+), 57 deletions(-) diff --git a/chromium-browser.sh b/chromium-browser.sh index c5ad329..645a1f5 100644 --- a/chromium-browser.sh +++ b/chromium-browser.sh @@ -1,60 +1,29 @@ #!/bin/sh -# Chromium launcher - -# Authors: -# Fabien Tassin -# License: GPLv2 or later - -APPNAME=chromium-browser -LIBDIR=/usr/lib/chromium-browser -GDB=/usr/bin/gdb - -usage () { - echo "$APPNAME [-h|--help] [-g|--debug] [options] [URL]" - echo - echo " -g or --debug Start within $GDB" - echo " -h or --help This help screen" -} - -# FFmpeg needs to know where its libs are located -if [ "Z$LD_LIBRARY_PATH" != Z ] ; then - LD_LIBRARY_PATH=$LIBDIR:$LD_LIBRARY_PATH -else - LD_LIBRARY_PATH=$LIBDIR -fi -export LD_LIBRARY_PATH - -want_debug=0 -while [ $# -gt 0 ]; do - case "$1" in - -h | --help | -help ) - usage - exit 0 ;; - -g | --debug ) - want_debug=1 - shift ;; - -- ) # Stop option prcessing - shift - break ;; - * ) - break ;; - esac -done - -if [ $want_debug -eq 1 ] ; then - if [ ! -x $GDB ] ; then - echo "Sorry, can't find usable $GDB. Please install it." - exit 1 - fi - tmpfile=`mktemp /tmp/chromiumargs.XXXXXX` || { echo "Cannot create temporary file" >&2; exit 1; } - trap " [ -f \"$tmpfile\" ] && /bin/rm -f -- \"$tmpfile\"" 0 1 2 3 13 15 - echo "set args ${1+"$@"}" > $tmpfile - echo "# Env:" - echo "# LD_LIBRARY_PATH=$LD_LIBRARY_PATH" - echo "$GDB $LIBDIR/$APPNAME -x $tmpfile" - $GDB "$LIBDIR/$APPNAME" -x $tmpfile - exit $? -else - exec $LIBDIR/$APPNAME "$@" +# Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +# Always use our ffmpeg libs. +# Also symlinks for nss/nspr libs can be found from our dir. +export LD_LIBRARY_PATH=@libdir@${LD_LIBRARY_PATH:+:"$LD_LIBRARY_PATH"} + +# for to find xdg-settings +export PATH=@libdir@${PATH:+:"$PATH"} + +# chromium needs /dev/shm being mounted +m=$(awk '$2 == "/dev/shm" && $3 == "tmpfs" {print}' /proc/mounts) +if [ -z "$m" ]; then + cat >&2 <<-'EOF' + Chromium needs /dev/shm being mounted for Shared Memory access. + + To do so, invoke (as root): + mount -t tmpfs -o rw,nosuid,nodev,noexec none /dev/shm + + EOF fi + +# Set CHROME_VERSION_EXTRA visible in the About dialog and in about:version +export CHROME_VERSION_EXTRA="PLD Linux" + +exec @libdir@/chromium-browser "$@" -- 2.44.0