mirror of
https://github.com/kasmtech/workspaces-images.git
synced 2024-11-24 17:13:10 +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
|
set -ex
|
||||||
START_COMMAND="firefox"
|
START_COMMAND="firefox"
|
||||||
PGREP="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}
|
ARGS=${APP_ARGS:-$DEFAULT_ARGS}
|
||||||
|
|
||||||
options=$(getopt -o gau: -l go,assign,url: -n "$0" -- "$@") || exit
|
options=$(getopt -o gau: -l go,assign,url: -n "$0" -- "$@") || exit
|
||||||
@ -35,13 +38,14 @@ kasm_exec() {
|
|||||||
URL=$OPT_URL
|
URL=$OPT_URL
|
||||||
elif [ -n "$1" ] ; then
|
elif [ -n "$1" ] ; then
|
||||||
URL=$1
|
URL=$1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Since we are execing into a container that already has the browser running from startup,
|
# 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.
|
# 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
|
if [ -n "$URL" ] ; then
|
||||||
/usr/bin/filter_ready
|
/usr/bin/filter_ready
|
||||||
/usr/bin/desktop_ready
|
/usr/bin/desktop_ready
|
||||||
|
bash ${MAXIMIZE_SCRIPT} &
|
||||||
$START_COMMAND $ARGS $OPT_URL
|
$START_COMMAND $ARGS $OPT_URL
|
||||||
else
|
else
|
||||||
echo "No URL specified for exec command. Doing nothing."
|
echo "No URL specified for exec command. Doing nothing."
|
||||||
@ -55,7 +59,7 @@ kasm_startup() {
|
|||||||
URL=$LAUNCH_URL
|
URL=$LAUNCH_URL
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z "$DISABLE_CUSTOM_STARTUP" ] || [ -n "$FORCE" ] ; then
|
if [ -z "$DISABLE_CUSTOM_STARTUP" ] || [ -n "$FORCE" ] ; then
|
||||||
|
|
||||||
echo "Entering process startup loop"
|
echo "Entering process startup loop"
|
||||||
set +x
|
set +x
|
||||||
@ -66,17 +70,17 @@ kasm_startup() {
|
|||||||
/usr/bin/filter_ready
|
/usr/bin/filter_ready
|
||||||
/usr/bin/desktop_ready
|
/usr/bin/desktop_ready
|
||||||
set +e
|
set +e
|
||||||
|
bash ${MAXIMIZE_SCRIPT} &
|
||||||
$START_COMMAND $ARGS $URL
|
$START_COMMAND $ARGS $URL
|
||||||
set -e
|
set -e
|
||||||
fi
|
fi
|
||||||
sleep 1
|
sleep 1
|
||||||
done
|
done
|
||||||
set -x
|
set -x
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if [ -n "$GO" ] || [ -n "$ASSIGN" ] ; then
|
if [ -n "$GO" ] || [ -n "$ASSIGN" ] ; then
|
||||||
kasm_exec
|
kasm_exec
|
||||||
|
@ -68,7 +68,14 @@ else
|
|||||||
preferences_file=/usr/lib/firefox/browser/defaults/preferences/firefox.js
|
preferences_file=/usr/lib/firefox/browser/defaults/preferences/firefox.js
|
||||||
fi
|
fi
|
||||||
# Disabling default first run URL
|
# 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
|
if [[ "${DISTRO}" == @(centos|oracle7|oracle8|opensuse) ]]; then
|
||||||
# Creating a default profile
|
# Creating a default profile
|
||||||
|
Loading…
Reference in New Issue
Block a user