hasufell-repository/packages/net-www/inox/files/inox-launcher.sh

37 lines
954 B
Bash
Raw Permalink Normal View History

#!/bin/bash
# Chromium launcher
# Authors: Fabien Tassin <fta@sofaraway.org>
# Source: Debian, Gentoo
# License: GPLv2 or later
2016-02-15 01:47:45 +00:00
if [ -f /etc/inox/default ] ; then
. /etc/inox/default
fi
# Prefer user defined CHROMIUM_USER_FLAGS (fron env) over system
# default CHROMIUM_FLAGS (from /etc/chromium/default)
CHROMIUM_FLAGS=${CHROMIUM_USER_FLAGS:-"$CHROMIUM_FLAGS"}
# For the Default Browser detection to work, we need to give access
# to xdg-settings. Also set CHROME_WRAPPER in case xdg-settings is
# not able to do anything useful
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
# Set the .desktop file name
2016-02-15 01:47:45 +00:00
export CHROME_DESKTOP=inox-browser.desktop
2016-02-15 01:47:45 +00:00
exec -a "inox-browser" "$PROGDIR/inox" --extra-plugin-dir=/opt/netscape/plugins $CHROMIUM_FLAGS "$@"