From 201197f7d385d99ed01997e3f99a76f69259441e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20=C5=A0ediv=C3=BD?= Date: Mon, 7 Jun 2021 20:00:55 +0200 Subject: [PATCH] add Google Chrome. --- .m1k1o/README.md | 1 + .m1k1o/google-chrome/Dockerfile | 21 + .m1k1o/google-chrome/openbox.xml | 763 ++++++++++++++++++++++++++ .m1k1o/google-chrome/policies.json | 38 ++ .m1k1o/google-chrome/preferences.json | 110 ++++ .m1k1o/google-chrome/supervisord.conf | 21 + README.md | 1 + 7 files changed, 955 insertions(+) create mode 100644 .m1k1o/google-chrome/Dockerfile create mode 100644 .m1k1o/google-chrome/openbox.xml create mode 100644 .m1k1o/google-chrome/policies.json create mode 100644 .m1k1o/google-chrome/preferences.json create mode 100644 .m1k1o/google-chrome/supervisord.conf diff --git a/.m1k1o/README.md b/.m1k1o/README.md index 63e770b..b44601c 100644 --- a/.m1k1o/README.md +++ b/.m1k1o/README.md @@ -13,6 +13,7 @@ If you want, you can build other tags. `base` tag needs to be build first: - `./build base` - `./build firefox` - `./build chromium` +- `./build google-chrome` - etc... ## Step 2: Starting server diff --git a/.m1k1o/google-chrome/Dockerfile b/.m1k1o/google-chrome/Dockerfile new file mode 100644 index 0000000..669c5ee --- /dev/null +++ b/.m1k1o/google-chrome/Dockerfile @@ -0,0 +1,21 @@ +ARG BASE_IMAGE=m1k1o/neko:base +FROM $BASE_IMAGE + +ARG SRC_URL="https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb" + +# +# install google chrome +RUN set -eux; apt-get update; \ + wget -O /tmp/google-chrome.deb "${SRC_URL}"; \ + apt-get install -y --no-install-recommends openbox /tmp/google-chrome.deb; \ + # + # clean up + apt-get clean -y; \ + rm -rf /var/lib/apt/lists/* /var/cache/apt/* + +# +# copy configuation files +COPY supervisord.conf /etc/neko/supervisord/google-chrome.conf +COPY --chown=neko preferences.json /home/neko/.config/google-chrome/Default/Preferences +COPY policies.json /etc/opt/chrome/policies/managed/policies.json +COPY openbox.xml /etc/neko/openbox.xml diff --git a/.m1k1o/google-chrome/openbox.xml b/.m1k1o/google-chrome/openbox.xml new file mode 100644 index 0000000..a0961c6 --- /dev/null +++ b/.m1k1o/google-chrome/openbox.xml @@ -0,0 +1,763 @@ + + + + + + + + 10 + 20 + + + + + + no + true + yes + normal + + + + + yes + + no + + yes + + no + + 200 + + no + + + + + Smart + +
yes
+ + Primary + + 1 + +
+ + + Clearlooks + NLIMC + + yes + yes + + sans + 8 + + bold + + normal + + + + sans + 8 + + bold + + normal + + + + sans + 9 + + normal + + normal + + + + sans + 9 + + normal + + normal + + + + sans + 9 + + bold + + normal + + + + sans + 9 + + bold + + normal + + + + + + + 1 + 1 + + + + 875 + + + + + yes + Nonpixel + + Center + + + + + 10 + + 10 + + + + + + + 0 + 0 + 0 + 0 + + + + TopLeft + + 0 + 0 + no + Above + + Vertical + + no + 300 + + 300 + + Middle + + + + + C-g + + + + leftno + + + rightno + + + upno + + + downno + + + leftno + + + rightno + + + upno + + + downno + + + 1 + + + 2 + + + 3 + + + 4 + + + + + + + + + + + + + + + + + + + + scrot -s + + + + + + + + + + + + + + + + + + + + + + + + yesyes + + + + + + + + + + + + right + + + + + left + + + + + up + + + + + down + + + + + + + + true + Konqueror + + kfmclient openProfile filemanagement + + + + + scrot + + + + + 1 + + 500 + + 400 + + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + previous + + + next + + + previous + + + next + + + previous + + + next + + + + + + + + + + + + + + no + + + + + + + + + + + yes + + + + + + + + + + + + + + + + + + + + + + + + + + + top + + + + + + left + + + + + + right + + + + + + bottom + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + vertical + + + horizontal + + + + + + + + + + + + + + + + + previous + + + next + + + + previous + + + next + + + previous + + + next + + + + + + + + + + + + + + + + + + + + previous + + + next + + + previous + + + next + + + + + + + + + + + menu.xml + 200 + + no + + 100 + + 400 + + yes + + yes + + + + + + + +
diff --git a/.m1k1o/google-chrome/policies.json b/.m1k1o/google-chrome/policies.json new file mode 100644 index 0000000..786c2b1 --- /dev/null +++ b/.m1k1o/google-chrome/policies.json @@ -0,0 +1,38 @@ +{ + "HomepageLocation": "", + "AutoFillEnabled": false, + "AutofillAddressEnabled": false, + "AutofillCreditCardEnabled": false, + "BrowserSignin": 0, + "DefaultNotificationsSetting": 2, + "DeveloperToolsAvailability": 2, + "EditBookmarksEnabled": false, + "FullscreenAllowed": true, + "IncognitoModeAvailability": 1, + "SyncDisabled": true, + "AutoplayAllowed": true, + "BrowserAddPersonEnabled": false, + "BrowserGuestModeEnabled": false, + "DefaultPopupsSetting": 2, + "DownloadRestrictions": 3, + "VideoCaptureAllowed": true, + "AllowFileSelectionDialogs": false, + "PromptForDownloadLocation": false, + "BookmarkBarEnabled": false, + "PasswordManagerEnabled": false, + "URLBlacklist": [ + "file://*", + "chrome://policy" + ], + "ExtensionInstallForcelist": [ + "cjpalhdlnbpafiamejdnhcphjbkeiagm;https://clients2.google.com/service/update2/crx", + "fjoaledfpmneenckfbpdfhkmimnjocfa;https://clients2.google.com/service/update2/crx" + ], + "ExtensionInstallWhitelist": [ + "cjpalhdlnbpafiamejdnhcphjbkeiagm", + "fjoaledfpmneenckfbpdfhkmimnjocfa" + ], + "ExtensionInstallBlacklist": [ + "*" + ] +} diff --git a/.m1k1o/google-chrome/preferences.json b/.m1k1o/google-chrome/preferences.json new file mode 100644 index 0000000..31cd367 --- /dev/null +++ b/.m1k1o/google-chrome/preferences.json @@ -0,0 +1,110 @@ +{ + "homepage": "http://www.google.com", + "homepage_is_newtabpage": false, + "first_run_tabs": [ + "https://www.google.com/_/chrome/newtab?ie=UTF-8" + ], + "custom_links": { + "initialized": true, + "list": [ + { + "title": "YouTube", + "url": "https://www.youtube.com/" + }, + { + "title": "Netflix", + "url": "https://netflix.com" + }, + { + "title": "Hulu", + "url": "https://www.hulu.com/" + }, + { + "title": "9Anime", + "url": "https://9anime.to/" + }, + { + "title": "Crunchy Roll", + "url": "https://www.crunchyroll.com/" + }, + { + "title": "Funimation", + "url": "https://www.funimation.com/" + }, + { + "title": "Disney+", + "url": "https://www.disneyplus.com/" + }, + { + "title": "HBO Now", + "url": "https://play.hbonow.com/" + }, + { + "title": "Amazon Video", + "url": "https://www.amazon.com/Amazon-Video/b?node=2858778011" + }, + { + "title": "VRV", + "url": "https://vrv.co/" + }, + { + "title": "Twitch", + "url": "https://www.twitch.tv/" + }, + { + "title": "Mixer", + "url": "https://mixer.com/" + } + ] + }, + "browser": { + "custom_chrome_frame": false, + "show_home_button": true, + "window_placement": { + "maximized": true + } + }, + "bookmark_bar": { + "show_on_all_tabs": false + }, + "sync_promo": { + "show_on_first_run_allowed": false + }, + "distribution": { + "import_bookmarks_from_file": "bookmarks.html", + "import_bookmarks": true, + "import_history": true, + "import_home_page": true, + "import_search_engine": true, + "ping_delay": 60, + "do_not_create_desktop_shortcut": true, + "do_not_create_quick_launch_shortcut": true, + "do_not_create_taskbar_shortcut": true, + "do_not_launch_chrome": true, + "do_not_register_for_update_launch": true, + "make_chrome_default": true, + "make_chrome_default_for_user": true, + "system_level": false, + "verbose_logging": false + }, + "profile": { + "avatar_index": 19, + "default_content_setting_values": { + "clipboard": 2, + "cookies": 4, + "geolocation": 2, + "media_stream_camera": 2, + "media_stream_mic": 2, + "midi_sysex": 2, + "payment_handler": 2, + "usb_guard": 2 + }, + "name": "neko", + "using_default_avatar": false, + "using_default_name": false, + "using_gaia_avatar": false + }, + "signin": { + "allowed": false + } +} diff --git a/.m1k1o/google-chrome/supervisord.conf b/.m1k1o/google-chrome/supervisord.conf new file mode 100644 index 0000000..1252dee --- /dev/null +++ b/.m1k1o/google-chrome/supervisord.conf @@ -0,0 +1,21 @@ +[program:google-chrome] +environment=HOME="/home/%(ENV_USER)s",USER="%(ENV_USER)s",DISPLAY="%(ENV_DISPLAY)s" +command=/usr/bin/google-chrome --window-position=0,0 --display=%(ENV_DISPLAY)s --user-data-dir=/home/neko/.config/google-chrome --no-first-run --start-maximized --bwsi --force-dark-mode --disable-file-system --disable-gpu --disable-software-rasterizer --disable-dev-shm-usage +autorestart=true +priority=800 +user=%(ENV_USER)s +stdout_logfile=/var/log/neko/google-chrome.log +stdout_logfile_maxbytes=100MB +stdout_logfile_backups=10 +redirect_stderr=true + +[program:openbox] +environment=HOME="/home/%(ENV_USER)s",USER="%(ENV_USER)s",DISPLAY="%(ENV_DISPLAY)s" +command=/usr/bin/openbox --config-file /etc/neko/openbox.xml +autorestart=true +priority=300 +user=%(ENV_USER)s +stdout_logfile=/var/log/neko/openbox.log +stdout_logfile_maxbytes=100MB +stdout_logfile_backups=10 +redirect_stderr=true diff --git a/README.md b/README.md index 575acb3..b4384ce 100644 --- a/README.md +++ b/README.md @@ -79,6 +79,7 @@ For n.eko room management software visit https://github.com/m1k1o/neko-rooms. Use following docker images: - `m1k1o/neko:latest` - for Firefox. - `m1k1o/neko:chromium` - for Chromium (needs `--cap-add=SYS_ADMIN`). +- `m1k1o/neko:google-chrome` - for Google Chrome (needs `--cap-add=SYS_ADMIN`). - `m1k1o/neko:ungoogled-chromium` - for [Ungoogled Chromium](https://github.com/Eloston/ungoogled-chromium) (needs `--cap-add=SYS_ADMIN`) (by @whalehub). - `m1k1o/neko:tor-browser` - for Tor Browser. - `m1k1o/neko:vncviewer` - for simple VNC viewer (specify `NEKO_VNC_URL` to your VNC target).