From 39f5c0e7faf41dde691878f49c73a3e27f34947f Mon Sep 17 00:00:00 2001 From: mbattista Date: Sun, 21 Mar 2021 22:52:58 +0000 Subject: [PATCH] added vlc for local files and wesnoth as a showcase --- .m1k1o/build | 10 + .m1k1o/vlc/Dockerfile | 15 + .m1k1o/vlc/openbox.xml | 763 ++++++++++++++++++++++++++++++++ .m1k1o/vlc/supervisord.conf | 21 + .m1k1o/wesnoth/Dockerfile | 16 + .m1k1o/wesnoth/openbox.xml | 763 ++++++++++++++++++++++++++++++++ .m1k1o/wesnoth/supervisord.conf | 21 + README.md | 103 +++++ 8 files changed, 1712 insertions(+) create mode 100644 .m1k1o/vlc/Dockerfile create mode 100644 .m1k1o/vlc/openbox.xml create mode 100644 .m1k1o/vlc/supervisord.conf create mode 100644 .m1k1o/wesnoth/Dockerfile create mode 100644 .m1k1o/wesnoth/openbox.xml create mode 100644 .m1k1o/wesnoth/supervisord.conf diff --git a/.m1k1o/build b/.m1k1o/build index c342a7f..3764076 100755 --- a/.m1k1o/build +++ b/.m1k1o/build @@ -25,11 +25,21 @@ build_chromium() { docker build -t m1k1o/neko:chromium -f chromium/Dockerfile chromium/ } +build_wesnoth() { + docker build -t m1k1o/neko:wesnoth -f wesnoth/Dockerfile wesnoth/ +} + +build_vlc() { + docker build -t m1k1o/neko:vlc -f vlc/Dockerfile vlc/ +} + case $1 in client) build_client;; serve) build_server;; base) build_base;; firefox) build_firefox;; chromium) build_chromium;; + wesnoth) build_wesnoth;; + vlc) build_vlc;; *) echo "Unknown $1";; esac diff --git a/.m1k1o/vlc/Dockerfile b/.m1k1o/vlc/Dockerfile new file mode 100644 index 0000000..a40b17b --- /dev/null +++ b/.m1k1o/vlc/Dockerfile @@ -0,0 +1,15 @@ +FROM m1k1o1/neko:base + +# +# install firefox-esr +RUN set -eux; apt-get update; \ + apt-get install -y --no-install-recommends openbox vlc; \ + # + # clean up + apt-get clean -y; \ + rm -rf /var/lib/apt/lists/* /var/cache/apt/* + +# +# copy configuation files +COPY supervisord.conf /etc/neko/supervisord/vlc.conf +COPY openbox.xml /etc/neko/openbox.xml diff --git a/.m1k1o/vlc/openbox.xml b/.m1k1o/vlc/openbox.xml new file mode 100644 index 0000000..95376a7 --- /dev/null +++ b/.m1k1o/vlc/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/vlc/supervisord.conf b/.m1k1o/vlc/supervisord.conf new file mode 100644 index 0000000..dd5d991 --- /dev/null +++ b/.m1k1o/vlc/supervisord.conf @@ -0,0 +1,21 @@ +[program:vlc] +environment=HOME="/home/%(ENV_USER)s",USER="%(ENV_USER)s",DISPLAY="%(ENV_DISPLAY)s" +command=/usr/bin/vlc --x11-display=%(ENV_DISPLAY)s +autorestart=true +priority=800 +user=%(ENV_USER)s +stdout_logfile=/var/log/neko/vlc.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/wesnoth/Dockerfile b/.m1k1o/wesnoth/Dockerfile new file mode 100644 index 0000000..e1d4daa --- /dev/null +++ b/.m1k1o/wesnoth/Dockerfile @@ -0,0 +1,16 @@ +FROM m1k1o/neko:base + +# +# install firefox-esr +RUN set -eux; apt-get update; \ + apt-get install -y --no-install-recommends openbox; \ + apt-get install -y wesnoth; \ + # + # clean up + apt-get clean -y; \ + rm -rf /var/lib/apt/lists/* /var/cache/apt/* + +# +# copy configuation files +COPY supervisord.conf /etc/neko/supervisord/wesnoth.conf +COPY openbox.xml /etc/neko/openbox.xml diff --git a/.m1k1o/wesnoth/openbox.xml b/.m1k1o/wesnoth/openbox.xml new file mode 100644 index 0000000..b27311b --- /dev/null +++ b/.m1k1o/wesnoth/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/wesnoth/supervisord.conf b/.m1k1o/wesnoth/supervisord.conf new file mode 100644 index 0000000..f32ed85 --- /dev/null +++ b/.m1k1o/wesnoth/supervisord.conf @@ -0,0 +1,21 @@ +[program:wesnoth] +environment=HOME="/home/%(ENV_USER)s",USER="%(ENV_USER)s",DISPLAY="%(ENV_DISPLAY)s" +command=/usr/games/wesnoth -w +autorestart=true +priority=800 +user=%(ENV_USER)s +stdout_logfile=/var/log/neko/wesnoth.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 13d762a..5161638 100644 --- a/README.md +++ b/README.md @@ -138,8 +138,111 @@ services: NEKO_NAT1TO1: ``` +## VLC + +```yaml +version: "3.4" +services: + neko: + image: "m1k1o/neko:vlc" + restart: "unless-stopped" + shm_size: "2gb" + volumes: + - ":/video" + ports: + - "8080:8080" + - "52000-52100:52000-52100/udp" + cap_add: + - SYS_ADMIN + environment: + NEKO_SCREEN: '1920x1080@30' + NEKO_PASSWORD: neko + NEKO_PASSWORD_ADMIN: admin + NEKO_EPR: 52000-52100 + NEKO_NAT1TO1: +``` + +## Wesnoth +Neko can share any application via docker. +For example the round-based strategy game wesnoth. + +```yaml +version: "3.4" +services: + neko: + image: "m1k1o/neko:wesnoth" + restart: "unless-stopped" + shm_size: "2gb" + ports: + - "8080:8080" + - "52000-52100:52000-52100/udp" + cap_add: + - SYS_ADMIN + environment: + NEKO_SCREEN: '1920x1080@30' + NEKO_PASSWORD: neko + NEKO_PASSWORD_ADMIN: admin + NEKO_EPR: 52000-52100 + NEKO_NAT1TO1: +``` + ## Mobile support Neko is now working on iOS and Android! Also, the UI screens have been fixed for small screens. ![mobile-screens](https://i.imgur.com/K9gfscU.png) + +## Docker-Compose Enviroment Options + +```code +NEKO_SCREEN: + - Resolution after startup. Only Admins can change this later. + - e.g. '1920x1080@30' +NEKO_PASSWORD: + - Password for the user login + - e.g. 'user_password' +NEKO_PASSWORD_ADMIN + - Password for the admin login + - e.g. 'admin_password' +NEKO_EPR: + - For WebRTC needed range of ports + - e.g. 52000-52100 +NEKO_VP8: + - If vp8 should be used as video encoder for the stream (default encoder) + - e.g. 'true' +NEKO_VP9: + - If vp9 should be used as video encoder for the stream (Parameter not optimized yet) + - e.g. 'false' +NEKO_H264: + - If h264 should be used as video encoder for the stream (second best option) + - e.g. 'false' +NEKO_VIDEO_BITRATE: + - Bitrate of the video stream in kb/s + - e.g. 3500 +NEKO_VIDEO: + - Makes it possible to create custom gstreamer pipelines. With this you could find the best quality for your CPU + - Installed are gstreamer1.0-plugins-base / gstreamer1.0-plugins-good / gstreamer1.0-plugins-bad / gstreamer1.0-plugins-ugly + - e.g. ' ximagesrc display-name=%s show-pointer=true use-damage=false ! video/x-raw,framerate=30/1 ! videoconvert ! queue ! video/x-raw,format=NV12 ! x264enc threads=4 bitrate=3500 key-int-max=60 vbv-buf-capacity=4000 byte-stream=true tune=zerolatency speed-preset=veryfast ! video/x-h264,stream-format=byte-stream ' +NEKO_MAX_FPS: + - The resulting stream frames per seconds should be capped (0 for uncapped) + - e.g. 0 +NEKO_OPUS: + - If opus should be used as audio encoder for the stream (default encoder) + - e.g. 'true' +NEKO_G722: + - If g722 should be used as audio encoder for the stream + - e.g. 'false' +NEKO_PCMU: + - If pcmu should be used as audio encoder for the stream + - e.g. 'false' +NEKO_PCMA: + - If pcma should be used as audio encoder for the stream + - e.g. 'false' +NEKO_CERT: + - Path to the SSL-Certificate + - e.g. '/certs/cert.pem' +NEKO_KEY: + - Path to the SSL-Certificate private key + - e.g. '/certs/key.pem' + +```