#!/bin/bash # # Copyright (c) 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. # Let the wrapped binary know that it has been run through the wrapper export CHROME_WRAPPER="`readlink -f "$0"`" PROGDIR="`dirname "$CHROME_WRAPPER"`" case ":$PATH:" in *:$PROGDIR:*) # $PATH already contains $PROGDIR ;; *) # Append $PROGDIR to $PATH export PATH="$PATH:$PROGDIR" ;; esac # Always use our versions of ffmpeg libs. # This also makes RPMs find the compatibly-named library symlinks. case ":$LD_LIBRARY_PATH:" in *:$PROGDIR:*) # $LD_LIBRARY_PATH already contains $PROGDIR ;; *) # Append $PROGDIR to $LD_LIBRARY_PATH export LD_LIBRARY_PATH="$PROGDIR${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}" ;; esac # Mageia addition: if [ "$XDG_SESSION_TYPE" == "wayland" ] || [[ $WAYLAND_DISPLAY ]] ; then EXTRA_FLAGS="--use-gl=egl" fi EXTRA_ARGS="--disable-features=AudioServiceOutOfProcess \ --no-default-browser-check \ --enable-gpu-rasterization \ --enable-features=VaapiVideoDecoder,VaapiVideoEncoder @@EXTRA_FLAGS@@" USER_ARGS_FILE=$HOME/.config/chromium/args.txt if [ -f "$USER_ARGS_FILE" ]; then EXTRA_ARGS+=$(grep -v '^#' "$USER_ARGS_FILE") fi export CHROME_VERSION_EXTRA="stable" # We don't want bug-buddy intercepting our crashes. http://crbug.com/24120 export GNOME_DISABLE_CRASH_DIALOG=SET_BY_GOOGLE_CHROME # Sanitize std{in,out,err} because they'll be shared with untrusted child # processes (http://crbug.com/376567). exec < /dev/null exec > >(exec cat) exec 2> >(exec cat >&2) exec -a "$0" "$PROGDIR/chrome" $EXTRA_ARGS "$@"