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 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
@ -42,6 +45,7 @@ kasm_exec() {
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."
@ -66,6 +70,7 @@ 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
@ -77,7 +82,6 @@ kasm_startup() {
} }
if [ -n "$GO" ] || [ -n "$ASSIGN" ] ; then if [ -n "$GO" ] || [ -n "$ASSIGN" ] ; then
kasm_exec kasm_exec
else else

View File

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