mirror of
https://github.com/kasmtech/workspaces-images.git
synced 2024-11-07 08:44:07 +01:00
KASM-3936 update firefox to use default maximize loop and strip out launch messages
This commit is contained in:
parent
02f255e4aa
commit
d57814169a
@ -2,7 +2,10 @@
|
||||
set -ex
|
||||
START_COMMAND="firefox"
|
||||
PGREP="firefox"
|
||||
DEFAULT_ARGS="-width ${VNC_RESOLUTION/x*/} -height ${VNC_RESOLUTION/*x/}"
|
||||
export MAXIMIZE="true"
|
||||
export MAXIMIZE_NAME="Mozilla Firefox"
|
||||
MAXIMIZE_SCRIPT=$STARTUPDIR/maximize_window.sh
|
||||
DEFAULT_ARGS=""
|
||||
ARGS=${APP_ARGS:-$DEFAULT_ARGS}
|
||||
|
||||
options=$(getopt -o gau: -l go,assign,url: -n "$0" -- "$@") || exit
|
||||
@ -35,13 +38,14 @@ kasm_exec() {
|
||||
URL=$OPT_URL
|
||||
elif [ -n "$1" ] ; then
|
||||
URL=$1
|
||||
fi
|
||||
|
||||
# Since we are execing into a container that already has the browser running from startup,
|
||||
# when we don't have a URL to open we want to do nothing. Otherwise a second browser instance would open.
|
||||
fi
|
||||
|
||||
# Since we are execing into a container that already has the browser running from startup,
|
||||
# when we don't have a URL to open we want to do nothing. Otherwise a second browser instance would open.
|
||||
if [ -n "$URL" ] ; then
|
||||
/usr/bin/filter_ready
|
||||
/usr/bin/desktop_ready
|
||||
bash ${MAXIMIZE_SCRIPT} &
|
||||
$START_COMMAND $ARGS $OPT_URL
|
||||
else
|
||||
echo "No URL specified for exec command. Doing nothing."
|
||||
@ -55,7 +59,7 @@ kasm_startup() {
|
||||
URL=$LAUNCH_URL
|
||||
fi
|
||||
|
||||
if [ -z "$DISABLE_CUSTOM_STARTUP" ] || [ -n "$FORCE" ] ; then
|
||||
if [ -z "$DISABLE_CUSTOM_STARTUP" ] || [ -n "$FORCE" ] ; then
|
||||
|
||||
echo "Entering process startup loop"
|
||||
set +x
|
||||
@ -66,17 +70,17 @@ kasm_startup() {
|
||||
/usr/bin/filter_ready
|
||||
/usr/bin/desktop_ready
|
||||
set +e
|
||||
bash ${MAXIMIZE_SCRIPT} &
|
||||
$START_COMMAND $ARGS $URL
|
||||
set -e
|
||||
fi
|
||||
sleep 1
|
||||
done
|
||||
set -x
|
||||
|
||||
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if [ -n "$GO" ] || [ -n "$ASSIGN" ] ; then
|
||||
kasm_exec
|
||||
|
@ -68,7 +68,14 @@ else
|
||||
preferences_file=/usr/lib/firefox/browser/defaults/preferences/firefox.js
|
||||
fi
|
||||
# Disabling default first run URL
|
||||
echo "pref(\"datareporting.policy.firstRunURL\", \"\");" >> "$preferences_file"
|
||||
cat >"$preferences_file" <<EOF
|
||||
pref("datareporting.policy.firstRunURL", "");
|
||||
pref("datareporting.policy.dataSubmissionEnabled", false);
|
||||
pref("datareporting.healthreport.service.enabled", false);
|
||||
pref("datareporting.healthreport.uploadEnabled", false);
|
||||
pref("trailhead.firstrun.branches", "nofirstrun-empty");
|
||||
pref("browser.aboutwelcome.enabled", false);
|
||||
EOF
|
||||
|
||||
if [[ "${DISTRO}" == @(centos|oracle7|oracle8|opensuse) ]]; then
|
||||
# Creating a default profile
|
||||
|
Loading…
Reference in New Issue
Block a user