Merge branch 'bugfix/KASM-7016-dark-google-chrome-theme' into 'develop'

Resolve KASM-7016 "Bugfix/ dark google chrome theme"

Closes KASM-7016

See merge request kasm-technologies/internal/workspaces-images!247
This commit is contained in:
Matthew McClaskey 2025-03-21 12:20:19 +00:00
commit f1ce1179ae
2 changed files with 4 additions and 4 deletions

View File

@ -1,14 +1,14 @@
#!/usr/bin/env bash #!/usr/bin/env bash
set -ex set -ex
CHROME_ARGS="--password-store=basic --no-sandbox --ignore-gpu-blocklist --user-data-dir --no-first-run --disable-search-engine-choice-screen --simulate-outdated-no-au='Tue, 31 Dec 2099 23:59:59 GMT'" CHROME_ARGS="--password-store=basic --no-sandbox --ignore-gpu-blocklist --user-data-dir --no-first-run --disable-search-engine-choice-screen --simulate-outdated-no-au='Tue, 31 Dec 2099 23:59:59 GMT' --enable-features=WebContentsForceDark"
CHROME_VERSION=$1 CHROME_VERSION=$1
ARCH=$(arch | sed 's/aarch64/arm64/g' | sed 's/x86_64/amd64/g') ARCH=$(arch | sed 's/aarch64/arm64/g' | sed 's/x86_64/amd64/g')
if [ "$ARCH" == "arm64" ] ; then if [ "$ARCH" == "arm64" ] ; then
echo "Chrome not supported on arm64, skipping Chrome installation" echo "Chrome not supported on arm64, skipping Chrome installation"
exit 0 exit 0
fi fi
if [[ "${DISTRO}" == @(centos|oracle8|rockylinux9|rockylinux8|oracle9|rhel9|almalinux9|almalinux8) ]]; then if [[ "${DISTRO}" == @(centos|oracle8|rockylinux9|rockylinux8|oracle9|rhel9|almalinux9|almalinux8) ]]; then
if [ ! -z "${CHROME_VERSION}" ]; then if [ ! -z "${CHROME_VERSION}" ]; then
@ -70,7 +70,7 @@ sed -i 's/"exited_cleanly":false/"exited_cleanly":true/' ~/.config/google-chrome
sed -i 's/"exit_type":"Crashed"/"exit_type":"None"/' ~/.config/google-chrome/Default/Preferences sed -i 's/"exit_type":"Crashed"/"exit_type":"None"/' ~/.config/google-chrome/Default/Preferences
if [ -f /opt/VirtualGL/bin/vglrun ] && [ ! -z "\${KASM_EGL_CARD}" ] && [ ! -z "\${KASM_RENDERD}" ] && [ -O "\${KASM_RENDERD}" ] && [ -O "\${KASM_EGL_CARD}" ] ; then if [ -f /opt/VirtualGL/bin/vglrun ] && [ ! -z "\${KASM_EGL_CARD}" ] && [ ! -z "\${KASM_RENDERD}" ] && [ -O "\${KASM_RENDERD}" ] && [ -O "\${KASM_EGL_CARD}" ] ; then
echo "Starting Chrome with GPU Acceleration on EGL device \${KASM_EGL_CARD}" echo "Starting Chrome with GPU Acceleration on EGL device \${KASM_EGL_CARD}"
vglrun -d "\${KASM_EGL_CARD}" /opt/google/chrome/google-chrome ${CHROME_ARGS} "\$@" vglrun -d "\${KASM_EGL_CARD}" /opt/google/chrome/google-chrome ${CHROME_ARGS} "\$@"
else else
echo "Starting Chrome" echo "Starting Chrome"
/opt/google/chrome/google-chrome ${CHROME_ARGS} "\$@" /opt/google/chrome/google-chrome ${CHROME_ARGS} "\$@"

View File

@ -8,7 +8,7 @@ if [ "${ARCH}" == "arm64" ] ; then
fi fi
# This might prove fragile depending on how often slack changes it's website. # This might prove fragile depending on how often slack changes it's website.
version=$(curl -q https://slack.com/downloads/linux | grep page-downloads__hero__meta-text__version | sed 's/.*Version //g' | cut -d "<" -f1 | head -1) version=$(wget -O- https://slack.com/downloads/linux | grep page-downloads__hero__meta-text__version | sed 's/.*Version //g' | cut -d "<" -f1 | head -1)
echo Detected slack version $version echo Detected slack version $version