Merge branch 'feature/KASM-3936-firefox-updates' into 'develop'

KASM-3936 update firefox to use default maximize loop and strip out launch messages

See merge request kasm-technologies/internal/workspaces-images!100
This commit is contained in:
Justin Travis 2023-01-25 16:54:14 +00:00
commit 1ba3908f23
2 changed files with 21 additions and 10 deletions

View File

@ -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
@ -42,6 +45,7 @@ kasm_exec() {
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,6 +70,7 @@ kasm_startup() {
/usr/bin/filter_ready
/usr/bin/desktop_ready
set +e
bash ${MAXIMIZE_SCRIPT} &
$START_COMMAND $ARGS $URL
set -e
fi
@ -77,7 +82,6 @@ kasm_startup() {
}
if [ -n "$GO" ] || [ -n "$ASSIGN" ] ; then
kasm_exec
else

View File

@ -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