diff --git a/.github/workflows/call_issue_pr_tracker.yml b/.github/workflows/call_issue_pr_tracker.yml old mode 100755 new mode 100644 diff --git a/.github/workflows/call_issues_cron.yml b/.github/workflows/call_issues_cron.yml old mode 100755 new mode 100644 diff --git a/README.md b/README.md index 02ec30e..6c3ef83 100644 --- a/README.md +++ b/README.md @@ -110,6 +110,7 @@ services: - PUID=1000 - PGID=1000 - TZ=Etc/UTC + - CHROME_CLI=https://www.linuxserver.io/ #optional volumes: - /path/to/config:/config ports: @@ -128,6 +129,7 @@ docker run -d \ -e PUID=1000 \ -e PGID=1000 \ -e TZ=Etc/UTC \ + -e CHROME_CLI=https://www.linuxserver.io/ `#optional` \ -p 3000:3000 \ -p 3001:3001 \ -v /path/to/config:/config \ @@ -148,6 +150,7 @@ Container images are configured using parameters passed at runtime (such as thos | `-e PUID=1000` | for UserID - see below for explanation | | `-e PGID=1000` | for GroupID - see below for explanation | | `-e TZ=Etc/UTC` | specify a timezone to use, see this [list](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List). | +| `-e CHROME_CLI=https://www.linuxserver.io/` | Specify one or multiple Chromium CLI flags, this string will be passed to the application in full. | | `-v /config` | Users home directory in the container, stores local files and settings | | `--shm-size=` | This is needed for any modern website to function like youtube. | | `--security-opt seccomp=unconfined` | For Docker Engine only, many modern gui apps need this to function on older hosts as syscalls are unknown to Docker. Chromium runs in no-sandbox test mode without it. | @@ -261,4 +264,5 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64 ## Versions +* **01.04.23:** - Preserve arguments passed to Chromium and restructure to use wrapper. * **18.03.23:** - Initial release. diff --git a/readme-vars.yml b/readme-vars.yml index 4aa1392..09799aa 100644 --- a/readme-vars.yml +++ b/readme-vars.yml @@ -31,6 +31,10 @@ param_ports: - { external_port: "3001", internal_port: "3001", port_desc: "HTTPS Chromium desktop gui." } custom_params: - { name: "shm-size", name_compose: "shm_size", value: "1gb",desc: "This is needed for any modern website to function like youtube." } +# optional variables +opt_param_usage_include_env: true +opt_param_env_vars: + - { env_var: "CHROME_CLI", env_value: "https://www.linuxserver.io/", desc: "Specify one or multiple Chromium CLI flags, this string will be passed to the application in full."} opt_security_opt_param: true opt_security_opt_param_vars: - { run_var: "seccomp=unconfined", compose_var: "seccomp:unconfined", desc: "For Docker Engine only, many modern gui apps need this to function on older hosts as syscalls are unknown to Docker. Chromium runs in no-sandbox test mode without it." } @@ -71,4 +75,5 @@ app_setup_block: | # changelog changelogs: + - { date: "01.04.23:", desc: "Preserve arguments passed to Chromium and restructure to use wrapper." } - { date: "18.03.23:", desc: "Initial release." } diff --git a/root/defaults/autostart b/root/defaults/autostart index a310610..365786c 100644 --- a/root/defaults/autostart +++ b/root/defaults/autostart @@ -1,22 +1,2 @@ -#! /bin/bash - -# Only start in no-sandbox mode on unpriv systems -if grep -q 'Seccomp: 0' /proc/1/status; then - chromium-browser \ - --ignore-gpu-blocklist \ - --no-first-run \ - --password-store=basic \ - --simulate-outdated-no-au='Tue, 31 Dec 2099 23:59:59 GMT' \ - --start-maximized \ - --user-data-dir > /dev/null 2>&1 -else - chromium-browser \ - --ignore-gpu-blocklist \ - --no-first-run \ - --no-sandbox \ - --password-store=basic \ - --simulate-outdated-no-au='Tue, 31 Dec 2099 23:59:59 GMT' \ - --start-maximized \ - --test-type \ - --user-data-dir > /dev/null 2>&1 -fi +#!/bin/bash +chromium-browser ${CHROME_CLI} diff --git a/root/defaults/menu.xml b/root/defaults/menu.xml index f52a8e7..684e205 100644 --- a/root/defaults/menu.xml +++ b/root/defaults/menu.xml @@ -2,6 +2,6 @@ /usr/bin/xterm -/usr/bin/chromium-browser --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' --start-maximized --test-type +/usr/bin/chromium-browser diff --git a/root/usr/bin/chromium-browser b/root/usr/bin/chromium-browser new file mode 100755 index 0000000..2a31c15 --- /dev/null +++ b/root/usr/bin/chromium-browser @@ -0,0 +1,26 @@ +#!/bin/bash + +BIN=/usr/lib/chromium/chromium-launcher.sh + +# Run normally on privved containers or modified un non priv +if grep -q 'Seccomp: 0' /proc/1/status; then + ${BIN} \ + --ignore-gpu-blocklist \ + --no-first-run \ + --password-store=basic \ + --simulate-outdated-no-au='Tue, 31 Dec 2099 23:59:59 GMT' \ + --start-maximized \ + --user-data-dir \ + "$@" > /dev/null 2>&1 +else + ${BIN} \ + --ignore-gpu-blocklist \ + --no-first-run \ + --no-sandbox \ + --password-store=basic \ + --simulate-outdated-no-au='Tue, 31 Dec 2099 23:59:59 GMT' \ + --start-maximized \ + --test-type \ + --user-data-dir \ + "$@" > /dev/null 2>&1 +fi