From personal information to sensitive data in businesses, protecting yourself and your organization from cyber threats is critical. One effective way to enhance security is by utilizing Kasm. Kasm provides an open-source containerized browser for secure web browsing. It offers additional protection against cyber threats and helps prevent sophisticated attacks such as phishing, malware, or ransomware. However, its docker image for Chrome does not contain dark mode by default. One of the solutions is to build a docker image yourselves, but Chrome itself will update instantly, which implies we have to recreate our docker image frequently. This article will teach you how to enable dark mode on Chrome at every start without building your docker image.
The docker-compose file I am using will be attached at the end. I am having issues installing the 1.13 version on my Ubuntu 22.04 VM, so version 1.12 will be used in this article.
Step 1: Log in to your Kasm dashboard using your admin account. Go to the Authentication section, select Chrome and click Edit.
Step 2: Create a Persistent Profile Path so that our user settings will not be removed on the session end.
Step 3: Launch a session with Persistent Profile enabled.
Step 4: Enter chrome://flags on Chrome. Search for Auto Dark Mode for Web Contents. Select Enabled with selective inversion of non-image elements.
Step 5: Go to the Settings page of Chrome, Select Block all cookies (not recommended), or Block third-party cookies in Incognito. Enable Clear cookies and site data when you close all windows if it is selectable.
Step 6: Disable Continue running background apps when Google Chrome is closed. Otherwise, your cookies may not be cleared on the Close/ Session end.
Step 7: Install the Auto clear browsing data extension on the Chrome web store.
Step 8: Add a new task on the Auto clear browsing data extension. Tick ‘The browser’s history’ and ‘Execute when extension is initialized’ as shown below.
Step 9: You may now try to delete your current and launch a new session.
Congratulation, if your cookies and history are deleted at the start and dark mode will be enabled by default.
My docker-compose file for Kasm:
version: "2.1" services: kasm: image: kasmweb/workspaces:1.12.0 container_name: kasm privileged: true environment: - KASM_PORT=443 #- DOCKER_HUB_USERNAME=USER #optional #- DOCKER_HUB_PASSWORD=PASS #optional volumes: - /path/to/data:/opt - /path/to/profiles:/profiles #optional - /dev/input:/dev/input #optional - /run/udev/data:/run/udev/data #optional ports: - 3000:3000 - 443:443 restart: unless-stopped