From 38211d207c9ad77d6fa14872272bdf40b0b6a6b8 Mon Sep 17 00:00:00 2001 From: Richard Koliser Date: Tue, 22 Mar 2022 20:26:38 +0000 Subject: [PATCH] KASM-2193 Updating images to support Ubuntu 20.04 --- .gitlab-ci.yml | 293 +++++++++++++++++- dockerfile-kasm-brave | 4 +- dockerfile-kasm-centos-7-desktop | 3 +- dockerfile-kasm-chrome | 4 +- dockerfile-kasm-chrome-flash | 6 +- dockerfile-kasm-chromium | 4 +- dockerfile-kasm-desktop | 4 +- dockerfile-kasm-desktop-deluxe | 6 +- dockerfile-kasm-discord | 4 +- dockerfile-kasm-doom | 4 +- dockerfile-kasm-edge | 4 +- dockerfile-kasm-firefox | 4 +- dockerfile-kasm-firefox-flash | 6 +- dockerfile-kasm-firefox-mobile | 4 +- dockerfile-kasm-gimp | 4 +- dockerfile-kasm-hunchly | 6 +- dockerfile-kasm-insomnia | 4 +- dockerfile-kasm-java-dev | 6 +- dockerfile-kasm-maltego | 11 +- dockerfile-kasm-only-office | 4 +- dockerfile-kasm-postman | 4 +- dockerfile-kasm-rdesktop | 4 +- dockerfile-kasm-remmina | 4 +- dockerfile-kasm-signal | 4 +- dockerfile-kasm-slack | 4 +- dockerfile-kasm-steam | 4 +- dockerfile-kasm-sublime-text | 4 +- dockerfile-kasm-teams | 4 +- dockerfile-kasm-telegram | 4 +- dockerfile-kasm-terminal | 4 +- dockerfile-kasm-tor-browser | 8 +- dockerfile-kasm-tracelabs | 3 +- ...op => dockerfile-kasm-ubuntu-focal-desktop | 6 +- ...-dind => dockerfile-kasm-ubuntu-focal-dind | 6 +- ...dockerfile-kasm-ubuntu-focal-dind-rootless | 6 +- dockerfile-kasm-vlc | 4 +- dockerfile-kasm-vmware-horizon | 4 +- dockerfile-kasm-vs-code | 4 +- dockerfile-kasm-zoom | 4 +- dockerfile-kasm-zsnes | 4 +- docs/ubuntu-bionic-desktop/README.md | 7 - docs/ubuntu-focal-desktop/README.md | 7 + .../description.txt | 0 .../README.md | 0 .../description.txt | 0 .../README.md | 0 .../description.txt | 0 src/ubuntu/install/brave/custom_startup.sh | 12 +- src/ubuntu/install/chrome/custom_startup.sh | 12 +- .../install/chrome_flash/install_flash.sh | 2 +- src/ubuntu/install/chromium/custom_startup.sh | 14 +- .../install/chromium/install_chromium.sh | 42 ++- src/ubuntu/install/dind/custom_startup.sh | 27 +- .../install/dind_rootless/custom_startup.sh | 25 +- src/ubuntu/install/discord/custom_startup.sh | 11 +- src/ubuntu/install/discord/install_discord.sh | 5 +- src/ubuntu/install/doom/custom_startup.sh | 9 +- src/ubuntu/install/edge/custom_startup.sh | 12 +- src/ubuntu/install/firefox/install_firefox.sh | 15 +- .../install/firefox_flash/install_flash.sh | 2 +- src/ubuntu/install/gimp/custom_startup.sh | 10 +- src/ubuntu/install/gimp/install_gimp.sh | 6 +- src/ubuntu/install/horizon/custom_startup.sh | 13 +- .../install/horizon/install_horizons.sh | 2 +- src/ubuntu/install/insomnia/custom_startup.sh | 10 +- .../install/insomnia/install_insomnia.sh | 5 +- src/ubuntu/install/keeper/install_keeper.sh | 2 +- src/ubuntu/install/maltego/custom_startup.sh | 9 +- src/ubuntu/install/mobile/configure_mobile.sh | 2 +- .../install/only_office/custom_startup.sh | 10 +- .../only_office/install_only_office.sh | 7 +- src/ubuntu/install/postman/custom_startup.sh | 10 +- src/ubuntu/install/postman/install_postman.sh | 8 +- src/ubuntu/install/rdesktop/custom_startup.sh | 9 +- src/ubuntu/install/remmina/custom_startup.sh | 9 +- src/ubuntu/install/signal/custom_startup.sh | 10 +- src/ubuntu/install/signal/install_signal.sh | 7 +- src/ubuntu/install/slack/custom_startup.sh | 10 +- src/ubuntu/install/slack/install_slack.sh | 24 +- src/ubuntu/install/steam/custom_startup.sh | 10 +- src/ubuntu/install/steam/install_steam.sh | 6 +- .../install/sublime_text/custom_startup.sh | 10 +- .../sublime_text/install_sublime_text.sh | 8 +- src/ubuntu/install/teams/custom_startup.sh | 10 +- src/ubuntu/install/telegram/custom_startup.sh | 9 +- src/ubuntu/install/terminal/custom_startup.sh | 12 +- .../install/torbrowser/custom_startup.sh | 9 +- .../install/tracelabs/install_tracelabs.sh | 2 + src/ubuntu/install/vlc/custom_startup.sh | 10 +- src/ubuntu/install/vlc/install_vlc.sh | 6 +- src/ubuntu/install/vs_code/custom_startup.sh | 10 +- src/ubuntu/install/vs_code/install_vs_code.sh | 8 +- .../install/zoho_email/install_zoho_email.sh | 2 +- src/ubuntu/install/zoom/custom_startup.sh | 12 +- src/ubuntu/install/zoom/install_zoom.sh | 5 +- src/ubuntu/install/zsnes/custom_startup.sh | 10 +- src/ubuntu/install/zsnes/install_zsnes.sh | 6 +- 97 files changed, 738 insertions(+), 246 deletions(-) rename dockerfile-kasm-ubuntu-bionic-desktop => dockerfile-kasm-ubuntu-focal-desktop (95%) rename dockerfile-kasm-ubuntu-bionic-dind => dockerfile-kasm-ubuntu-focal-dind (91%) rename dockerfile-kasm-ubuntu-bionic-dind-rootless => dockerfile-kasm-ubuntu-focal-dind-rootless (92%) delete mode 100644 docs/ubuntu-bionic-desktop/README.md create mode 100644 docs/ubuntu-focal-desktop/README.md rename docs/{ubuntu-bionic-desktop => ubuntu-focal-desktop}/description.txt (100%) rename docs/{ubuntu-bionic-dind-rootless => ubuntu-focal-dind-rootless}/README.md (100%) rename docs/{ubuntu-bionic-dind-rootless => ubuntu-focal-dind-rootless}/description.txt (100%) rename docs/{ubuntu-bionic-dind => ubuntu-focal-dind}/README.md (100%) rename docs/{ubuntu-bionic-dind => ubuntu-focal-dind}/description.txt (100%) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d30dff5..e81d22b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -4,7 +4,10 @@ services: variables: DOCKER_AUTH_CONFIG: ${_DOCKER_AUTH_CONFIG} PLATFORM: "linux/amd64" - ARM_BUILDS: ",chromium,firefox,gimp,rdesktop,remmina,terminal,ubuntu-bionic-desktop,vlc,vs-code," + ARM_BUILDS: ",chromium,firefox,gimp,rdesktop,remmina,terminal,ubuntu-bionic-desktop,ubuntu-focal-desktop,vlc,vs-code," + CORE_IMAGE_TAG: "develop" + CORE_IMAGE: "core-ubuntu-focal" + USE_PRIVATE_IMAGES: 0 stages: - build @@ -16,7 +19,65 @@ before_script: - export SANITIZED_ROLLING_BRANCH=${SANITIZED_BRANCH}-rolling # Jobs for the develop and release branches. They should push to the private and public repos -build: +build_browser_images: + stage: build + image: ${ORG_NAME}/docker-buildx-private:develop + script: + - BUILD_PLATFORM=$PLATFORM + - if [[ "${ARM_BUILDS}" == *",${KASM_IMAGE},"* ]]; then BUILD_PLATFORM="linux/amd64,linux/arm64"; fi; + - echo "Building ${KASM_IMAGE} based on ${CORE_IMAGE} for platforms ${BUILD_PLATFORM}" + # to get qemu ready + - docker run --rm --privileged multiarch/qemu-user-static --reset -p yes + # to prepare the buildx env + - docker buildx create --use + # Ensure readme and description files are present + - ls docs/$KASM_IMAGE/README.md + - ls docs/$KASM_IMAGE/description.txt + # Check for private variable to build against private core images + - if [[ $USE_PRIVATE_IMAGES ]]; then CORE_IMAGE=$CORE_IMAGE-private; fi; + + - docker buildx build --push --platform $BUILD_PLATFORM -t ${ORG_NAME}/$KASM_IMAGE:$SANITIZED_BRANCH -t ${ORG_NAME}/$KASM_IMAGE:$SANITIZED_ROLLING_BRANCH -t ${ORG_NAME}/$KASM_IMAGE-private:$SANITIZED_BRANCH -t ${ORG_NAME}/$KASM_IMAGE-private:$SANITIZED_ROLLING_BRANCH --build-arg BASE_IMAGE=$CORE_IMAGE --build-arg BASE_TAG=$CORE_IMAGE_TAG -f dockerfile-kasm-$KASM_IMAGE . + only: + - develop + - /^release\/.*$/ + except: + - schedules + tags: + - aws-autoscale + parallel: + matrix: + - KASM_IMAGE: [chrome, chromium, firefox, firefox-mobile, tor-browser, edge, brave] + +build_app_images: + stage: build + image: ${ORG_NAME}/docker-buildx-private:develop + script: + - BUILD_PLATFORM=$PLATFORM + - if [[ "${ARM_BUILDS}" == *",${KASM_IMAGE},"* ]]; then BUILD_PLATFORM="linux/amd64,linux/arm64"; fi; + - echo "Building ${KASM_IMAGE} based on ${CORE_IMAGE} for platforms ${BUILD_PLATFORM}" + # to get qemu ready + - docker run --rm --privileged multiarch/qemu-user-static --reset -p yes + # to prepare the buildx env + - docker buildx create --use + # Ensure readme and description files are present + - ls docs/$KASM_IMAGE/README.md + - ls docs/$KASM_IMAGE/description.txt + # Check for private variable to build against private core images + - if [[ $USE_PRIVATE_IMAGES ]]; then CORE_IMAGE=$CORE_IMAGE-private; fi; + + - docker buildx build --push --platform $BUILD_PLATFORM -t ${ORG_NAME}/$KASM_IMAGE:$SANITIZED_BRANCH -t ${ORG_NAME}/$KASM_IMAGE:$SANITIZED_ROLLING_BRANCH -t ${ORG_NAME}/$KASM_IMAGE-private:$SANITIZED_BRANCH -t ${ORG_NAME}/$KASM_IMAGE-private:$SANITIZED_ROLLING_BRANCH --build-arg BASE_IMAGE=$CORE_IMAGE --build-arg BASE_TAG=$CORE_IMAGE_TAG -f dockerfile-kasm-$KASM_IMAGE . + only: + - develop + - /^release\/.*$/ + except: + - schedules + tags: + - aws-autoscale + parallel: + matrix: + - KASM_IMAGE: [doom, sublime-text, gimp, vs-code, slack, teams, only-office, zoom, signal, steam, postman, insomnia, zsnes, vlc, maltego, telegram, hunchly, java-dev, terminal, vmware-horizon, remmina, rdesktop, discord] + +build_ubuntu_desktop_images: stage: build image: ${ORG_NAME}/docker-buildx-private:develop script: @@ -30,9 +91,10 @@ build: # Ensure readme and description files are present - ls docs/$KASM_IMAGE/README.md - ls docs/$KASM_IMAGE/description.txt + # Check for private variable to build against private core images + - if [[ $USE_PRIVATE_IMAGES ]]; then PRIVATE=-private; CORE_IMAGE=$CORE_IMAGE-private; else PRIVATE=""; fi; - - docker buildx build --push --platform $BUILD_PLATFORM -t ${ORG_NAME}/$KASM_IMAGE:$SANITIZED_BRANCH -t ${ORG_NAME}/$KASM_IMAGE:$SANITIZED_ROLLING_BRANCH -t ${ORG_NAME}/$KASM_IMAGE-private:$SANITIZED_BRANCH -t ${ORG_NAME}/$KASM_IMAGE-private:$SANITIZED_ROLLING_BRANCH --build-arg BASE_TAG="develop" -f dockerfile-kasm-$KASM_IMAGE . - + - docker buildx build --push --platform $BUILD_PLATFORM -t ${ORG_NAME}/$KASM_IMAGE:$SANITIZED_BRANCH -t ${ORG_NAME}/$KASM_IMAGE:$SANITIZED_ROLLING_BRANCH -t ${ORG_NAME}/$KASM_IMAGE-private:$SANITIZED_BRANCH -t ${ORG_NAME}/$KASM_IMAGE-private:$SANITIZED_ROLLING_BRANCH --build-arg BASE_IMAGE=$CORE_IMAGE --build-arg PRIVATE=$PRIVATE --build-arg BASE_TAG=$CORE_IMAGE_TAG -f dockerfile-kasm-$KASM_IMAGE . only: - develop - /^release\/.*$/ @@ -42,20 +104,48 @@ build: - aws-autoscale parallel: matrix: - - KASM_IMAGE: [chrome, chromium, firefox, desktop, desktop-deluxe, firefox-mobile, tor-browser, doom, edge, terminal, vmware-horizon, remmina, rdesktop, brave, discord, sublime-text, gimp, vs-code, slack, teams, only-office, zoom, signal, steam, postman, insomnia, zsnes, vlc, ubuntu-bionic-desktop, maltego, centos-7-desktop, telegram, hunchly, ubuntu-bionic-dind, ubuntu-bionic-dind-rootless, tracelabs, java-dev ] + - KASM_IMAGE: [desktop, desktop-deluxe, ubuntu-focal-desktop, ubuntu-focal-dind, ubuntu-focal-dind-rootless] +build_non_ubuntu: + stage: build + image: ${ORG_NAME}/docker-buildx-private:develop + script: + - BUILD_PLATFORM=$PLATFORM + - if [[ "${ARM_BUILDS}" == *",${KASM_IMAGE},"* ]]; then BUILD_PLATFORM="linux/amd64,linux/arm64"; fi; + - echo "Building ${KASM_IMAGE} for platforms ${BUILD_PLATFORM}" + # to get qemu ready + - docker run --rm --privileged multiarch/qemu-user-static --reset -p yes + # to prepare the buildx env + - docker buildx create --use + # Ensure readme and description files are present + - ls docs/$KASM_IMAGE/README.md + - ls docs/$KASM_IMAGE/description.txt + # Check for private variable to build against private core images + - if [[ $USE_PRIVATE_IMAGES ]]; then PRIVATE=-private; else PRIVATE=""; fi; + + - docker buildx build --push --platform $BUILD_PLATFORM -t ${ORG_NAME}/$KASM_IMAGE:$SANITIZED_BRANCH -t ${ORG_NAME}/$KASM_IMAGE:$SANITIZED_ROLLING_BRANCH -t ${ORG_NAME}/$KASM_IMAGE-private:$SANITIZED_BRANCH -t ${ORG_NAME}/$KASM_IMAGE-private:$SANITIZED_ROLLING_BRANCH --build-arg PRIVATE=$PRIVATE --build-arg BASE_TAG=$CORE_IMAGE_TAG -f dockerfile-kasm-$KASM_IMAGE . + only: + - develop + - /^release\/.*$/ + except: + - schedules + tags: + - aws-autoscale + parallel: + matrix: + - KASM_IMAGE: [centos-7-desktop, tracelabs] # These jobs should run on the feature/bugfix branches - anything that is not the develop or release branches. It should only push images to the private repos -build_dev: +build_dev_browser_images: stage: build image: ${ORG_NAME}/docker-buildx-private:develop script: - BUILD_PLATFORM=$PLATFORM - if [[ "${ARM_BUILDS}" == *",${KASM_IMAGE},"* ]]; then BUILD_PLATFORM="linux/amd64,linux/arm64"; fi; - - echo "Building ${KASM_IMAGE} for platforms ${BUILD_PLATFORM}" + - echo "Building ${KASM_IMAGE} based on ${CORE_IMAGE} for platforms ${BUILD_PLATFORM}" # to get qemu ready - docker run --rm --privileged multiarch/qemu-user-static --reset -p yes # to prepare the buildx env @@ -63,9 +153,12 @@ build_dev: # Ensure readme and description files are present - ls docs/$KASM_IMAGE/README.md - ls docs/$KASM_IMAGE/description.txt - # Equivilant to docker build and docker push. Builds amd64 natively uses qemu for arm64. + # Check for private variable to build against private core images + - if [[ $USE_PRIVATE_IMAGES ]]; then CORE_IMAGE=$CORE_IMAGE-private; fi; + + # Equivalent to docker build and docker push. Builds amd64 natively uses qemu for arm64. # The only way to push multiple architectures to the same tag is to use buildx. - - docker buildx build --push --platform $BUILD_PLATFORM -t ${ORG_NAME}/$KASM_IMAGE-private:$SANITIZED_BRANCH --build-arg BASE_TAG="develop" -f dockerfile-kasm-$KASM_IMAGE . + - docker buildx build --push --platform $BUILD_PLATFORM -t ${ORG_NAME}/$KASM_IMAGE-private:$SANITIZED_BRANCH --build-arg BASE_IMAGE=$CORE_IMAGE --build-arg BASE_TAG=$CORE_IMAGE_TAG -f dockerfile-kasm-$KASM_IMAGE . except: - develop - /^release\/.*$/ @@ -73,12 +166,155 @@ build_dev: - aws-autoscale parallel: matrix: - - KASM_IMAGE: [chrome, chromium, firefox, desktop, desktop-deluxe, firefox-mobile, tor-browser, doom, edge, terminal, vmware-horizon, remmina, rdesktop, brave, discord, sublime-text, gimp, vs-code, slack, teams, only-office, zoom, signal, steam, postman, insomnia, zsnes, vlc, ubuntu-bionic-desktop, maltego, centos-7-desktop, telegram, hunchly, ubuntu-bionic-dind, ubuntu-bionic-dind-rootless, tracelabs, java-dev ] + - KASM_IMAGE: [chrome, chromium, firefox, firefox-mobile, tor-browser, edge, brave] +build_dev_app_images: + stage: build + image: ${ORG_NAME}/docker-buildx-private:develop + script: + - BUILD_PLATFORM=$PLATFORM + - if [[ "${ARM_BUILDS}" == *",${KASM_IMAGE},"* ]]; then BUILD_PLATFORM="linux/amd64,linux/arm64"; fi; + - echo "Building ${KASM_IMAGE} based on ${CORE_IMAGE} for platforms ${BUILD_PLATFORM}" + # to get qemu ready + - docker run --rm --privileged multiarch/qemu-user-static --reset -p yes + # to prepare the buildx env + - docker buildx create --use + # Ensure readme and description files are present + - ls docs/$KASM_IMAGE/README.md + - ls docs/$KASM_IMAGE/description.txt + # Check for private variable to build against private core images + - if [[ $USE_PRIVATE_IMAGES ]]; then CORE_IMAGE=$CORE_IMAGE-private; fi; + + # Equivalent to docker build and docker push. Builds amd64 natively uses qemu for arm64. + # The only way to push multiple architectures to the same tag is to use buildx. + - docker buildx build --push --platform $BUILD_PLATFORM -t ${ORG_NAME}/$KASM_IMAGE-private:$SANITIZED_BRANCH --build-arg BASE_IMAGE=$CORE_IMAGE --build-arg BASE_TAG=$CORE_IMAGE_TAG -f dockerfile-kasm-$KASM_IMAGE . + except: + - develop + - /^release\/.*$/ + tags: + - aws-autoscale + parallel: + matrix: + - KASM_IMAGE: [doom, sublime-text, gimp, vs-code, slack, teams, only-office, zoom, signal, steam, postman, insomnia, zsnes, vlc, maltego, telegram, hunchly, java-dev, terminal, vmware-horizon, remmina, rdesktop, discord] + +build_dev_ubuntu_desktop_images: + stage: build + image: ${ORG_NAME}/docker-buildx-private:develop + script: + - BUILD_PLATFORM=$PLATFORM + - if [[ "${ARM_BUILDS}" == *",${KASM_IMAGE},"* ]]; then BUILD_PLATFORM="linux/amd64,linux/arm64"; fi; + - echo "Building ${KASM_IMAGE} for platforms ${BUILD_PLATFORM}" + # to get qemu ready + - docker run --rm --privileged multiarch/qemu-user-static --reset -p yes + # to prepare the buildx env + - docker buildx create --use + # Ensure readme and description files are present + - ls docs/$KASM_IMAGE/README.md + - ls docs/$KASM_IMAGE/description.txt + # Check for private variable to build against private core images + - if [[ $USE_PRIVATE_IMAGES ]]; then PRIVATE=-private; CORE_IMAGE=$CORE_IMAGE-private; else PRIVATE=""; fi; + + # Equivalent to docker build and docker push. Builds amd64 natively uses qemu for arm64. + # The only way to push multiple architectures to the same tag is to use buildx. + - docker buildx build --push --platform $BUILD_PLATFORM -t ${ORG_NAME}/$KASM_IMAGE-private:$SANITIZED_BRANCH --build-arg PRIVATE=$PRIVATE --build-arg BASE_IMAGE=$CORE_IMAGE --build-arg BASE_TAG=$CORE_IMAGE_TAG -f dockerfile-kasm-$KASM_IMAGE . + except: + - develop + - /^release\/.*$/ + tags: + - aws-autoscale + parallel: + matrix: + - KASM_IMAGE: [desktop, desktop-deluxe, ubuntu-focal-desktop, ubuntu-focal-dind, ubuntu-focal-dind-rootless] + +build_dev_non_ubuntu: + stage: build + image: ${ORG_NAME}/docker-buildx-private:develop + script: + - BUILD_PLATFORM=$PLATFORM + - if [[ "${ARM_BUILDS}" == *",${KASM_IMAGE},"* ]]; then BUILD_PLATFORM="linux/amd64,linux/arm64"; fi; + - echo "Building ${KASM_IMAGE} for platforms ${BUILD_PLATFORM}" + # to get qemu ready + - docker run --rm --privileged multiarch/qemu-user-static --reset -p yes + # to prepare the buildx env + - docker buildx create --use + # Ensure readme and description files are present + - ls docs/$KASM_IMAGE/README.md + - ls docs/$KASM_IMAGE/description.txt + - if [[ $USE_PRIVATE_IMAGES ]]; then PRIVATE=-private; else PRIVATE=""; fi; + + # Equivalent to docker build and docker push. Builds amd64 natively uses qemu for arm64. + # The only way to push multiple architectures to the same tag is to use buildx. + - docker buildx build --push --platform $BUILD_PLATFORM -t ${ORG_NAME}/$KASM_IMAGE-private:$SANITIZED_BRANCH --build-arg PRIVATE=$PRIVATE --build-arg BASE_TAG=$CORE_IMAGE_TAG -f dockerfile-kasm-$KASM_IMAGE . + except: + - develop + - /^release\/.*$/ + tags: + - aws-autoscale + parallel: + matrix: + - KASM_IMAGE: [centos-7-desktop, tracelabs] # These jobs are for the "rolling" release of the images. They should only run for scheduled jobs and should only push the rolling tags -build_schedules: +build_schedules_browser_images: + image: ${ORG_NAME}/docker-buildx-private:develop + stage: build + script: + - BUILD_PLATFORM=$PLATFORM + - if [[ "${ARM_BUILDS}" == *",${KASM_IMAGE},"* ]]; then BUILD_PLATFORM="linux/amd64,linux/arm64"; fi; + - echo "Building ${KASM_IMAGE} based on ${CORE_IMAGE} for platforms ${BUILD_PLATFORM}" + # to get qemu ready + - docker run --rm --privileged multiarch/qemu-user-static --reset -p yes + # to prepare the buildx env + - docker buildx create --use + # Ensure readme and description files are present + - ls docs/$KASM_IMAGE/README.md + - ls docs/$KASM_IMAGE/description.txt + # Check for private variable to build against private core images + - if [[ $USE_PRIVATE_IMAGES ]]; then CORE_IMAGE=$CORE_IMAGE-private; fi; + + # Equivalent to docker build and docker push. Builds amd64 natively uses qemu for arm64. + # The only way to push multiple architectures to the same tag is to use buildx. + - docker buildx build --push --platform $BUILD_PLATFORM -t ${ORG_NAME}/$KASM_IMAGE:$SANITIZED_ROLLING_BRANCH -t ${ORG_NAME}/$KASM_IMAGE-private:$SANITIZED_ROLLING_BRANCH --build-arg BASE_IMAGE=$CORE_IMAGE --build-arg BASE_TAG="$SANITIZED_ROLLING_BRANCH" -f dockerfile-kasm-$KASM_IMAGE . + only: + - schedules + tags: + - aws-autoscale + parallel: + matrix: + - KASM_IMAGE: [chrome, chromium, firefox, firefox-mobile, tor-browser, edge, brave] + CORE_IMAGE: [core-ubuntu-bionic, core-ubuntu-focal] + +build_schedules_app_images: + image: ${ORG_NAME}/docker-buildx-private:develop + stage: build + script: + - BUILD_PLATFORM=$PLATFORM + - if [[ "${ARM_BUILDS}" == *",${KASM_IMAGE},"* ]]; then BUILD_PLATFORM="linux/amd64,linux/arm64"; fi; + - echo "Building ${KASM_IMAGE} based on ${CORE_IMAGE} for platforms ${BUILD_PLATFORM}" + # to get qemu ready + - docker run --rm --privileged multiarch/qemu-user-static --reset -p yes + # to prepare the buildx env + - docker buildx create --use + # Ensure readme and description files are present + - ls docs/$KASM_IMAGE/README.md + - ls docs/$KASM_IMAGE/description.txt + # Check for private variable to build against private core images + - if [[ $USE_PRIVATE_IMAGES ]]; then CORE_IMAGE=$CORE_IMAGE-private; fi; + + # Equivalent to docker build and docker push. Builds amd64 natively uses qemu for arm64. + # The only way to push multiple architectures to the same tag is to use buildx. + - docker buildx build --push --platform $BUILD_PLATFORM -t ${ORG_NAME}/$KASM_IMAGE:$SANITIZED_ROLLING_BRANCH -t ${ORG_NAME}/$KASM_IMAGE-private:$SANITIZED_ROLLING_BRANCH --build-arg BASE_IMAGE=$CORE_IMAGE --build-arg BASE_TAG="$SANITIZED_ROLLING_BRANCH" -f dockerfile-kasm-$KASM_IMAGE . + only: + - schedules + tags: + - aws-autoscale + parallel: + matrix: + - KASM_IMAGE: [doom, sublime-text, gimp, vs-code, slack, teams, only-office, zoom, signal, steam, postman, insomnia, zsnes, vlc, maltego, telegram, hunchly, java-dev, terminal, vmware-horizon, remmina, rdesktop, discord] + CORE_IMAGE: [core-ubuntu-bionic, core-ubuntu-focal] + +build_schedules_ubuntu_desktop_images: image: ${ORG_NAME}/docker-buildx-private:develop stage: build script: @@ -92,17 +328,46 @@ build_schedules: # Ensure readme and description files are present - ls docs/$KASM_IMAGE/README.md - ls docs/$KASM_IMAGE/description.txt - # Equivilant to docker build and docker push. Builds amd64 natively uses qemu for arm64. + # Check for private variable to build against private core images + - if [[ $USE_PRIVATE_IMAGES ]]; then PRIVATE=-private; CORE_IMAGE=$CORE_IMAGE-private; else PRIVATE=""; fi; + + # Equivalent to docker build and docker push. Builds amd64 natively uses qemu for arm64. # The only way to push multiple architectures to the same tag is to use buildx. - - docker buildx build --push --platform $BUILD_PLATFORM -t ${ORG_NAME}/$KASM_IMAGE:$SANITIZED_ROLLING_BRANCH -t ${ORG_NAME}/$KASM_IMAGE-private:$SANITIZED_ROLLING_BRANCH --build-arg BASE_TAG="$SANITIZED_ROLLING_BRANCH" -f dockerfile-kasm-$KASM_IMAGE . + - docker buildx build --push --platform $BUILD_PLATFORM -t ${ORG_NAME}/$KASM_IMAGE:$SANITIZED_ROLLING_BRANCH -t ${ORG_NAME}/$KASM_IMAGE-private:$SANITIZED_ROLLING_BRANCH --build-arg BASE_IMAGE=$CORE_IMAGE --build-arg PRIVATE=$PRIVATE --build-arg BASE_TAG="$SANITIZED_ROLLING_BRANCH" -f dockerfile-kasm-$KASM_IMAGE . only: - schedules tags: - aws-autoscale parallel: matrix: - - KASM_IMAGE: [chrome, chromium, firefox, desktop, desktop-deluxe, firefox-mobile, tor-browser, doom, edge, terminal, vmware-horizon, remmina, rdesktop, brave, discord, sublime-text, gimp, vs-code, slack, teams, only-office, zoom, signal, steam, postman, insomnia, zsnes, vlc, ubuntu-bionic-desktop, maltego, centos-7-desktop, telegram, hunchly, ubuntu-bionic-dind, ubuntu-bionic-dind-rootless, tracelabs, java-dev ] + - KASM_IMAGE: [desktop, desktop-deluxe, ubuntu-focal-desktop, ubuntu-focal-dind, ubuntu-focal-dind-rootless] +build_schedules_non_ubuntu: + image: ${ORG_NAME}/docker-buildx-private:develop + stage: build + script: + - BUILD_PLATFORM=$PLATFORM + - if [[ "${ARM_BUILDS}" == *",${KASM_IMAGE},"* ]]; then BUILD_PLATFORM="linux/amd64,linux/arm64"; fi; + - echo "Building ${KASM_IMAGE} for platforms ${BUILD_PLATFORM}" + # to get qemu ready + - docker run --rm --privileged multiarch/qemu-user-static --reset -p yes + # to prepare the buildx env + - docker buildx create --use + # Ensure readme and description files are present + - ls docs/$KASM_IMAGE/README.md + - ls docs/$KASM_IMAGE/description.txt + - if [[ $USE_PRIVATE_IMAGES ]]; then PRIVATE=-private; else PRIVATE=""; fi; + + # Equivalent to docker build and docker push. Builds amd64 natively uses qemu for arm64. + # The only way to push multiple architectures to the same tag is to use buildx. + - docker buildx build --push --platform $BUILD_PLATFORM -t ${ORG_NAME}/$KASM_IMAGE:$SANITIZED_ROLLING_BRANCH -t ${ORG_NAME}/$KASM_IMAGE-private:$SANITIZED_ROLLING_BRANCH --build-arg PRIVATE=$PRIVATE --build-arg BASE_TAG="$SANITIZED_ROLLING_BRANCH" -f dockerfile-kasm-$KASM_IMAGE . + only: + - schedules + tags: + - aws-autoscale + parallel: + matrix: + - KASM_IMAGE: [centos-7-desktop, tracelabs] update_readmes: diff --git a/dockerfile-kasm-brave b/dockerfile-kasm-brave index 74ca3d1..9270810 100644 --- a/dockerfile-kasm-brave +++ b/dockerfile-kasm-brave @@ -1,10 +1,12 @@ ARG BASE_TAG="develop" -FROM kasmweb/core-ubuntu-bionic:$BASE_TAG +ARG BASE_IMAGE="core-ubuntu-focal" +FROM kasmweb/$BASE_IMAGE:$BASE_TAG USER root ENV HOME /home/kasm-default-profile ENV STARTUPDIR /dockerstartup ENV INST_SCRIPTS $STARTUPDIR/install +ENV BASE_IMAGE $BASE_IMAGE WORKDIR $HOME ######### Customize Container Here ########### diff --git a/dockerfile-kasm-centos-7-desktop b/dockerfile-kasm-centos-7-desktop index 953a3d9..c5d763b 100644 --- a/dockerfile-kasm-centos-7-desktop +++ b/dockerfile-kasm-centos-7-desktop @@ -1,5 +1,6 @@ ARG BASE_TAG="develop" -FROM kasmweb/core-centos-7:$BASE_TAG +ARG PRIVATE="" +FROM kasmweb/core-centos-7$PRIVATE:$BASE_TAG USER root ENV DISTRO=centos diff --git a/dockerfile-kasm-chrome b/dockerfile-kasm-chrome index da51af3..e23768b 100644 --- a/dockerfile-kasm-chrome +++ b/dockerfile-kasm-chrome @@ -1,10 +1,12 @@ ARG BASE_TAG="develop" -FROM kasmweb/core-ubuntu-bionic:$BASE_TAG +ARG BASE_IMAGE="core-ubuntu-focal" +FROM kasmweb/$BASE_IMAGE:$BASE_TAG USER root ENV HOME /home/kasm-default-profile ENV STARTUPDIR /dockerstartup ENV INST_SCRIPTS $STARTUPDIR/install +ENV BASE_IMAGE $BASE_IMAGE WORKDIR $HOME ######### Customize Container Here ########### diff --git a/dockerfile-kasm-chrome-flash b/dockerfile-kasm-chrome-flash index b52295c..d4d8040 100644 --- a/dockerfile-kasm-chrome-flash +++ b/dockerfile-kasm-chrome-flash @@ -1,11 +1,13 @@ ARG BASE_TAG="develop" -FROM kasmweb/core-ubuntu-bionic:$BASE_TAG +ARG BASE_IMAGE="core-ubuntu-focal" +FROM kasmweb/$BASE_IMAGE:$BASE_TAG USER root ENV HOME /home/kasm-default-profile ENV STARTUPDIR /dockerstartup ENV INST_SCRIPTS $STARTUPDIR/install +ENV BASE_IMAGE $BASE_IMAGE WORKDIR $HOME ######### Customize Container Here ########### @@ -27,7 +29,7 @@ COPY ./src/ubuntu/install/chrome/custom_startup.sh $STARTUPDIR/custom_startup.sh RUN chmod +x $STARTUPDIR/custom_startup.sh COPY ./src/ubuntu/install/chrome_flash $INST_SCRIPTS/chrome_flash/ -RUN bash $INST_SCRIPTS/chrome_flash/install_flash.sh && rm -rf $INST_SCRIPTS/chrome_flash/ +RUN bash $INST_SCRIPTS/chrome_flash/install_flash.sh && rm -rf $INST_SCRIPTS/chrome_flash/ ENV KASM_RESTRICTED_FILE_CHOOSER=1 COPY ./src/ubuntu/install/gtk/ $INST_SCRIPTS/gtk/ diff --git a/dockerfile-kasm-chromium b/dockerfile-kasm-chromium index 7e74549..73dea1f 100644 --- a/dockerfile-kasm-chromium +++ b/dockerfile-kasm-chromium @@ -1,10 +1,12 @@ ARG BASE_TAG="develop" -FROM kasmweb/core-ubuntu-bionic:$BASE_TAG +ARG BASE_IMAGE="core-ubuntu-focal" +FROM kasmweb/$BASE_IMAGE:$BASE_TAG USER root ENV HOME /home/kasm-default-profile ENV STARTUPDIR /dockerstartup ENV INST_SCRIPTS $STARTUPDIR/install +ENV BASE_IMAGE $BASE_IMAGE WORKDIR $HOME ######### Customize Container Here ########### diff --git a/dockerfile-kasm-desktop b/dockerfile-kasm-desktop index 19ec2ec..f77a61a 100644 --- a/dockerfile-kasm-desktop +++ b/dockerfile-kasm-desktop @@ -1,10 +1,12 @@ ARG BASE_TAG="develop" -FROM kasmweb/core-ubuntu-bionic:$BASE_TAG +ARG BASE_IMAGE="core-ubuntu-focal" +FROM kasmweb/$BASE_IMAGE:$BASE_TAG USER root ENV HOME /home/kasm-default-profile ENV STARTUPDIR /dockerstartup ENV INST_SCRIPTS $STARTUPDIR/install +ENV BASE_IMAGE $BASE_IMAGE WORKDIR $HOME ######### Customize Container Here ########### diff --git a/dockerfile-kasm-desktop-deluxe b/dockerfile-kasm-desktop-deluxe index 59deff0..f3fa79e 100644 --- a/dockerfile-kasm-desktop-deluxe +++ b/dockerfile-kasm-desktop-deluxe @@ -1,5 +1,6 @@ ARG BASE_TAG="develop" -FROM kasmweb/core-ubuntu-bionic:$BASE_TAG +ARG BASE_IMAGE="core-ubuntu-focal" +FROM kasmweb/$BASE_IMAGE:$BASE_TAG USER root @@ -11,6 +12,7 @@ WORKDIR $HOME ENV DEBIAN_FRONTEND noninteractive ENV KASM_RX_HOME $STARTUPDIR/kasmrx ENV INST_SCRIPTS $STARTUPDIR/install +ENV BASE_IMAGE $BASE_IMAGE # Add Kasm Branding RUN cp /usr/share/extra/backgrounds/bg_kasm.png /usr/share/extra/backgrounds/bg_default.png @@ -95,7 +97,7 @@ COPY ./src/ubuntu/install/telegram $INST_SCRIPTS/telegram/ RUN bash $INST_SCRIPTS/telegram/install_telegram.sh && rm -rf $INST_SCRIPTS/telegram/ ### Remove maxmius -RUN apt-get remove -y maximus +RUN if [[ ${BASE_IMAGE} =~ "bionic" ]]; then apt-get remove -y maximus; fi; #ADD ./src/common/scripts $STARTUPDIR RUN $STARTUPDIR/set_user_permission.sh $HOME diff --git a/dockerfile-kasm-discord b/dockerfile-kasm-discord index 9c55843..10fc9dd 100644 --- a/dockerfile-kasm-discord +++ b/dockerfile-kasm-discord @@ -1,10 +1,12 @@ ARG BASE_TAG="develop" -FROM kasmweb/core-ubuntu-bionic:$BASE_TAG +ARG BASE_IMAGE="core-ubuntu-focal" +FROM kasmweb/$BASE_IMAGE:$BASE_TAG USER root ENV HOME /home/kasm-default-profile ENV STARTUPDIR /dockerstartup ENV INST_SCRIPTS $STARTUPDIR/install +ENV BASE_IMAGE $BASE_IMAGE WORKDIR $HOME ######### Customize Container Here ########### diff --git a/dockerfile-kasm-doom b/dockerfile-kasm-doom index 192a59a..3a3a966 100644 --- a/dockerfile-kasm-doom +++ b/dockerfile-kasm-doom @@ -1,10 +1,12 @@ ARG BASE_TAG="develop" -FROM kasmweb/core-ubuntu-bionic:$BASE_TAG +ARG BASE_IMAGE="core-ubuntu-focal" +FROM kasmweb/$BASE_IMAGE:$BASE_TAG USER root ENV HOME /home/kasm-default-profile ENV STARTUPDIR /dockerstartup ENV INST_SCRIPTS $STARTUPDIR/install +ENV BASE_IMAGE $BASE_IMAGE WORKDIR $HOME ######### Customize Container Here ########### diff --git a/dockerfile-kasm-edge b/dockerfile-kasm-edge index eabf992..0153b91 100644 --- a/dockerfile-kasm-edge +++ b/dockerfile-kasm-edge @@ -1,10 +1,12 @@ ARG BASE_TAG="develop" -FROM kasmweb/core-ubuntu-bionic:$BASE_TAG +ARG BASE_IMAGE="core-ubuntu-focal" +FROM kasmweb/$BASE_IMAGE:$BASE_TAG USER root ENV HOME /home/kasm-default-profile ENV STARTUPDIR /dockerstartup ENV INST_SCRIPTS $STARTUPDIR/install +ENV BASE_IMAGE $BASE_IMAGE WORKDIR $HOME ######### Customize Container Here ########### diff --git a/dockerfile-kasm-firefox b/dockerfile-kasm-firefox index c9be10a..e1357ed 100644 --- a/dockerfile-kasm-firefox +++ b/dockerfile-kasm-firefox @@ -1,10 +1,12 @@ ARG BASE_TAG="develop" -FROM kasmweb/core-ubuntu-bionic:$BASE_TAG +ARG BASE_IMAGE="core-ubuntu-focal" +FROM kasmweb/$BASE_IMAGE:$BASE_TAG USER root ENV HOME /home/kasm-default-profile ENV STARTUPDIR /dockerstartup ENV INST_SCRIPTS $STARTUPDIR/install +ENV BASE_IMAGE $BASE_IMAGE WORKDIR $HOME ######### Customize Container Here ########### diff --git a/dockerfile-kasm-firefox-flash b/dockerfile-kasm-firefox-flash index 1c04de5..8094c8a 100644 --- a/dockerfile-kasm-firefox-flash +++ b/dockerfile-kasm-firefox-flash @@ -1,11 +1,13 @@ ARG BASE_TAG="develop" -FROM kasmweb/core-ubuntu-bionic:$BASE_TAG +ARG BASE_IMAGE="core-ubuntu-focal" +FROM kasmweb/$BASE_IMAGE:$BASE_TAG USER root ENV HOME /home/kasm-default-profile ENV STARTUPDIR /dockerstartup ENV INST_SCRIPTS $STARTUPDIR/install +ENV BASE_IMAGE $BASE_IMAGE WORKDIR $HOME ######### Customize Container Here ########### @@ -27,7 +29,7 @@ COPY ./src/ubuntu/install/firefox/custom_startup.sh $STARTUPDIR/custom_startup.s RUN chmod +x $STARTUPDIR/custom_startup.sh COPY ./src/ubuntu/install/firefox_flash $INST_SCRIPTS/firefox_flash/ -RUN bash $INST_SCRIPTS/firefox_flash/install_flash.sh && rm -rf $INST_SCRIPTS/firefox_flash/ +RUN bash $INST_SCRIPTS/firefox_flash/install_flash.sh && rm -rf $INST_SCRIPTS/firefox_flash/ ENV KASM_RESTRICTED_FILE_CHOOSER=1 COPY ./src/ubuntu/install/gtk/ $INST_SCRIPTS/gtk/ diff --git a/dockerfile-kasm-firefox-mobile b/dockerfile-kasm-firefox-mobile index babc6d6..26419ad 100644 --- a/dockerfile-kasm-firefox-mobile +++ b/dockerfile-kasm-firefox-mobile @@ -1,5 +1,6 @@ ARG BASE_TAG="develop" -FROM kasmweb/core-ubuntu-bionic:$BASE_TAG +ARG BASE_IMAGE="core-ubuntu-focal" +FROM kasmweb/$BASE_IMAGE:$BASE_TAG USER root @@ -11,6 +12,7 @@ WORKDIR $HOME ENV DEBIAN_FRONTEND noninteractive ENV KASM_RX_HOME $STARTUPDIR/kasmrx ENV INST_SCRIPTS $STARTUPDIR/install +ENV BASE_IMAGE $BASE_IMAGE # Install Firefox COPY ./src/ubuntu/install/firefox/ $INST_SCRIPTS/firefox/ diff --git a/dockerfile-kasm-gimp b/dockerfile-kasm-gimp index be4291f..affde2b 100644 --- a/dockerfile-kasm-gimp +++ b/dockerfile-kasm-gimp @@ -1,10 +1,12 @@ ARG BASE_TAG="develop" -FROM kasmweb/core-ubuntu-bionic:$BASE_TAG +ARG BASE_IMAGE="core-ubuntu-focal" +FROM kasmweb/$BASE_IMAGE:$BASE_TAG USER root ENV HOME /home/kasm-default-profile ENV STARTUPDIR /dockerstartup ENV INST_SCRIPTS $STARTUPDIR/install +ENV BASE_IMAGE $BASE_IMAGE WORKDIR $HOME ######### Customize Container Here ########### diff --git a/dockerfile-kasm-hunchly b/dockerfile-kasm-hunchly index 4864cd2..c8411e0 100644 --- a/dockerfile-kasm-hunchly +++ b/dockerfile-kasm-hunchly @@ -1,10 +1,12 @@ ARG BASE_TAG="develop" -FROM kasmweb/core-ubuntu-bionic:$BASE_TAG +ARG BASE_IMAGE="core-ubuntu-focal" +FROM kasmweb/$BASE_IMAGE:$BASE_TAG USER root ENV HOME /home/kasm-default-profile ENV STARTUPDIR /dockerstartup -ENV INST_SCRIPTS $STARTUPDIR/install +ENV INST_SCRIPTS $STARTUPDIR/ +ENV BASE_IMAGE $BASE_IMAGE WORKDIR $HOME ######### Customize Container Here ########### diff --git a/dockerfile-kasm-insomnia b/dockerfile-kasm-insomnia index 7b64305..d422e25 100644 --- a/dockerfile-kasm-insomnia +++ b/dockerfile-kasm-insomnia @@ -1,10 +1,12 @@ ARG BASE_TAG="develop" -FROM kasmweb/core-ubuntu-bionic:$BASE_TAG +ARG BASE_IMAGE="core-ubuntu-focal" +FROM kasmweb/$BASE_IMAGE:$BASE_TAG USER root ENV HOME /home/kasm-default-profile ENV STARTUPDIR /dockerstartup ENV INST_SCRIPTS $STARTUPDIR/install +ENV BASE_IMAGE $BASE_IMAGE WORKDIR $HOME ######### Customize Container Here ########### diff --git a/dockerfile-kasm-java-dev b/dockerfile-kasm-java-dev index 6cb9e9b..f81cfb8 100644 --- a/dockerfile-kasm-java-dev +++ b/dockerfile-kasm-java-dev @@ -1,5 +1,6 @@ ARG BASE_TAG="develop" -FROM kasmweb/core-ubuntu-bionic:$BASE_TAG +ARG BASE_IMAGE="core-ubuntu-focal" +FROM kasmweb/$BASE_IMAGE:$BASE_TAG USER root @@ -11,6 +12,7 @@ WORKDIR $HOME ENV DEBIAN_FRONTEND noninteractive ENV KASM_RX_HOME $STARTUPDIR/kasmrx ENV INST_SCRIPTS $STARTUPDIR/install +ENV BASE_IMAGE $BASE_IMAGE ### Install Tools @@ -54,7 +56,7 @@ COPY ./src/ubuntu/install/eclipse $INST_SCRIPTS/eclipse RUN bash $INST_SCRIPTS/eclipse/install_eclipse.sh && rm -rf $INST_SCRIPTS/eclipse/ ### Remove maxmius -RUN apt-get remove -y maximus +RUN if [[ ${BASE_IMAGE} =~ "bionic" ]]; then apt-get remove -y maximus; fi; #ADD ./src/common/scripts $STARTUPDIR RUN $STARTUPDIR/set_user_permission.sh $HOME diff --git a/dockerfile-kasm-maltego b/dockerfile-kasm-maltego index c91ca22..b6cc10a 100644 --- a/dockerfile-kasm-maltego +++ b/dockerfile-kasm-maltego @@ -1,14 +1,20 @@ ARG BASE_TAG="develop" -FROM kasmweb/core-ubuntu-bionic:$BASE_TAG +ARG BASE_IMAGE="core-ubuntu-focal" +FROM kasmweb/$BASE_IMAGE:$BASE_TAG USER root ENV HOME /home/kasm-default-profile ENV STARTUPDIR /dockerstartup ENV INST_SCRIPTS $STARTUPDIR/install +ENV BASE_IMAGE $BASE_IMAGE WORKDIR $HOME ######### Customize Container Here ########### +# Maltego wants a browser installed and the default is Firefox, Install Firefox +COPY ./src/ubuntu/install/firefox/ $INST_SCRIPTS/firefox/ +COPY ./src/ubuntu/install/firefox/firefox.desktop $HOME/Desktop/ +RUN bash $INST_SCRIPTS/firefox/install_firefox.sh && rm -rf $INST_SCRIPTS/firefox/ COPY ./src/ubuntu/install/maltego $INST_SCRIPTS/maltego/ RUN bash $INST_SCRIPTS/maltego/install_maltego.sh && rm -rf $INST_SCRIPTS/maltego/ @@ -26,6 +32,9 @@ RUN apt-get remove -y xfce4-panel ######### End Customizations ########### +#ADD ./src/common/scripts $STARTUPDIR +RUN $STARTUPDIR/set_user_permission.sh $HOME + RUN chown 1000:0 $HOME ENV HOME /home/kasm-user diff --git a/dockerfile-kasm-only-office b/dockerfile-kasm-only-office index 6613566..0693e7f 100644 --- a/dockerfile-kasm-only-office +++ b/dockerfile-kasm-only-office @@ -1,10 +1,12 @@ ARG BASE_TAG="develop" -FROM kasmweb/core-ubuntu-bionic:$BASE_TAG +ARG BASE_IMAGE="core-ubuntu-focal" +FROM kasmweb/$BASE_IMAGE:$BASE_TAG USER root ENV HOME /home/kasm-default-profile ENV STARTUPDIR /dockerstartup ENV INST_SCRIPTS $STARTUPDIR/install +ENV BASE_IMAGE $BASE_IMAGE WORKDIR $HOME ######### Customize Container Here ########### diff --git a/dockerfile-kasm-postman b/dockerfile-kasm-postman index 9bfbb69..8cd0ac6 100644 --- a/dockerfile-kasm-postman +++ b/dockerfile-kasm-postman @@ -1,10 +1,12 @@ ARG BASE_TAG="develop" -FROM kasmweb/core-ubuntu-bionic:$BASE_TAG +ARG BASE_IMAGE="core-ubuntu-focal" +FROM kasmweb/$BASE_IMAGE:$BASE_TAG USER root ENV HOME /home/kasm-default-profile ENV STARTUPDIR /dockerstartup ENV INST_SCRIPTS $STARTUPDIR/install +ENV BASE_IMAGE $BASE_IMAGE WORKDIR $HOME ######### Customize Container Here ########### diff --git a/dockerfile-kasm-rdesktop b/dockerfile-kasm-rdesktop index b3eaa1f..d3bd12d 100644 --- a/dockerfile-kasm-rdesktop +++ b/dockerfile-kasm-rdesktop @@ -1,10 +1,12 @@ ARG BASE_TAG="develop" -FROM kasmweb/core-ubuntu-bionic:$BASE_TAG +ARG BASE_IMAGE="core-ubuntu-focal" +FROM kasmweb/$BASE_IMAGE:$BASE_TAG USER root ENV HOME /home/kasm-default-profile ENV STARTUPDIR /dockerstartup ENV INST_SCRIPTS $STARTUPDIR/install +ENV BASE_IMAGE $BASE_IMAGE WORKDIR $HOME ######### Customize Container Here ########### diff --git a/dockerfile-kasm-remmina b/dockerfile-kasm-remmina index 6f42e06..f779e28 100644 --- a/dockerfile-kasm-remmina +++ b/dockerfile-kasm-remmina @@ -1,10 +1,12 @@ ARG BASE_TAG="develop" -FROM kasmweb/core-ubuntu-bionic:$BASE_TAG +ARG BASE_IMAGE="core-ubuntu-focal" +FROM kasmweb/$BASE_IMAGE:$BASE_TAG USER root ENV HOME /home/kasm-default-profile ENV STARTUPDIR /dockerstartup ENV INST_SCRIPTS $STARTUPDIR/install +ENV BASE_IMAGE $BASE_IMAGE WORKDIR $HOME ######### Customize Container Here ########### diff --git a/dockerfile-kasm-signal b/dockerfile-kasm-signal index 98c2027..dff5406 100644 --- a/dockerfile-kasm-signal +++ b/dockerfile-kasm-signal @@ -1,10 +1,12 @@ ARG BASE_TAG="develop" -FROM kasmweb/core-ubuntu-bionic:$BASE_TAG +ARG BASE_IMAGE="core-ubuntu-focal" +FROM kasmweb/$BASE_IMAGE:$BASE_TAG USER root ENV HOME /home/kasm-default-profile ENV STARTUPDIR /dockerstartup ENV INST_SCRIPTS $STARTUPDIR/install +ENV BASE_IMAGE $BASE_IMAGE WORKDIR $HOME ######### Customize Container Here ########### diff --git a/dockerfile-kasm-slack b/dockerfile-kasm-slack index 50da304..8465829 100644 --- a/dockerfile-kasm-slack +++ b/dockerfile-kasm-slack @@ -1,10 +1,12 @@ ARG BASE_TAG="develop" -FROM kasmweb/core-ubuntu-bionic:$BASE_TAG +ARG BASE_IMAGE="core-ubuntu-focal" +FROM kasmweb/$BASE_IMAGE:$BASE_TAG USER root ENV HOME /home/kasm-default-profile ENV STARTUPDIR /dockerstartup ENV INST_SCRIPTS $STARTUPDIR/install +ENV BASE_IMAGE $BASE_IMAGE WORKDIR $HOME ######### Customize Container Here ########### diff --git a/dockerfile-kasm-steam b/dockerfile-kasm-steam index a20fe2a..4ee0970 100644 --- a/dockerfile-kasm-steam +++ b/dockerfile-kasm-steam @@ -1,10 +1,12 @@ ARG BASE_TAG="develop" -FROM kasmweb/core-ubuntu-bionic:$BASE_TAG +ARG BASE_IMAGE="core-ubuntu-focal" +FROM kasmweb/$BASE_IMAGE:$BASE_TAG USER root ENV HOME /home/kasm-default-profile ENV STARTUPDIR /dockerstartup ENV INST_SCRIPTS $STARTUPDIR/install +ENV BASE_IMAGE $BASE_IMAGE WORKDIR $HOME ######### Customize Container Here ########### diff --git a/dockerfile-kasm-sublime-text b/dockerfile-kasm-sublime-text index 265bcec..881389e 100644 --- a/dockerfile-kasm-sublime-text +++ b/dockerfile-kasm-sublime-text @@ -1,10 +1,12 @@ ARG BASE_TAG="develop" -FROM kasmweb/core-ubuntu-bionic:$BASE_TAG +ARG BASE_IMAGE="core-ubuntu-focal" +FROM kasmweb/$BASE_IMAGE:$BASE_TAG USER root ENV HOME /home/kasm-default-profile ENV STARTUPDIR /dockerstartup ENV INST_SCRIPTS $STARTUPDIR/install +ENV BASE_IMAGE $BASE_IMAGE WORKDIR $HOME ######### Customize Container Here ########### diff --git a/dockerfile-kasm-teams b/dockerfile-kasm-teams index ae8115d..cb54d16 100644 --- a/dockerfile-kasm-teams +++ b/dockerfile-kasm-teams @@ -1,10 +1,12 @@ ARG BASE_TAG="develop" -FROM kasmweb/core-ubuntu-bionic:$BASE_TAG +ARG BASE_IMAGE="core-ubuntu-focal" +FROM kasmweb/$BASE_IMAGE:$BASE_TAG USER root ENV HOME /home/kasm-default-profile ENV STARTUPDIR /dockerstartup ENV INST_SCRIPTS $STARTUPDIR/install +ENV BASE_IMAGE $BASE_IMAGE WORKDIR $HOME ######### Customize Container Here ########### diff --git a/dockerfile-kasm-telegram b/dockerfile-kasm-telegram index abdb075..f3d4cbb 100644 --- a/dockerfile-kasm-telegram +++ b/dockerfile-kasm-telegram @@ -1,10 +1,12 @@ ARG BASE_TAG="develop" -FROM kasmweb/core-ubuntu-bionic:$BASE_TAG +ARG BASE_IMAGE="core-ubuntu-focal" +FROM kasmweb/$BASE_IMAGE:$BASE_TAG USER root ENV HOME /home/kasm-default-profile ENV STARTUPDIR /dockerstartup ENV INST_SCRIPTS $STARTUPDIR/install +ENV BASE_IMAGE $BASE_IMAGE WORKDIR $HOME ######### Customize Container Here ########### diff --git a/dockerfile-kasm-terminal b/dockerfile-kasm-terminal index 3481773..6122494 100644 --- a/dockerfile-kasm-terminal +++ b/dockerfile-kasm-terminal @@ -1,10 +1,12 @@ ARG BASE_TAG="develop" -FROM kasmweb/core-ubuntu-bionic:$BASE_TAG +ARG BASE_IMAGE="core-ubuntu-focal" +FROM kasmweb/$BASE_IMAGE:$BASE_TAG USER root ENV HOME /home/kasm-default-profile ENV STARTUPDIR /dockerstartup ENV INST_SCRIPTS $STARTUPDIR/install +ENV BASE_IMAGE $BASE_IMAGE WORKDIR $HOME ######### Customize Container Here ########### diff --git a/dockerfile-kasm-tor-browser b/dockerfile-kasm-tor-browser index 7e32a10..9c5c80e 100644 --- a/dockerfile-kasm-tor-browser +++ b/dockerfile-kasm-tor-browser @@ -1,10 +1,16 @@ ARG BASE_TAG="develop" -FROM kasmweb/core-ubuntu-bionic:$BASE_TAG +ARG BASE_IMAGE="core-ubuntu-focal" +FROM kasmweb/$BASE_IMAGE:$BASE_TAG USER root ENV HOME /home/kasm-default-profile ENV STARTUPDIR /dockerstartup ENV INST_SCRIPTS $STARTUPDIR/install +ENV BASE_IMAGE $BASE_IMAGE +# TODO: Once we satisfy KASM-1423, move these to the core images instead +ENV PULSE_RUNTIME_PATH "/tmp/pulse" +ENV PULSE_STATE_PATH "/tmp/pulse" +ENV PULSE_COOKIE "/tmp/pulse/cookie" WORKDIR $HOME ######### Customize Container Here ########### diff --git a/dockerfile-kasm-tracelabs b/dockerfile-kasm-tracelabs index e32a8ff..298e183 100644 --- a/dockerfile-kasm-tracelabs +++ b/dockerfile-kasm-tracelabs @@ -1,5 +1,6 @@ ARG BASE_TAG="develop" -FROM kasmweb/core-kali-rolling:$BASE_TAG +ARG PRIVATE="" +FROM kasmweb/core-kali-rolling$PRIVATE:$BASE_TAG USER root ENV HOME /home/kasm-default-profile diff --git a/dockerfile-kasm-ubuntu-bionic-desktop b/dockerfile-kasm-ubuntu-focal-desktop similarity index 95% rename from dockerfile-kasm-ubuntu-bionic-desktop rename to dockerfile-kasm-ubuntu-focal-desktop index a2a2a4c..8ff043f 100644 --- a/dockerfile-kasm-ubuntu-bionic-desktop +++ b/dockerfile-kasm-ubuntu-focal-desktop @@ -1,5 +1,6 @@ ARG BASE_TAG="develop" -FROM kasmweb/core-ubuntu-bionic:$BASE_TAG +ARG PRIVATE="" +FROM kasmweb/core-ubuntu-focal$PRIVATE:$BASE_TAG USER root @@ -11,6 +12,7 @@ WORKDIR $HOME ENV DEBIAN_FRONTEND noninteractive ENV KASM_RX_HOME $STARTUPDIR/kasmrx ENV INST_SCRIPTS $STARTUPDIR/install +ENV BASE_IMAGE $BASE_IMAGE ### Install Tools @@ -91,7 +93,7 @@ COPY ./src/ubuntu/install/telegram $INST_SCRIPTS/telegram/ RUN bash $INST_SCRIPTS/telegram/install_telegram.sh && rm -rf $INST_SCRIPTS/telegram/ ### Remove maxmius -RUN apt-get remove -y maximus +RUN if [[ ${BASE_IMAGE} =~ "bionic" ]]; then apt-get remove -y maximus; fi; #ADD ./src/common/scripts $STARTUPDIR RUN $STARTUPDIR/set_user_permission.sh $HOME diff --git a/dockerfile-kasm-ubuntu-bionic-dind b/dockerfile-kasm-ubuntu-focal-dind similarity index 91% rename from dockerfile-kasm-ubuntu-bionic-dind rename to dockerfile-kasm-ubuntu-focal-dind index e906dff..7b5d698 100644 --- a/dockerfile-kasm-ubuntu-bionic-dind +++ b/dockerfile-kasm-ubuntu-focal-dind @@ -1,10 +1,12 @@ ARG BASE_TAG="develop" -FROM kasmweb/core-ubuntu-bionic:$BASE_TAG +ARG PRIVATE="" +FROM kasmweb/core-ubuntu-focal$PRIVATE:$BASE_TAG USER root ENV HOME /home/kasm-default-profile ENV STARTUPDIR /dockerstartup ENV INST_SCRIPTS $STARTUPDIR/install +ENV BASE_IMAGE $BASE_IMAGE WORKDIR $HOME ######### Customize Container Here ########### @@ -48,7 +50,7 @@ COPY ./src/ubuntu/install/chrome $INST_SCRIPTS/chrome/ RUN bash $INST_SCRIPTS/chrome/install_chrome.sh && rm -rf $INST_SCRIPTS/chrome/ ### Remove maxmius -RUN apt-get remove -y maximus +RUN if [[ ${BASE_IMAGE} =~ "bionic" ]]; then apt-get remove -y maximus; fi; ######### End Customizations ########### diff --git a/dockerfile-kasm-ubuntu-bionic-dind-rootless b/dockerfile-kasm-ubuntu-focal-dind-rootless similarity index 92% rename from dockerfile-kasm-ubuntu-bionic-dind-rootless rename to dockerfile-kasm-ubuntu-focal-dind-rootless index db5bbdd..a4ceaeb 100644 --- a/dockerfile-kasm-ubuntu-bionic-dind-rootless +++ b/dockerfile-kasm-ubuntu-focal-dind-rootless @@ -1,10 +1,12 @@ ARG BASE_TAG="develop" -FROM kasmweb/core-ubuntu-bionic:$BASE_TAG +ARG PRIVATE="" +FROM kasmweb/core-ubuntu-focal$PRIVATE:$BASE_TAG USER root ENV HOME /home/kasm-default-profile ENV STARTUPDIR /dockerstartup ENV INST_SCRIPTS $STARTUPDIR/install +ENV BASE_IMAGE $BASE_IMAGE WORKDIR $HOME ######### Customize Container Here ########### @@ -45,7 +47,7 @@ COPY ./src/ubuntu/install/chrome $INST_SCRIPTS/chrome/ RUN bash $INST_SCRIPTS/chrome/install_chrome.sh && rm -rf $INST_SCRIPTS/chrome/ ### Remove maxmius -RUN apt-get remove -y maximus +RUN if [[ ${BASE_IMAGE} =~ "bionic" ]]; then apt-get remove -y maximus; fi; RUN chown 1000:0 $HOME diff --git a/dockerfile-kasm-vlc b/dockerfile-kasm-vlc index 9a49343..f2e20ae 100644 --- a/dockerfile-kasm-vlc +++ b/dockerfile-kasm-vlc @@ -1,10 +1,12 @@ ARG BASE_TAG="develop" -FROM kasmweb/core-ubuntu-bionic:$BASE_TAG +ARG BASE_IMAGE="core-ubuntu-focal" +FROM kasmweb/$BASE_IMAGE:$BASE_TAG USER root ENV HOME /home/kasm-default-profile ENV STARTUPDIR /dockerstartup ENV INST_SCRIPTS $STARTUPDIR/install +ENV BASE_IMAGE $BASE_IMAGE WORKDIR $HOME ######### Customize Container Here ########### diff --git a/dockerfile-kasm-vmware-horizon b/dockerfile-kasm-vmware-horizon index eca746a..e5edc5a 100644 --- a/dockerfile-kasm-vmware-horizon +++ b/dockerfile-kasm-vmware-horizon @@ -1,10 +1,12 @@ ARG BASE_TAG="develop" -FROM kasmweb/core-ubuntu-bionic:$BASE_TAG +ARG BASE_IMAGE="core-ubuntu-focal" +FROM kasmweb/$BASE_IMAGE:$BASE_TAG USER root ENV HOME /home/kasm-default-profile ENV STARTUPDIR /dockerstartup ENV INST_SCRIPTS $STARTUPDIR/install +ENV BASE_IMAGE $BASE_IMAGE WORKDIR $HOME ######### Customize Container Here ########### diff --git a/dockerfile-kasm-vs-code b/dockerfile-kasm-vs-code index ac39e22..c6a3df2 100644 --- a/dockerfile-kasm-vs-code +++ b/dockerfile-kasm-vs-code @@ -1,10 +1,12 @@ ARG BASE_TAG="develop" -FROM kasmweb/core-ubuntu-bionic:$BASE_TAG +ARG BASE_IMAGE="core-ubuntu-focal" +FROM kasmweb/$BASE_IMAGE:$BASE_TAG USER root ENV HOME /home/kasm-default-profile ENV STARTUPDIR /dockerstartup ENV INST_SCRIPTS $STARTUPDIR/install +ENV BASE_IMAGE $BASE_IMAGE WORKDIR $HOME ######### Customize Container Here ########### diff --git a/dockerfile-kasm-zoom b/dockerfile-kasm-zoom index 2805c9c..9ca3f5f 100644 --- a/dockerfile-kasm-zoom +++ b/dockerfile-kasm-zoom @@ -1,10 +1,12 @@ ARG BASE_TAG="develop" -FROM kasmweb/core-ubuntu-bionic:$BASE_TAG +ARG BASE_IMAGE="core-ubuntu-focal" +FROM kasmweb/$BASE_IMAGE:$BASE_TAG USER root ENV HOME /home/kasm-default-profile ENV STARTUPDIR /dockerstartup ENV INST_SCRIPTS $STARTUPDIR/install +ENV BASE_IMAGE $BASE_IMAGE WORKDIR $HOME ######### Customize Container Here ########### diff --git a/dockerfile-kasm-zsnes b/dockerfile-kasm-zsnes index 77ec14b..e744c5e 100644 --- a/dockerfile-kasm-zsnes +++ b/dockerfile-kasm-zsnes @@ -1,10 +1,12 @@ ARG BASE_TAG="develop" -FROM kasmweb/core-ubuntu-bionic:$BASE_TAG +ARG BASE_IMAGE="core-ubuntu-focal" +FROM kasmweb/$BASE_IMAGE:$BASE_TAG USER root ENV HOME /home/kasm-default-profile ENV STARTUPDIR /dockerstartup ENV INST_SCRIPTS $STARTUPDIR/install +ENV BASE_IMAGE $BASE_IMAGE WORKDIR $HOME ######### Customize Container Here ########### diff --git a/docs/ubuntu-bionic-desktop/README.md b/docs/ubuntu-bionic-desktop/README.md deleted file mode 100644 index c7e6f63..0000000 --- a/docs/ubuntu-bionic-desktop/README.md +++ /dev/null @@ -1,7 +0,0 @@ -# About This Image - -This Image contains a browser-accessible Ubuntu Bionic Desktop with various productivity and development apps installed. - -![Screenshot][Image_Screenshot] - -[Image_Screenshot]: https://f.hubspotusercontent30.net/hubfs/5856039/dockerhub/image-screenshots/ubuntu-bionic-desktop.png "Image Screenshot" \ No newline at end of file diff --git a/docs/ubuntu-focal-desktop/README.md b/docs/ubuntu-focal-desktop/README.md new file mode 100644 index 0000000..8e2d681 --- /dev/null +++ b/docs/ubuntu-focal-desktop/README.md @@ -0,0 +1,7 @@ +# About This Image + +This Image contains a browser-accessible Ubuntu Focal Desktop with various productivity and development apps installed. + +![Screenshot][Image_Screenshot] + +[Image_Screenshot]: https://f.hubspotusercontent30.net/hubfs/5856039/dockerhub/image-screenshots/ubuntu-focal-desktop.png "Image Screenshot" \ No newline at end of file diff --git a/docs/ubuntu-bionic-desktop/description.txt b/docs/ubuntu-focal-desktop/description.txt similarity index 100% rename from docs/ubuntu-bionic-desktop/description.txt rename to docs/ubuntu-focal-desktop/description.txt diff --git a/docs/ubuntu-bionic-dind-rootless/README.md b/docs/ubuntu-focal-dind-rootless/README.md similarity index 100% rename from docs/ubuntu-bionic-dind-rootless/README.md rename to docs/ubuntu-focal-dind-rootless/README.md diff --git a/docs/ubuntu-bionic-dind-rootless/description.txt b/docs/ubuntu-focal-dind-rootless/description.txt similarity index 100% rename from docs/ubuntu-bionic-dind-rootless/description.txt rename to docs/ubuntu-focal-dind-rootless/description.txt diff --git a/docs/ubuntu-bionic-dind/README.md b/docs/ubuntu-focal-dind/README.md similarity index 100% rename from docs/ubuntu-bionic-dind/README.md rename to docs/ubuntu-focal-dind/README.md diff --git a/docs/ubuntu-bionic-dind/description.txt b/docs/ubuntu-focal-dind/description.txt similarity index 100% rename from docs/ubuntu-bionic-dind/description.txt rename to docs/ubuntu-focal-dind/description.txt diff --git a/src/ubuntu/install/brave/custom_startup.sh b/src/ubuntu/install/brave/custom_startup.sh index 7e7e423..a4cf851 100644 --- a/src/ubuntu/install/brave/custom_startup.sh +++ b/src/ubuntu/install/brave/custom_startup.sh @@ -2,8 +2,12 @@ set -ex START_COMMAND="brave-browser" PGREP="brave" -MAXIMUS="false" -DEFAULT_ARGS="--start-maximized" +MAXIMIZE="true" +DEFAULT_ARGS="" + +if [[ $MAXIMIZE == 'true' ]] ; then + DEFAULT_ARGS+=" --start-maximized" +fi ARGS=${APP_ARGS:-$DEFAULT_ARGS} options=$(getopt -o gau: -l go,assign,url: -n "$0" -- "$@") || exit @@ -53,10 +57,6 @@ kasm_startup() { if [ -z "$DISABLE_CUSTOM_STARTUP" ] || [ -n "$FORCE" ] ; then - if [[ $MAXIMUS == 'true' ]] ; then - maximus & - fi - while true do if ! pgrep -x $PGREP > /dev/null diff --git a/src/ubuntu/install/chrome/custom_startup.sh b/src/ubuntu/install/chrome/custom_startup.sh index 4a2ac33..a86870a 100644 --- a/src/ubuntu/install/chrome/custom_startup.sh +++ b/src/ubuntu/install/chrome/custom_startup.sh @@ -2,8 +2,12 @@ set -ex START_COMMAND="google-chrome" PGREP="chrome" -MAXIMUS="false" -DEFAULT_ARGS="--start-maximized" +MAXIMIZE="true" +DEFAULT_ARGS="" + +if [[ $MAXIMIZE == 'true' ]] ; then + DEFAULT_ARGS+=" --start-maximized" +fi ARGS=${APP_ARGS:-$DEFAULT_ARGS} options=$(getopt -o gau: -l go,assign,url: -n "$0" -- "$@") || exit @@ -53,10 +57,6 @@ kasm_startup() { if [ -z "$DISABLE_CUSTOM_STARTUP" ] || [ -n "$FORCE" ] ; then - if [[ $MAXIMUS == 'true' ]] ; then - maximus & - fi - while true do if ! pgrep -x $PGREP > /dev/null diff --git a/src/ubuntu/install/chrome_flash/install_flash.sh b/src/ubuntu/install/chrome_flash/install_flash.sh index f35d1d7..67ed71a 100644 --- a/src/ubuntu/install/chrome_flash/install_flash.sh +++ b/src/ubuntu/install/chrome_flash/install_flash.sh @@ -5,7 +5,7 @@ set -ex # Configure chrome to use the pre-installed version , otherwise it will try and fetch it itself the first time it is # used which requires internet access, and it may possibly be removed from being downloaded in the future. -echo "deb http://archive.canonical.com/ubuntu/ bionic partner" > /etc/apt/sources.list.d/canonical_partner.list +echo "deb http://archive.canonical.com/ubuntu/ $(lsb_release -cs) partner" > /etc/apt/sources.list.d/canonical_partner.list apt-get update apt-get install -y pepperflashplugin-nonfree rm /etc/apt/sources.list.d/canonical_partner.list diff --git a/src/ubuntu/install/chromium/custom_startup.sh b/src/ubuntu/install/chromium/custom_startup.sh index 945f169..5cfe44a 100644 --- a/src/ubuntu/install/chromium/custom_startup.sh +++ b/src/ubuntu/install/chromium/custom_startup.sh @@ -2,8 +2,12 @@ set -ex START_COMMAND="chromium-browser" PGREP="chromium" -MAXIMUS="false" -DEFAULT_ARGS="--start-maximized" +MAXIMIZE="true" +DEFAULT_ARGS="" + +if [[ $MAXIMIZE == 'true' ]] ; then + DEFAULT_ARGS+=" --start-maximized" +fi ARGS=${APP_ARGS:-$DEFAULT_ARGS} options=$(getopt -o gau: -l go,assign,url: -n "$0" -- "$@") || exit @@ -51,11 +55,7 @@ kasm_startup() { URL=$LAUNCH_URL fi - if [ -z "$DISABLE_CUSTOM_STARTUP" ] || [ -n "$FORCE" ] ; then - - if [[ $MAXIMUS == 'true' ]] ; then - maximus & - fi + if [ -z "$DISABLE_CUSTOM_STARTUP" ] || [ -n "$FORCE" ] ; then while true do diff --git a/src/ubuntu/install/chromium/install_chromium.sh b/src/ubuntu/install/chromium/install_chromium.sh index dbb4ce0..80af2e8 100644 --- a/src/ubuntu/install/chromium/install_chromium.sh +++ b/src/ubuntu/install/chromium/install_chromium.sh @@ -2,6 +2,7 @@ set -ex CHROME_ARGS="--password-store=basic --no-sandbox --ignore-gpu-blocklist --user-data-dir --no-first-run --simulate-outdated-no-au='Tue, 31 Dec 2099 23:59:59 GMT'" +ARCH=$(arch | sed 's/aarch64/arm64/g' | sed 's/x86_64/amd64/g') if [ "$DISTRO" = centos ]; then yum install -y chromium @@ -10,7 +11,46 @@ else apt-get update apt-get install -y software-properties-common apt-get remove -y chromium-browser-l10n chromium-codecs-ffmpeg chromium-browser - apt-get install -y chromium-browser + + # Chromium on Ubuntu 19.10 or newer uses snap to install which is not + # currently compatible with docker containers. The new install will pull + # deb files from archive.ubuntu.com for ubuntu 18.04 and install them. + # This will work until 18.04 goes to an unsupported status. + if [[ ${ARCH} == "amd64" ]] ; + then + chrome_url="http://archive.ubuntu.com/ubuntu/pool/universe/c/chromium-browser/" + else + chrome_url="http://ports.ubuntu.com/pool/universe/c/chromium-browser/" + fi + + chromium_codecs_data=$(curl ${chrome_url}) + chromium_codecs_data=$(grep "chromium-codecs-ffmpeg-extra_" <<< "${chromium_codecs_data}") + chromium_codecs_data=$(grep "18\.04" <<< "${chromium_codecs_data}") + chromium_codecs_data=$(grep "${ARCH}" <<< "${chromium_codecs_data}") + chromium_codecs_data=$(sed -n 's/.*.*//p' <<< "${chromium_codecs_data}") + echo "Chromium codec deb to download: ${chromium_codecs_data}" + + chromium_data=$(curl ${chrome_url}) + chromium_data=$(grep "chromium-browser_" <<< "${chromium_data}") + chromium_data=$(grep "18\.04" <<< "${chromium_data}") + chromium_data=$(grep "${ARCH}" <<< "${chromium_data}") + chromium_data=$(sed -n 's/.*.*//p' <<< "${chromium_data}") + echo "Chromium browser deb to download: ${chromium_data}" + + echo "The things to download" + echo "${chrome_url}${chromium_codecs_data}" + echo "${chrome_url}${chromium_data}" + + wget "${chrome_url}${chromium_codecs_data}" + wget "${chrome_url}${chromium_data}" + + apt-get install -y ./"${chromium_codecs_data}" + apt-get install -y ./"${chromium_data}" + + rm "${chromium_codecs_data}" + rm "${chromium_data}" fi sed -i 's/-stable//g' /usr/share/applications/chromium-browser.desktop diff --git a/src/ubuntu/install/dind/custom_startup.sh b/src/ubuntu/install/dind/custom_startup.sh index f757ba1..e5b9ddd 100644 --- a/src/ubuntu/install/dind/custom_startup.sh +++ b/src/ubuntu/install/dind/custom_startup.sh @@ -2,7 +2,8 @@ set -ex START_COMMAND="/usr/bin/supervisord" PGREP="supervisord" -MAXIMUS="false" +MAXIMIZE="false" +MAXIMIZE_SCRIPT=$STARTUPDIR/maximize_window.sh DEFAULT_ARGS="-n" ARGS=${APP_ARGS:-$DEFAULT_ARGS} @@ -26,6 +27,25 @@ done FORCE=$2 +kasm_exec() { + if [ -n "$OPT_URL" ] ; then + 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. + if [ -n "$URL" ] ; then + /usr/bin/filter_ready + /usr/bin/desktop_ready + bash ${MAXIMIZE_SCRIPT} & + sudo /usr/bin/supervisord -n & + else + echo "No URL specified for exec command. Doing nothing." + fi +} + kasm_startup() { if [ -n "$KASM_URL" ] ; then URL=$KASM_URL @@ -35,10 +55,6 @@ kasm_startup() { if [ -z "$DISABLE_CUSTOM_STARTUP" ] || [ -n "$FORCE" ] ; then - if [[ $MAXIMUS == 'true' ]] ; then - maximus & - fi - while true do if ! pgrep -x $PGREP > /dev/null @@ -46,6 +62,7 @@ kasm_startup() { /usr/bin/filter_ready /usr/bin/desktop_ready set +e + bash ${MAXIMIZE_SCRIPT} & sudo /usr/bin/supervisord -n & set -e fi diff --git a/src/ubuntu/install/dind_rootless/custom_startup.sh b/src/ubuntu/install/dind_rootless/custom_startup.sh index e8327f7..e655bc6 100644 --- a/src/ubuntu/install/dind_rootless/custom_startup.sh +++ b/src/ubuntu/install/dind_rootless/custom_startup.sh @@ -2,7 +2,8 @@ set -ex START_COMMAND="/home/kasm-user/bin/dockerd-rootless.sh" PGREP="dockerd" -MAXIMUS="false" +export MAXIMIZE="false" +MAXIMIZE_SCRIPT=$STARTUPDIR/maximize_window.sh DEFAULT_ARGS="" ARGS=${APP_ARGS:-$DEFAULT_ARGS} @@ -26,6 +27,25 @@ done FORCE=$2 +kasm_exec() { + if [ -n "$OPT_URL" ] ; then + 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. + if [ -n "$URL" ] ; then + /usr/bin/filter_ready + /usr/bin/desktop_ready + bash ${MAXIMIZE_SCRIPT} & + $START_COMMAND $ARGS + else + echo "No URL specified for exec command. Doing nothing." + fi +} + kasm_startup() { if [ -n "$KASM_URL" ] ; then URL=$KASM_URL @@ -46,7 +66,8 @@ kasm_startup() { /usr/bin/filter_ready /usr/bin/desktop_ready set +e - $START_COMMAND $ARGS + bash ${MAXIMIZE_SCRIPT} & + $START_COMMAND $ARGS set -e fi sleep 1 diff --git a/src/ubuntu/install/discord/custom_startup.sh b/src/ubuntu/install/discord/custom_startup.sh index e797409..98c5abb 100644 --- a/src/ubuntu/install/discord/custom_startup.sh +++ b/src/ubuntu/install/discord/custom_startup.sh @@ -2,7 +2,9 @@ set -ex START_COMMAND="/usr/share/discord/Discord" PGREP="Discord" -MAXIMUS="false" +export MAXIMIZE="true" +export MAXIMIZE_NAME="Discord" +MAXIMIZE_SCRIPT=$STARTUPDIR/maximize_window.sh DEFAULT_ARGS="--no-sandbox" ARGS=${APP_ARGS:-$DEFAULT_ARGS} @@ -38,6 +40,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." @@ -53,10 +56,6 @@ kasm_startup() { if [ -z "$DISABLE_CUSTOM_STARTUP" ] || [ -n "$FORCE" ] ; then - if [[ $MAXIMUS == 'true' ]] ; then - maximus & - fi - while true do if ! pgrep -x $PGREP > /dev/null @@ -64,9 +63,9 @@ kasm_startup() { /usr/bin/filter_ready /usr/bin/desktop_ready set +e + bash ${MAXIMIZE_SCRIPT} & $START_COMMAND $ARGS $URL & set -e - maximus & fi sleep 1 done diff --git a/src/ubuntu/install/discord/install_discord.sh b/src/ubuntu/install/discord/install_discord.sh index 27fe68e..fbe37ed 100644 --- a/src/ubuntu/install/discord/install_discord.sh +++ b/src/ubuntu/install/discord/install_discord.sh @@ -1,7 +1,10 @@ #!/usr/bin/env bash set -ex apt-get update -apt-get install -y maximus +if [[ "$(lsb_release -cs)" == "bionic" ]]; +then + apt-get install -y maximus +fi curl -L -o discord.deb "https://discord.com/api/download?platform=linux&format=deb" apt-get install -y ./discord.deb rm discord.deb diff --git a/src/ubuntu/install/doom/custom_startup.sh b/src/ubuntu/install/doom/custom_startup.sh index 22d627d..b5b5243 100644 --- a/src/ubuntu/install/doom/custom_startup.sh +++ b/src/ubuntu/install/doom/custom_startup.sh @@ -3,7 +3,8 @@ set -ex START_COMMAND="/usr/games/chocolate-doom" PGREP="chocolate-doom" DEFAULT_ARGS="" -MAXIMUS="false" +export MAXIMIZE="false" +MAXIMIZE_SCRIPT=$STARTUPDIR/maximize_window.sh ARGS=${APP_ARGS:-$DEFAULT_ARGS} options=$(getopt -o gau: -l go,assign,url: -n "$0" -- "$@") || exit @@ -38,6 +39,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." @@ -53,10 +55,6 @@ kasm_startup() { if [ -z "$DISABLE_CUSTOM_STARTUP" ] || [ -n "$FORCE" ] ; then - if [[ $MAXIMUS == 'true' ]] ; then - maximus & - fi - while true do if ! pgrep -x $PGREP > /dev/null @@ -65,6 +63,7 @@ kasm_startup() { /usr/bin/desktop_ready set +e source $STARTUPDIR/generate_container_user + bash ${MAXIMIZE_SCRIPT} & $START_COMMAND $ARGS $URL & set -e fi diff --git a/src/ubuntu/install/edge/custom_startup.sh b/src/ubuntu/install/edge/custom_startup.sh index c5eabdb..9220a0c 100644 --- a/src/ubuntu/install/edge/custom_startup.sh +++ b/src/ubuntu/install/edge/custom_startup.sh @@ -2,8 +2,12 @@ set -ex START_COMMAND="microsoft-edge" PGREP="msedge" -MAXIMUS="false" -DEFAULT_ARGS="--start-maximized" +MAXIMIZE="true" +DEFAULT_ARGS="" + +if [[ $MAXIMIZE == 'true' ]] ; then + DEFAULT_ARGS+=" --start-maximized" +fi ARGS=${APP_ARGS:-$DEFAULT_ARGS} options=$(getopt -o gau: -l go,assign,url: -n "$0" -- "$@") || exit @@ -55,10 +59,6 @@ kasm_startup() { if [ -z "$DISABLE_CUSTOM_STARTUP" ] || [ -n "$FORCE" ] ; then - if [[ $MAXIMUS == 'true' ]] ; then - maximus & - fi - while true do if ! pgrep -x $PGREP > /dev/null diff --git a/src/ubuntu/install/firefox/install_firefox.sh b/src/ubuntu/install/firefox/install_firefox.sh index 93dd2d9..3419f00 100644 --- a/src/ubuntu/install/firefox/install_firefox.sh +++ b/src/ubuntu/install/firefox/install_firefox.sh @@ -1,6 +1,8 @@ #!/usr/bin/env bash set -xe +ARCH=$(arch | sed 's/aarch64/arm64/g' | sed 's/x86_64/amd64/g') + set_centos_desktop_icon() { sed -i -e 's!Icon=.\+!Icon=/usr/share/icons/hicolor/48x48/apps/firefox.png!' "$HOME/Desktop/firefox.desktop" } @@ -18,10 +20,15 @@ fi if [ "$DISTRO" = centos ]; then yum clean all else - # Plugin to support running flash videos for sites like vimeo - apt-get install -y browser-plugin-freshplayer-pepperflash - apt-mark hold firefox - apt-get clean -y + if [ "$ARCH" == "arm64" ] && [ "$(lsb_release -cs)" == "focal" ] ; then + echo "Firefox flash player not supported on arm64 Ubuntu Focal Skipping" + else + # Plugin to support running flash videos for sites like vimeo + apt-get update + apt-get install -y browser-plugin-freshplayer-pepperflash + apt-mark hold firefox + apt-get clean -y + fi fi if [ "$DISTRO" != centos ]; then diff --git a/src/ubuntu/install/firefox_flash/install_flash.sh b/src/ubuntu/install/firefox_flash/install_flash.sh index e6072f3..2c21a90 100644 --- a/src/ubuntu/install/firefox_flash/install_flash.sh +++ b/src/ubuntu/install/firefox_flash/install_flash.sh @@ -5,7 +5,7 @@ set -ex # Update firefox to use the PPAPI plugin as it includes more features not available in the NPAPI versoin # https://help.ubuntu.com/18.04/ubuntu-help/net-install-flash.html.en -echo "deb http://archive.canonical.com/ubuntu/ bionic partner" > /etc/apt/sources.list.d/canonical_partner.list +echo "deb http://archive.canonical.com/ubuntu/ $(lsb_release -cs) partner" > /etc/apt/sources.list.d/canonical_partner.list apt-get update apt-get install -y browser-plugin-freshplayer-pepperflash adobe-flashplugin rm /etc/apt/sources.list.d/canonical_partner.list diff --git a/src/ubuntu/install/gimp/custom_startup.sh b/src/ubuntu/install/gimp/custom_startup.sh index 7bf8c8c..5060386 100644 --- a/src/ubuntu/install/gimp/custom_startup.sh +++ b/src/ubuntu/install/gimp/custom_startup.sh @@ -2,7 +2,9 @@ set -ex START_COMMAND="gimp" PGREP="gimp" -MAXIMUS="true" +export MAXIMIZE="true" +export MAXIMIZE_NAME="GNU Image Manipulation Program" +MAXIMIZE_SCRIPT=$STARTUPDIR/maximize_window.sh DEFAULT_ARGS="" ARGS=${APP_ARGS:-$DEFAULT_ARGS} @@ -38,6 +40,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." @@ -52,10 +55,6 @@ kasm_startup() { fi if [ -z "$DISABLE_CUSTOM_STARTUP" ] || [ -n "$FORCE" ] ; then - - if [[ $MAXIMUS == 'true' ]] ; then - maximus & - fi while true do @@ -64,6 +63,7 @@ kasm_startup() { /usr/bin/filter_ready /usr/bin/desktop_ready set +e + bash ${MAXIMIZE_SCRIPT} & $START_COMMAND $ARGS $URL set -e fi diff --git a/src/ubuntu/install/gimp/install_gimp.sh b/src/ubuntu/install/gimp/install_gimp.sh index f630a5d..3cecb4d 100644 --- a/src/ubuntu/install/gimp/install_gimp.sh +++ b/src/ubuntu/install/gimp/install_gimp.sh @@ -1,6 +1,10 @@ #!/usr/bin/env bash set -ex apt-get update -apt-get install -y gimp maximus +if [[ "$(lsb_release -cs)" == "bionic" ]]; +then + apt-get install -y maximus +fi +apt-get install -y gimp cp /usr/share/applications/gimp.desktop $HOME/Desktop/ chmod +x $HOME/Desktop/gimp.desktop \ No newline at end of file diff --git a/src/ubuntu/install/horizon/custom_startup.sh b/src/ubuntu/install/horizon/custom_startup.sh index 5b013dd..c3cc730 100644 --- a/src/ubuntu/install/horizon/custom_startup.sh +++ b/src/ubuntu/install/horizon/custom_startup.sh @@ -2,8 +2,11 @@ set -ex START_COMMAND="vmware-view" PGREP="vmware-view" -MAXIMUS="false" -DEFAULT_ARGS="--fullscreen" +export MAXIMIZE="true" +export MAXIMIZE_NAME="VMware Horizon Client" +MAXIMIZE_SCRIPT=$STARTUPDIR/maximize_window.sh +DEFAULT_ARGS="" + ARGS=${APP_ARGS:-$DEFAULT_ARGS} options=$(getopt -o gau: -l go,assign,url: -n "$0" -- "$@") || exit @@ -38,6 +41,7 @@ kasm_exec() { if [ -n "$URL" ] ; then /usr/bin/filter_ready /usr/bin/desktop_ready + bash ${MAXIMIZE_SCRIPT} & cd $HOME $START_COMMAND $ARGS $OPT_URL else @@ -54,16 +58,13 @@ kasm_startup() { if [ -z "$DISABLE_CUSTOM_STARTUP" ] || [ -n "$FORCE" ] ; then - if [[ $MAXIMUS == 'true' ]] ; then - maximus & - fi - while true do if ! pgrep -x $PGREP > /dev/null then /usr/bin/filter_ready /usr/bin/desktop_ready + bash ${MAXIMIZE_SCRIPT} & cd $HOME set +e $START_COMMAND $ARGS $URL diff --git a/src/ubuntu/install/horizon/install_horizons.sh b/src/ubuntu/install/horizon/install_horizons.sh index baffdd1..867327a 100644 --- a/src/ubuntu/install/horizon/install_horizons.sh +++ b/src/ubuntu/install/horizon/install_horizons.sh @@ -5,7 +5,7 @@ apt-get update apt-get install -y rdesktop -wget https://download3.vmware.com/software/view/viewclients/CART22FQ1/VMware-Horizon-Client-2103-8.2.0-17742757.x64.bundle -O horizons.bundle +wget https://download3.vmware.com/software/view/viewclients/CART22FH2/VMware-Horizon-Client-2111-8.4.0-18957622.x64.bundle -O horizons.bundle chmod +x ./horizons.bundle export TERM=dumb diff --git a/src/ubuntu/install/insomnia/custom_startup.sh b/src/ubuntu/install/insomnia/custom_startup.sh index 3937275..36c185a 100644 --- a/src/ubuntu/install/insomnia/custom_startup.sh +++ b/src/ubuntu/install/insomnia/custom_startup.sh @@ -2,7 +2,9 @@ set -ex START_COMMAND="insomnia" PGREP="insomnia" -MAXIMUS="true" +export MAXIMIZE="true" +export MAXIMIZE_NAME="Insomnia" +MAXIMIZE_SCRIPT=$STARTUPDIR/maximize_window.sh DEFAULT_ARGS="--no-sandbox" ARGS=${APP_ARGS:-$DEFAULT_ARGS} @@ -38,6 +40,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." @@ -53,10 +56,6 @@ kasm_startup() { if [ -z "$DISABLE_CUSTOM_STARTUP" ] || [ -n "$FORCE" ] ; then - if [[ $MAXIMUS == 'true' ]] ; then - maximus & - fi - while true do if ! pgrep -x $PGREP > /dev/null @@ -64,6 +63,7 @@ kasm_startup() { /usr/bin/filter_ready /usr/bin/desktop_ready set +e + bash ${MAXIMIZE_SCRIPT} & $START_COMMAND $ARGS $URL set -e fi diff --git a/src/ubuntu/install/insomnia/install_insomnia.sh b/src/ubuntu/install/insomnia/install_insomnia.sh index a9b3cd0..af92123 100644 --- a/src/ubuntu/install/insomnia/install_insomnia.sh +++ b/src/ubuntu/install/insomnia/install_insomnia.sh @@ -11,4 +11,7 @@ chown 1000:1000 $HOME/Desktop/insomnia.desktop rm insomnia.deb # Conveniences for python development -apt-get install -y maximus +if [[ "$(lsb_release -cs)" == "bionic" ]]; +then + apt-get install -y maximus +fi diff --git a/src/ubuntu/install/keeper/install_keeper.sh b/src/ubuntu/install/keeper/install_keeper.sh index bd7c13d..211f25d 100644 --- a/src/ubuntu/install/keeper/install_keeper.sh +++ b/src/ubuntu/install/keeper/install_keeper.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash set -ex apt-get update -wget https://www.keepersecurity.com/desktop_electron/Linux/repo/deb/keeperpasswordmanager_15.0.9_amd64.deb -O keeper.deb +wget https://www.keepersecurity.com/desktop_electron/Linux/repo/deb/keeperpasswordmanager_16.4.4_amd64.deb -O keeper.deb apt-get install -y ./keeper.deb rm -rf keeper.deb sed -i 's@^Exec=.*@Exec=keeperpasswordmanager --no-sandbox %U@g' /usr/share/applications/keeperpasswordmanager.desktop diff --git a/src/ubuntu/install/maltego/custom_startup.sh b/src/ubuntu/install/maltego/custom_startup.sh index 37fc9a8..0432b52 100644 --- a/src/ubuntu/install/maltego/custom_startup.sh +++ b/src/ubuntu/install/maltego/custom_startup.sh @@ -2,7 +2,8 @@ set -ex START_COMMAND="/usr/bin/maltego" PGREP="maltego" -MAXIMUS="false" +export MAXIMIZE="false" +MAXIMIZE_SCRIPT=$STARTUPDIR/maximize_window.sh DEFAULT_ARGS="" ARGS=${APP_ARGS:-$DEFAULT_ARGS} @@ -38,6 +39,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." @@ -53,10 +55,6 @@ kasm_startup() { if [ -z "$DISABLE_CUSTOM_STARTUP" ] || [ -n "$FORCE" ] ; then - if [[ $MAXIMUS == 'true' ]] ; then - maximus & - fi - while true do if ! pgrep -x $PGREP > /dev/null @@ -64,6 +62,7 @@ kasm_startup() { /usr/bin/filter_ready /usr/bin/desktop_ready set +e + bash ${MAXIMIZE_SCRIPT} & $START_COMMAND $ARGS $URL set -e fi diff --git a/src/ubuntu/install/mobile/configure_mobile.sh b/src/ubuntu/install/mobile/configure_mobile.sh index 2cd7e17..41ffa88 100644 --- a/src/ubuntu/install/mobile/configure_mobile.sh +++ b/src/ubuntu/install/mobile/configure_mobile.sh @@ -9,7 +9,7 @@ set -ex # unclutter - Remove Mouse Cursor. This configuration will remove the cursor except for briefly when its clicked apt-get update -apt-get install -y dconf-tools libglib2.0-bin mousetweaks onboard unclutter +apt-get install -y dconf-cli dconf-editor libglib2.0-bin mousetweaks onboard unclutter rm -f /etc/xdg/autostart/orca-autostart.desktop diff --git a/src/ubuntu/install/only_office/custom_startup.sh b/src/ubuntu/install/only_office/custom_startup.sh index b5d5971..4b6706e 100644 --- a/src/ubuntu/install/only_office/custom_startup.sh +++ b/src/ubuntu/install/only_office/custom_startup.sh @@ -2,7 +2,9 @@ set -ex START_COMMAND="onlyoffice-desktopeditors" PGREP="DesktopEditors" -MAXIMUS="true" +export MAXIMIZE="true" +export MAXIMIZE_NAME="DesktopEditors" +MAXIMIZE_SCRIPT=$STARTUPDIR/maximize_window.sh DEFAULT_ARGS="--system-title-bar" ARGS=${APP_ARGS:-$DEFAULT_ARGS} @@ -38,6 +40,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." @@ -53,10 +56,6 @@ kasm_startup() { if [ -z "$DISABLE_CUSTOM_STARTUP" ] || [ -n "$FORCE" ] ; then - if [[ $MAXIMUS == 'true' ]] ; then - maximus & - fi - while true do if ! pgrep -x $PGREP > /dev/null @@ -64,6 +63,7 @@ kasm_startup() { /usr/bin/filter_ready /usr/bin/desktop_ready set +e + bash ${MAXIMIZE_SCRIPT} & $START_COMMAND $ARGS $URL set -e fi diff --git a/src/ubuntu/install/only_office/install_only_office.sh b/src/ubuntu/install/only_office/install_only_office.sh index 3f4118e..57eab8b 100644 --- a/src/ubuntu/install/only_office/install_only_office.sh +++ b/src/ubuntu/install/only_office/install_only_office.sh @@ -18,5 +18,8 @@ chmod +x $HOME/Desktop/onlyoffice-desktopeditors.desktop # KASM-1541 sed -i 's#/usr/bin/onlyoffice-desktopeditors %U$#bash -c "source ~/.bashrc \&\& /usr/bin/onlyoffice-desktopeditors %U"#' /usr/share/applications/onlyoffice-desktopeditors.desktop -apt-get update -apt-get install -y maximus +if [[ "$(lsb_release -cs)" == "bionic" ]]; +then + apt-get update + apt-get install -y maximus +fi diff --git a/src/ubuntu/install/postman/custom_startup.sh b/src/ubuntu/install/postman/custom_startup.sh index fd870b3..febdb0d 100644 --- a/src/ubuntu/install/postman/custom_startup.sh +++ b/src/ubuntu/install/postman/custom_startup.sh @@ -2,7 +2,9 @@ set -ex START_COMMAND="/opt/Postman/Postman" PGREP="Postman" -MAXIMUS="true" +export MAXIMIZE="true" +export MAXIMIZE_NAME="Postman" +MAXIMIZE_SCRIPT=$STARTUPDIR/maximize_window.sh DEFAULT_ARGS="" ARGS=${APP_ARGS:-$DEFAULT_ARGS} @@ -38,6 +40,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." @@ -53,10 +56,6 @@ kasm_startup() { if [ -z "$DISABLE_CUSTOM_STARTUP" ] || [ -n "$FORCE" ] ; then - if [[ $MAXIMUS == 'true' ]] ; then - maximus & - fi - while true do if ! pgrep -x $PGREP > /dev/null @@ -64,6 +63,7 @@ kasm_startup() { /usr/bin/filter_ready /usr/bin/desktop_ready set +e + bash ${MAXIMIZE_SCRIPT} & $START_COMMAND $ARGS $URL set -e fi diff --git a/src/ubuntu/install/postman/install_postman.sh b/src/ubuntu/install/postman/install_postman.sh index b14369c..ab2c6e1 100644 --- a/src/ubuntu/install/postman/install_postman.sh +++ b/src/ubuntu/install/postman/install_postman.sh @@ -20,6 +20,8 @@ cp /usr/share/applications/postman.desktop $HOME/Desktop/postman.desktop chmod +x $HOME/Desktop/postman.desktop chown 1000:1000 $HOME/Desktop/postman.desktop - -apt-get update -apt-get install -y maximus +if [[ "$(lsb_release -cs)" == "bionic" ]]; +then + apt-get update + apt-get install -y maximus +fi diff --git a/src/ubuntu/install/rdesktop/custom_startup.sh b/src/ubuntu/install/rdesktop/custom_startup.sh index 6649c24..46bfe03 100644 --- a/src/ubuntu/install/rdesktop/custom_startup.sh +++ b/src/ubuntu/install/rdesktop/custom_startup.sh @@ -2,7 +2,8 @@ set -ex START_COMMAND="rdesktop" PGREP="rdesktop" -MAXIMUS="false" +export MAXIMIZE="false" +MAXIMIZE_SCRIPT=$STARTUPDIR/maximize_window.sh DEFAULT_ARGS="-f localhost " ARGS=${APP_ARGS:-$DEFAULT_ARGS} @@ -38,6 +39,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." @@ -53,10 +55,6 @@ kasm_startup() { if [ -z "$DISABLE_CUSTOM_STARTUP" ] || [ -n "$FORCE" ] ; then - if [[ $MAXIMUS == 'true' ]] ; then - maximus & - fi - while true do if ! pgrep -x $PGREP > /dev/null @@ -65,6 +63,7 @@ kasm_startup() { /usr/bin/filter_ready /usr/bin/desktop_ready set +e + bash ${MAXIMIZE_SCRIPT} & $START_COMMAND $ARGS $URL set -e fi diff --git a/src/ubuntu/install/remmina/custom_startup.sh b/src/ubuntu/install/remmina/custom_startup.sh index 213c4a4..70644f8 100644 --- a/src/ubuntu/install/remmina/custom_startup.sh +++ b/src/ubuntu/install/remmina/custom_startup.sh @@ -3,7 +3,8 @@ set -ex START_COMMAND="remmina" PGREP="remmina" DEFAULT_ARGS="" -MAXIMUS="false" +export MAXIMIZE="false" +MAXIMIZE_SCRIPT=$STARTUPDIR/maximize_window.sh ARGS=${APP_ARGS:-$DEFAULT_ARGS} update_profile() { @@ -51,6 +52,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." @@ -66,10 +68,6 @@ kasm_startup() { if [ -z "$DISABLE_CUSTOM_STARTUP" ] || [ -n "$FORCE" ] ; then - if [[ $MAXIMUS == 'true' ]] ; then - maximus & - fi - while true do if ! pgrep -x $PGREP > /dev/null @@ -77,6 +75,7 @@ kasm_startup() { /usr/bin/filter_ready /usr/bin/desktop_ready set +e + bash ${MAXIMIZE_SCRIPT} & update_profile $START_COMMAND $ARGS $URL $REMMINA_PROFILE set -e diff --git a/src/ubuntu/install/signal/custom_startup.sh b/src/ubuntu/install/signal/custom_startup.sh index 313fb2c..300a8a0 100644 --- a/src/ubuntu/install/signal/custom_startup.sh +++ b/src/ubuntu/install/signal/custom_startup.sh @@ -3,7 +3,9 @@ set -ex START_COMMAND="signal-desktop" PGREP="signal-desktop" DEFAULT_ARGS="--no-sandbox" -MAXIMUS="true" +export MAXIMIZE="true" +export MAXIMIZE_NAME="Signal" +MAXIMIZE_SCRIPT=$STARTUPDIR/maximize_window.sh ARGS=${APP_ARGS:-$DEFAULT_ARGS} options=$(getopt -o gau: -l go,assign,url: -n "$0" -- "$@") || exit @@ -38,6 +40,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." @@ -53,10 +56,6 @@ kasm_startup() { if [ -z "$DISABLE_CUSTOM_STARTUP" ] || [ -n "$FORCE" ]; then - if [[ $MAXIMUS == 'true' ]] ; then - maximus & - fi - while true do if ! pgrep -x $PGREP > /dev/null @@ -64,6 +63,7 @@ kasm_startup() { /usr/bin/filter_ready /usr/bin/desktop_ready set +e + bash ${MAXIMIZE_SCRIPT} & $START_COMMAND $ARGS $URL set -e fi diff --git a/src/ubuntu/install/signal/install_signal.sh b/src/ubuntu/install/signal/install_signal.sh index 59d0438..90cd6f3 100644 --- a/src/ubuntu/install/signal/install_signal.sh +++ b/src/ubuntu/install/signal/install_signal.sh @@ -8,9 +8,14 @@ if [ "${ARCH}" == "arm64" ] ; then fi +# Signal only releases its desktop app under the xenial release, however it is compatible with all versions of Debian and Ubuntu that we support. wget -O- https://updates.signal.org/desktop/apt/keys.asc | apt-key add - echo "deb [arch=${ARCH}] https://updates.signal.org/desktop/apt xenial main" | tee -a /etc/apt/sources.list.d/signal-xenial.list apt-get update -apt-get install -y signal-desktop maximus +if [[ "$(lsb_release -cs)" == "bionic" ]]; +then + apt-get install -y maximus +fi +apt-get install -y signal-desktop cp /usr/share/applications/signal-desktop.desktop $HOME/Desktop/ chmod +x $HOME/Desktop/signal-desktop.desktop diff --git a/src/ubuntu/install/slack/custom_startup.sh b/src/ubuntu/install/slack/custom_startup.sh index 61ffb60..659ffc0 100644 --- a/src/ubuntu/install/slack/custom_startup.sh +++ b/src/ubuntu/install/slack/custom_startup.sh @@ -2,7 +2,9 @@ set -ex START_COMMAND="slack" PGREP="slack" -MAXIMUS="true" +export MAXIMIZE="true" +export MAXIMIZE_NAME="Slack" +MAXIMIZE_SCRIPT=$STARTUPDIR/maximize_window.sh DEFAULT_ARGS="--no-sandbox" ARGS=${APP_ARGS:-$DEFAULT_ARGS} @@ -38,6 +40,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." @@ -53,10 +56,6 @@ kasm_startup() { if [ -z "$DISABLE_CUSTOM_STARTUP" ] || [ -n "$FORCE" ] ; then - if [[ $MAXIMUS == 'true' ]] ; then - maximus & - fi - while true do if ! pgrep -x $PGREP > /dev/null @@ -64,6 +63,7 @@ kasm_startup() { /usr/bin/filter_ready /usr/bin/desktop_ready set +e + bash ${MAXIMIZE_SCRIPT} & $START_COMMAND $ARGS $URL set -e fi diff --git a/src/ubuntu/install/slack/install_slack.sh b/src/ubuntu/install/slack/install_slack.sh index d80ef83..40a4c7c 100644 --- a/src/ubuntu/install/slack/install_slack.sh +++ b/src/ubuntu/install/slack/install_slack.sh @@ -7,11 +7,27 @@ if [ "${ARCH}" == "arm64" ] ; then exit 0 fi -wget -q https://downloads.slack-edge.com/linux_releases/slack-desktop-4.3.2-${ARCH}.deb +# This might prove fragile depending on how often slack changes it's +# website though they don't have a link to always getting the latest version. +# Perhaps a python script that parses the XML could be more robust +#slack_data=$(curl "https://slack.com/downloads/linux") +#version_data=$(grep -oPm1 '(?<=)[^<]+' <<< $slack_data) +#version=$(sed -n -e 's/Version //p' <<< $version_data) +#echo "Determined slack latest version to be: ${version}" + +# slack latest does not run with --no-sandbox, so we have to hard code to an older version. +version=4.12.2 + + +# This path may not be accurate once arm64 support arrives. Specifically I don't know if it will still be under x64 +wget -q https://downloads.slack-edge.com/releases/linux/${version}/prod/x64/slack-desktop-${version}-${ARCH}.deb apt-get update -apt-get install -y maximus -apt-get install -y ./slack-desktop-4.3.2-${ARCH}.deb -rm slack-desktop-4.3.2-${ARCH}.deb +if [[ "$(lsb_release -cs)" == "bionic" ]]; +then + apt-get install -y maximus +fi +apt-get install -y ./slack-desktop-${version}-${ARCH}.deb +rm slack-desktop-${version}-${ARCH}.deb sed -i 's,/usr/bin/slack,/usr/bin/slack --no-sandbox,g' /usr/share/applications/slack.desktop cp /usr/share/applications/slack.desktop $HOME/Desktop/ chmod +x $HOME/Desktop/slack.desktop diff --git a/src/ubuntu/install/steam/custom_startup.sh b/src/ubuntu/install/steam/custom_startup.sh index fe69f95..a91c0ee 100644 --- a/src/ubuntu/install/steam/custom_startup.sh +++ b/src/ubuntu/install/steam/custom_startup.sh @@ -2,7 +2,9 @@ set -ex START_COMMAND="/usr/games/steam" PGREP="steam" -MAXIMUS="true" +# we used to maximize steam, but the window titles show up as N/A, I can't distingush between the main window and the chat window. +export MAXIMIZE="false" +MAXIMIZE_SCRIPT=$STARTUPDIR/maximize_window.sh DEFAULT_ARGS="" ARGS=${APP_ARGS:-$DEFAULT_ARGS} @@ -38,6 +40,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." @@ -53,10 +56,6 @@ kasm_startup() { if [ -z "$DISABLE_CUSTOM_STARTUP" ] || [ -n "$FORCE" ] ; then - if [[ $MAXIMUS == 'true' ]] ; then - maximus & - fi - while true do if ! pgrep -x $PGREP > /dev/null @@ -64,6 +63,7 @@ kasm_startup() { /usr/bin/filter_ready /usr/bin/desktop_ready set +e + bash ${MAXIMIZE_SCRIPT} & $START_COMMAND $ARGS $URL set -e fi diff --git a/src/ubuntu/install/steam/install_steam.sh b/src/ubuntu/install/steam/install_steam.sh index d25eb4d..e9228ff 100644 --- a/src/ubuntu/install/steam/install_steam.sh +++ b/src/ubuntu/install/steam/install_steam.sh @@ -2,7 +2,11 @@ set -ex dpkg --add-architecture i386 apt-get update -apt-get install -y steam-installer maximus +if [[ "$(lsb_release -cs)" == "bionic" ]]; +then + apt-get install -y maximus +fi +apt-get install -y steam-installer cp /usr/share/applications/steam.desktop $HOME/Desktop/ chmod +x $HOME/Desktop/steam.desktop chown 1000:1000 $HOME/Desktop/steam.desktop diff --git a/src/ubuntu/install/sublime_text/custom_startup.sh b/src/ubuntu/install/sublime_text/custom_startup.sh index dede27b..875a93c 100644 --- a/src/ubuntu/install/sublime_text/custom_startup.sh +++ b/src/ubuntu/install/sublime_text/custom_startup.sh @@ -2,7 +2,9 @@ set -ex START_COMMAND="/opt/sublime_text/sublime_text" PGREP="sublime_text" -MAXIMUS="true" +export MAXIMIZE="true" +export MAXIMIZE_NAME="Sublime" +MAXIMIZE_SCRIPT=$STARTUPDIR/maximize_window.sh DEFAULT_ARGS="" ARGS=${APP_ARGS:-$DEFAULT_ARGS} @@ -38,6 +40,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." @@ -52,10 +55,6 @@ kasm_startup() { fi if [ -z "$DISABLE_CUSTOM_STARTUP" ] || [ -n "$FORCE" ] ; then - - if [[ $MAXIMUS == 'true' ]] ; then - maximus & - fi while true do @@ -64,6 +63,7 @@ kasm_startup() { /usr/bin/filter_ready /usr/bin/desktop_ready set +e + bash ${MAXIMIZE_SCRIPT} & $START_COMMAND $ARGS $URL set -e fi diff --git a/src/ubuntu/install/sublime_text/install_sublime_text.sh b/src/ubuntu/install/sublime_text/install_sublime_text.sh index b935d95..d0c4313 100644 --- a/src/ubuntu/install/sublime_text/install_sublime_text.sh +++ b/src/ubuntu/install/sublime_text/install_sublime_text.sh @@ -12,7 +12,13 @@ wget -qO - https://download.sublimetext.com/sublimehq-pub.gpg | apt-key add - apt-get install -y apt-transport-https echo "deb https://download.sublimetext.com/ apt/stable/" | tee /etc/apt/sources.list.d/sublime-text.list apt-get update -apt-get install -y sublime-text maximus + +if [[ "$(lsb_release -cs)" == "bionic" ]]; +then + apt-get install -y maximus +fi +apt-get install -y sublime-text + cp /usr/share/applications/sublime_text.desktop $HOME/Desktop/ chmod +x $HOME/Desktop/sublime_text.desktop chown 1000:1000 $HOME/Desktop/sublime_text.desktop diff --git a/src/ubuntu/install/teams/custom_startup.sh b/src/ubuntu/install/teams/custom_startup.sh index e416f8c..a156107 100644 --- a/src/ubuntu/install/teams/custom_startup.sh +++ b/src/ubuntu/install/teams/custom_startup.sh @@ -2,7 +2,9 @@ set -ex START_COMMAND="teams" PGREP="teams" -MAXIMUS="true" +export MAXIMIZE="true" +export MAXIMIZE_NAME="Teams" +MAXIMIZE_SCRIPT=$STARTUPDIR/maximize_window.sh DEFAULT_ARGS="--no-sandbox" ARGS=${APP_ARGS:-$DEFAULT_ARGS} @@ -38,6 +40,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." @@ -53,10 +56,6 @@ kasm_startup() { if [ -z "$DISABLE_CUSTOM_STARTUP" ] || [ -n "$FORCE" ] ; then - if [[ $MAXIMUS == 'true' ]] ; then - maximus & - fi - while true do if ! pgrep -x $PGREP > /dev/null @@ -64,6 +63,7 @@ kasm_startup() { /usr/bin/filter_ready /usr/bin/desktop_ready set +e + bash ${MAXIMIZE_SCRIPT} & $START_COMMAND $ARGS $URL set -e fi diff --git a/src/ubuntu/install/telegram/custom_startup.sh b/src/ubuntu/install/telegram/custom_startup.sh index 7578de2..0f4e297 100644 --- a/src/ubuntu/install/telegram/custom_startup.sh +++ b/src/ubuntu/install/telegram/custom_startup.sh @@ -2,7 +2,8 @@ set -ex START_COMMAND="/opt/Telegram/Telegram" PGREP="Telegram" -MAXIMUS="false" +export MAXIMIZE="false" +MAXIMIZE_SCRIPT=$STARTUPDIR/maximize_window.sh DEFAULT_ARGS="--no-sandbox" ARGS=${APP_ARGS:-$DEFAULT_ARGS} @@ -38,6 +39,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." @@ -53,10 +55,6 @@ kasm_startup() { if [ -z "$DISABLE_CUSTOM_STARTUP" ] || [ -n "$FORCE" ] ; then - if [[ $MAXIMUS == 'true' ]] ; then - maximus & - fi - while true do if ! pgrep -x $PGREP > /dev/null @@ -64,6 +62,7 @@ kasm_startup() { /usr/bin/filter_ready /usr/bin/desktop_ready set +e + bash ${MAXIMIZE_SCRIPT} & $START_COMMAND $ARGS $URL set -e fi diff --git a/src/ubuntu/install/terminal/custom_startup.sh b/src/ubuntu/install/terminal/custom_startup.sh index 2358205..fe86420 100644 --- a/src/ubuntu/install/terminal/custom_startup.sh +++ b/src/ubuntu/install/terminal/custom_startup.sh @@ -2,8 +2,10 @@ set -ex START_COMMAND="xfce4-terminal" PGREP="xfce4-terminal " -MAXIMUS="false" -DEFAULT_ARGS="--fullscreen --hide-borders --hide-menubar --zoom=-1 --hide-scrollbar" +export MAXIMIZE="true" +export MAXIMIZE_NAME="Terminal" +MAXIMIZE_SCRIPT=$STARTUPDIR/maximize_window.sh +DEFAULT_ARGS="--hide-borders --hide-menubar --zoom=-1 --hide-scrollbar" ARGS=${APP_ARGS:-$DEFAULT_ARGS} options=$(getopt -o gau: -l go,assign,url: -n "$0" -- "$@") || exit @@ -38,6 +40,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." @@ -53,10 +56,6 @@ kasm_startup() { if [ -z "$DISABLE_CUSTOM_STARTUP" ] || [ -n "$FORCE" ] ; then - if [[ $MAXIMUS == 'true' ]] ; then - maximus & - fi - while true do if ! pgrep -x $PGREP > /dev/null @@ -64,6 +63,7 @@ kasm_startup() { /usr/bin/filter_ready /usr/bin/desktop_ready set +e + bash ${MAXIMIZE_SCRIPT} & cd $HOME $START_COMMAND $ARGS $URL set -e diff --git a/src/ubuntu/install/torbrowser/custom_startup.sh b/src/ubuntu/install/torbrowser/custom_startup.sh index 28aced4..8263e1d 100644 --- a/src/ubuntu/install/torbrowser/custom_startup.sh +++ b/src/ubuntu/install/torbrowser/custom_startup.sh @@ -2,7 +2,8 @@ set -ex START_COMMAND="$HOME/tor-browser/tor-browser_en-US/Browser/start-tor-browser" PGREP="firefox.real" -MAXIMUS="false" +export MAXIMIZE="false" +MAXIMIZE_SCRIPT=$STARTUPDIR/maximize_window.sh DEFAULT_ARGS="--detach --allow-remote --new-tab" ARGS=${APP_ARGS:-$DEFAULT_ARGS} @@ -39,6 +40,7 @@ kasm_exec() { /usr/bin/filter_ready /usr/bin/desktop_ready set +e + bash ${MAXIMIZE_SCRIPT} & $START_COMMAND $ARGS $OPT_URL set -e else @@ -54,10 +56,6 @@ kasm_startup() { fi if [ -z "$DISABLE_CUSTOM_STARTUP" ] || [ -n "$FORCE" ] ; then - - if [[ $MAXIMUS == 'true' ]] ; then - maximus & - fi while true do @@ -66,6 +64,7 @@ kasm_startup() { /usr/bin/filter_ready /usr/bin/desktop_ready set +e + bash ${MAXIMIZE_SCRIPT} & $START_COMMAND $ARGS $URL set -e fi diff --git a/src/ubuntu/install/tracelabs/install_tracelabs.sh b/src/ubuntu/install/tracelabs/install_tracelabs.sh index ccaeead..51741f0 100644 --- a/src/ubuntu/install/tracelabs/install_tracelabs.sh +++ b/src/ubuntu/install/tracelabs/install_tracelabs.sh @@ -35,6 +35,8 @@ chown -R 1000:1000 \ /usr/share/OnionSearch \ /usr/share/toutatis +apt-get install -y python3-pip + pip3 install --force-reinstall zope.event sed -i 's/sudo //g' /usr/share/applications/tl*.desktop diff --git a/src/ubuntu/install/vlc/custom_startup.sh b/src/ubuntu/install/vlc/custom_startup.sh index 30413d7..b7fd5b7 100644 --- a/src/ubuntu/install/vlc/custom_startup.sh +++ b/src/ubuntu/install/vlc/custom_startup.sh @@ -2,7 +2,9 @@ set -ex START_COMMAND="vlc" PGREP="vlc" -MAXIMUS="true" +export MAXIMIZE="true" +export MAXIMIZE_NAME="VLC" +MAXIMIZE_SCRIPT=$STARTUPDIR/maximize_window.sh DEFAULT_ARGS="--no-metadata-network-access --no-qt-privacy-ask" ARGS=${APP_ARGS:-$DEFAULT_ARGS} @@ -38,6 +40,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." @@ -52,10 +55,6 @@ kasm_startup() { fi if [ -z "$DISABLE_CUSTOM_STARTUP" ] || [ -n "$FORCE" ] ; then - - if [[ $MAXIMUS == 'true' ]] ; then - maximus & - fi while true do @@ -64,6 +63,7 @@ kasm_startup() { /usr/bin/filter_ready /usr/bin/desktop_ready set +e + bash ${MAXIMIZE_SCRIPT} & $START_COMMAND $ARGS $URL set -e fi diff --git a/src/ubuntu/install/vlc/install_vlc.sh b/src/ubuntu/install/vlc/install_vlc.sh index 34a396c..eab3a87 100644 --- a/src/ubuntu/install/vlc/install_vlc.sh +++ b/src/ubuntu/install/vlc/install_vlc.sh @@ -1,4 +1,8 @@ #!/usr/bin/env bash set -ex apt-get update -apt-get install -y vlc maximus \ No newline at end of file +if [[ "$(lsb_release -cs)" == "bionic" ]]; +then + apt-get install -y maximus +fi +apt-get install -y vlc \ No newline at end of file diff --git a/src/ubuntu/install/vs_code/custom_startup.sh b/src/ubuntu/install/vs_code/custom_startup.sh index 54204f2..81ed24c 100644 --- a/src/ubuntu/install/vs_code/custom_startup.sh +++ b/src/ubuntu/install/vs_code/custom_startup.sh @@ -2,7 +2,9 @@ set -ex START_COMMAND="code" PGREP="code" -MAXIMUS="true" +export MAXIMIZE="true" +export MAXIMIZE_NAME="Visual Studio Code" +MAXIMIZE_SCRIPT=$STARTUPDIR/maximize_window.sh DEFAULT_ARGS="--no-sandbox" ARGS=${APP_ARGS:-$DEFAULT_ARGS} @@ -38,6 +40,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." @@ -53,10 +56,6 @@ kasm_startup() { if [ -z "$DISABLE_CUSTOM_STARTUP" ] || [ -n "$FORCE" ] ; then - if [[ $MAXIMUS == 'true' ]] ; then - maximus & - fi - while true do if ! pgrep -x $PGREP > /dev/null @@ -64,6 +63,7 @@ kasm_startup() { /usr/bin/filter_ready /usr/bin/desktop_ready set +e + bash ${MAXIMIZE_SCRIPT} & $START_COMMAND $ARGS $URL set -e fi diff --git a/src/ubuntu/install/vs_code/install_vs_code.sh b/src/ubuntu/install/vs_code/install_vs_code.sh index 1ebbaaa..e59545a 100644 --- a/src/ubuntu/install/vs_code/install_vs_code.sh +++ b/src/ubuntu/install/vs_code/install_vs_code.sh @@ -14,5 +14,9 @@ rm vs_code.deb apt-get update apt-get install -y python3-setuptools \ python3-venv \ - python3-virtualenv \ - maximus + python3-virtualenv + +if [[ "$(lsb_release -cs)" == "bionic" ]]; +then + apt-get install -y maximus +fi diff --git a/src/ubuntu/install/zoho_email/install_zoho_email.sh b/src/ubuntu/install/zoho_email/install_zoho_email.sh index 7ad18b5..66e039b 100644 --- a/src/ubuntu/install/zoho_email/install_zoho_email.sh +++ b/src/ubuntu/install/zoho_email/install_zoho_email.sh @@ -2,7 +2,7 @@ set -ex mkdir -p /opt/zoho-mail-desktop cd /opt/zoho-mail-desktop -wget -q https://downloads.zohocdn.com/zmail-desktop/linux/zoho-mail-desktop-x64-v1.1.12.AppImage -O zoho-mail-desktop.AppImage +wget -q https://downloads.zohocdn.com/zmail-desktop/linux/zoho-mail-desktop-x64-v1.3.2.AppImage -O zoho-mail-desktop.AppImage chmod +x zoho-mail-desktop.AppImage ./zoho-mail-desktop.AppImage --appimage-extract rm zoho-mail-desktop.AppImage diff --git a/src/ubuntu/install/zoom/custom_startup.sh b/src/ubuntu/install/zoom/custom_startup.sh index 2795a7e..4d5a987 100644 --- a/src/ubuntu/install/zoom/custom_startup.sh +++ b/src/ubuntu/install/zoom/custom_startup.sh @@ -2,7 +2,9 @@ set -ex START_COMMAND="zoom" PGREP="zoom" -MAXIMUS="true" +export MAXIMIZE="true" +export MAXIMIZE_NAME="Zoom" +MAXIMIZE_SCRIPT=$STARTUPDIR/maximize_window.sh DEFAULT_ARGS="" ARGS=${APP_ARGS:-$DEFAULT_ARGS} @@ -38,6 +40,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." @@ -51,13 +54,7 @@ kasm_startup() { URL=$LAUNCH_URL fi - - if [ -z "$DISABLE_CUSTOM_STARTUP" ] || [ -n "$FORCE" ] ; then - - if [[ $MAXIMUS == 'true' ]] ; then - maximus & - fi while true do @@ -66,6 +63,7 @@ kasm_startup() { /usr/bin/filter_ready /usr/bin/desktop_ready set +e + bash ${MAXIMIZE_SCRIPT} & $START_COMMAND $ARGS $URL set -e fi diff --git a/src/ubuntu/install/zoom/install_zoom.sh b/src/ubuntu/install/zoom/install_zoom.sh index 01a56f3..1d1d7b1 100644 --- a/src/ubuntu/install/zoom/install_zoom.sh +++ b/src/ubuntu/install/zoom/install_zoom.sh @@ -11,7 +11,10 @@ fi wget -q https://zoom.us/client/latest/zoom_${ARCH}.deb apt-get update -apt-get install -y maximus +if [[ "$(lsb_release -cs)" == "bionic" ]]; +then + apt-get install -y maximus +fi apt-get install -y ./zoom_${ARCH}.deb rm zoom_amd64.deb cp /usr/share/applications/Zoom.desktop $HOME/Desktop/ diff --git a/src/ubuntu/install/zsnes/custom_startup.sh b/src/ubuntu/install/zsnes/custom_startup.sh index c844ad5..e4f2e9a 100644 --- a/src/ubuntu/install/zsnes/custom_startup.sh +++ b/src/ubuntu/install/zsnes/custom_startup.sh @@ -2,7 +2,9 @@ set -ex START_COMMAND="zsnes" PGREP="zsnes" -MAXIMUS="true" +export MAXIMIZE="true" +export MAXIMIZE_NAME="ZSNES" +MAXIMIZE_SCRIPT=$STARTUPDIR/maximize_window.sh DEFAULT_ARGS="" ARGS=${APP_ARGS:-$DEFAULT_ARGS} @@ -38,6 +40,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." @@ -51,10 +54,6 @@ kasm_startup() { URL=$LAUNCH_URL fi - if [[ $MAXIMUS == 'true' ]] ; then - maximus & - fi - if [ -z "$DISABLE_CUSTOM_STARTUP" ] || [ -n "$FORCE" ] ; then while true do @@ -63,6 +62,7 @@ kasm_startup() { /usr/bin/filter_ready /usr/bin/desktop_ready set +e + bash ${MAXIMIZE_SCRIPT} & $START_COMMAND $ARGS $URL set -e fi diff --git a/src/ubuntu/install/zsnes/install_zsnes.sh b/src/ubuntu/install/zsnes/install_zsnes.sh index 39762c8..a5e03f1 100644 --- a/src/ubuntu/install/zsnes/install_zsnes.sh +++ b/src/ubuntu/install/zsnes/install_zsnes.sh @@ -2,7 +2,11 @@ set -ex dpkg --add-architecture i386 apt-get update -apt-get install -y zsnes maximus +if [[ "$(lsb_release -cs)" == "bionic" ]]; +then + apt-get install -y maximus +fi +apt-get install -y zsnes