diff --git a/.m1k1o/build b/.m1k1o/build index 0efb2ac0..c342a7f1 100755 --- a/.m1k1o/build +++ b/.m1k1o/build @@ -17,14 +17,19 @@ build_base() { docker build -t m1k1o/neko:base -f base/Dockerfile "$BASE" } -build_browser() { - docker build -t m1k1o/neko:browser -f browser/Dockerfile browser/ +build_firefox() { + docker build -t m1k1o/neko:firefox -f firefox/Dockerfile firefox/ +} + +build_chromium() { + docker build -t m1k1o/neko:chromium -f chromium/Dockerfile chromium/ } case $1 in client) build_client;; serve) build_server;; base) build_base;; - browser) build_browser;; + firefox) build_firefox;; + chromium) build_chromium;; *) echo "Unknown $1";; esac diff --git a/.m1k1o/chromium/Dockerfile b/.m1k1o/chromium/Dockerfile new file mode 100644 index 00000000..fb049e70 --- /dev/null +++ b/.m1k1o/chromium/Dockerfile @@ -0,0 +1,25 @@ +FROM m1k1o/neko:base + +# +# install chromium +RUN set -eux; apt-get update; \ + apt-get install -y --no-install-recommends openbox unzip chromium; \ + # + # install widevine module + WIDEVINE_VERSION=$(wget --quiet -O - https://dl.google.com/widevine-cdm/versions.txt | tail -n 1); \ + wget -O /tmp/widevine.zip "https://dl.google.com/widevine-cdm/$WIDEVINE_VERSION-linux-x64.zip"; \ + unzip -p /tmp/widevine.zip libwidevinecdm.so > /usr/lib/chromium/libwidevinecdm.so; \ + chmod 644 /usr/lib/chromium/libwidevinecdm.so; \ + rm /tmp/widevine.zip; \ + # + # clean up + apt-get --purge autoremove -y unzip; \ + apt-get clean -y; \ + rm -rf /var/lib/apt/lists/* /var/cache/apt/* + +# +# copy configuation files +COPY supervisord.conf /etc/neko/supervisord/chromium.conf +COPY preferences.json /usr/share/chromium/master_preferences +COPY policies.json /etc/chromium/policies/managed/policies.json +COPY openbox.xml /etc/neko/openbox.xml diff --git a/.m1k1o/chromium/openbox.xml b/.m1k1o/chromium/openbox.xml new file mode 100644 index 00000000..f79f3a3c --- /dev/null +++ b/.m1k1o/chromium/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/chromium/policies.json b/.m1k1o/chromium/policies.json new file mode 100644 index 00000000..8ac6543c --- /dev/null +++ b/.m1k1o/chromium/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" + ], + "ExtensionInstallWhitelist": [ + "cjpalhdlnbpafiamejdnhcphjbkeiagm", + "fjoaledfpmneenckfbpdfhkmimnjocfa" + ], + "ExtensionInstallBlacklist": [ + "*" + ], + "ExtensionInstallForcelist": [ + "cjpalhdlnbpafiamejdnhcphjbkeiagm", + "fjoaledfpmneenckfbpdfhkmimnjocfa" + ] +} \ No newline at end of file diff --git a/.m1k1o/chromium/preferences.json b/.m1k1o/chromium/preferences.json new file mode 100644 index 00000000..31cd367a --- /dev/null +++ b/.m1k1o/chromium/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/chromium/supervisord.conf b/.m1k1o/chromium/supervisord.conf new file mode 100644 index 00000000..1f03e1d4 --- /dev/null +++ b/.m1k1o/chromium/supervisord.conf @@ -0,0 +1,21 @@ +[program:chromium] +environment=HOME="/home/%(ENV_USER)s",USER="%(ENV_USER)s",DISPLAY="%(ENV_DISPLAY)s" +command=/usr/lib/chromium/chromium --window-position=0,0 --display=%(ENV_DISPLAY)s --start-maximized --bwsi --test-type --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/chromium.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/.m1k1o/browser/Dockerfile b/.m1k1o/firefox/Dockerfile similarity index 100% rename from .m1k1o/browser/Dockerfile rename to .m1k1o/firefox/Dockerfile diff --git a/.m1k1o/browser/autoconfig.js b/.m1k1o/firefox/autoconfig.js similarity index 100% rename from .m1k1o/browser/autoconfig.js rename to .m1k1o/firefox/autoconfig.js diff --git a/.m1k1o/browser/neko.js b/.m1k1o/firefox/neko.js similarity index 100% rename from .m1k1o/browser/neko.js rename to .m1k1o/firefox/neko.js diff --git a/.m1k1o/browser/openbox.xml b/.m1k1o/firefox/openbox.xml similarity index 100% rename from .m1k1o/browser/openbox.xml rename to .m1k1o/firefox/openbox.xml diff --git a/.m1k1o/browser/policies.json b/.m1k1o/firefox/policies.json similarity index 100% rename from .m1k1o/browser/policies.json rename to .m1k1o/firefox/policies.json diff --git a/.m1k1o/browser/supervisord.conf b/.m1k1o/firefox/supervisord.conf similarity index 100% rename from .m1k1o/browser/supervisord.conf rename to .m1k1o/firefox/supervisord.conf