mirror of
https://github.com/m1k1o/neko.git
synced 2024-07-24 14:40:50 +12:00
Compare commits
16 Commits
Author | SHA1 | Date | |
---|---|---|---|
af9289866d | |||
031a2f0816 | |||
2189e4fd49 | |||
130832177c | |||
915d050109 | |||
e0f921473a | |||
d3af6f477c | |||
9550220e01 | |||
c59551da40 | |||
12c92cb55a | |||
87082bb978 | |||
ba3368a3eb | |||
d43cf8c58b | |||
6d23950849 | |||
807b6b9f7b | |||
62cdfdf4fe |
@ -13,7 +13,7 @@ RUN set -eux; apt-get update; \
|
||||
# install libclipboard
|
||||
set -eux; \
|
||||
cd /tmp; \
|
||||
git clone https://github.com/jtanx/libclipboard; \
|
||||
git clone --depth=1 https://github.com/jtanx/libclipboard; \
|
||||
cd libclipboard; \
|
||||
cmake .; \
|
||||
make -j4; \
|
||||
@ -60,16 +60,26 @@ ARG USERNAME=neko
|
||||
ARG USER_UID=1000
|
||||
ARG USER_GID=$USER_UID
|
||||
|
||||
#
|
||||
# install dependencies
|
||||
RUN set -eux; apt-get update; \
|
||||
RUN set -eux; \
|
||||
#
|
||||
# add non-free repo for intel drivers
|
||||
echo deb http://deb.debian.org/debian bullseye main contrib non-free > /etc/apt/sources.list; \
|
||||
echo deb http://deb.debian.org/debian-security/ bullseye-security main contrib non-free >> /etc/apt/sources.list; \
|
||||
echo deb http://deb.debian.org/debian bullseye-updates main contrib non-free >> /etc/apt/sources.list; \
|
||||
apt-get update; \
|
||||
#
|
||||
# install dependencies
|
||||
apt-get install -y --no-install-recommends wget ca-certificates supervisor; \
|
||||
apt-get install -y --no-install-recommends pulseaudio dbus-x11 xserver-xorg-video-dummy; \
|
||||
apt-get install -y --no-install-recommends libcairo2 libxcb1 libxrandr2 libxv1 libopus0 libvpx6; \
|
||||
#
|
||||
# gst
|
||||
# intel driver + vaapi
|
||||
apt-get install -y --no-install-recommends intel-media-va-driver-non-free libva2 vainfo; \
|
||||
#
|
||||
# gst + vaapi plugin
|
||||
apt-get install -y --no-install-recommends libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev \
|
||||
gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly gstreamer1.0-pulseaudio; \
|
||||
gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly gstreamer1.0-pulseaudio \
|
||||
gstreamer1.0-vaapi ;\
|
||||
#
|
||||
# fonts
|
||||
apt-get install -y --no-install-recommends fonts-takao-mincho; \
|
||||
@ -106,6 +116,7 @@ COPY .docker/base/dbus /usr/bin/dbus
|
||||
COPY .docker/base/default.pa /etc/pulse/default.pa
|
||||
COPY .docker/base/supervisord.conf /etc/neko/supervisord.conf
|
||||
COPY .docker/base/xorg.conf /etc/neko/xorg.conf
|
||||
COPY .docker/base/add-render-group.sh /usr/bin/add-render-group.sh
|
||||
|
||||
#
|
||||
# set default envs
|
||||
@ -114,6 +125,7 @@ ENV DISPLAY=:99.0
|
||||
ENV NEKO_PASSWORD=neko
|
||||
ENV NEKO_PASSWORD_ADMIN=admin
|
||||
ENV NEKO_BIND=:8080
|
||||
ENV RENDER_GID=
|
||||
|
||||
#
|
||||
# copy static files from previous stages
|
||||
|
18
.docker/base/add-render-group.sh
Executable file
18
.docker/base/add-render-group.sh
Executable file
@ -0,0 +1,18 @@
|
||||
#!/bin/bash
|
||||
|
||||
# if no hwenc required, noop
|
||||
[[ -z "$NEKO_HWENC" ]] && exit 0
|
||||
|
||||
if [[ -z "$RENDER_GID" ]]; then
|
||||
RENDER_GID=$(stat -c "%g" /dev/dri/render* | tail -n 1)
|
||||
# is /dev/dri passed to the container?
|
||||
[[ -z "$RENDER_GID" ]] && exit 1
|
||||
fi
|
||||
|
||||
# note that this could conceivably be a security risk...
|
||||
cnt_group=$(getent group "$RENDER_GID" | cut -d: -f1)
|
||||
if [[ -z "$cnt_group" ]]; then
|
||||
groupadd -g "$RENDER_GID" nekorender
|
||||
cnt_group=nekorender
|
||||
fi
|
||||
usermod -a -G "$cnt_group" "$USER"
|
@ -9,6 +9,19 @@ loglevel=debug
|
||||
[include]
|
||||
files=/etc/neko/supervisord/*.conf
|
||||
|
||||
[program:rendergroup-init]
|
||||
environment=RENDER_GID="%(ENV_RENDER_GID)s",USER="%(ENV_USER)s"
|
||||
command=/usr/bin/add-render-group.sh
|
||||
startsecs=0
|
||||
startretries=0
|
||||
autorestart=false
|
||||
priority=10
|
||||
user=root
|
||||
stdout_logfile=/var/log/neko/rendergroup.log
|
||||
stdout_logfile_maxbytes=1MB
|
||||
stdout_logfile_backups=10
|
||||
redirect_stderr=true
|
||||
|
||||
[program:dbus]
|
||||
environment=HOME="/root",USER="root"
|
||||
command=/usr/bin/dbus
|
||||
@ -33,7 +46,7 @@ redirect_stderr=true
|
||||
|
||||
[program:pulseaudio]
|
||||
environment=HOME="/home/%(ENV_USER)s",USER="%(ENV_USER)s",DISPLAY="%(ENV_DISPLAY)s"
|
||||
command=/usr/bin/pulseaudio --disallow-module-loading -vvvv --disallow-exit --exit-idle-time=-1
|
||||
command=/usr/bin/pulseaudio --disallow-module-loading -vvvv --disallow-exit --exit-idle-time=-1
|
||||
autorestart=true
|
||||
priority=300
|
||||
user=%(ENV_USER)s
|
||||
|
@ -26,11 +26,11 @@
|
||||
],
|
||||
"ExtensionInstallForcelist": [
|
||||
"cjpalhdlnbpafiamejdnhcphjbkeiagm;https://clients2.google.com/service/update2/crx",
|
||||
"fjoaledfpmneenckfbpdfhkmimnjocfa;https://clients2.google.com/service/update2/crx"
|
||||
"mnjggcdmjocbbbhaepdhchncahnbgone;https://clients2.google.com/service/update2/crx"
|
||||
],
|
||||
"ExtensionInstallWhitelist": [
|
||||
"cjpalhdlnbpafiamejdnhcphjbkeiagm",
|
||||
"fjoaledfpmneenckfbpdfhkmimnjocfa"
|
||||
"mnjggcdmjocbbbhaepdhchncahnbgone"
|
||||
],
|
||||
"ExtensionInstallBlacklist": [
|
||||
"*"
|
||||
|
@ -1,18 +1,23 @@
|
||||
ARG BASE_IMAGE=m1k1o/neko:base
|
||||
FROM $BASE_IMAGE
|
||||
|
||||
ARG VERSION="90.0.4430.212-1"
|
||||
|
||||
#
|
||||
# install neko chromium
|
||||
RUN set -eux; apt-get update; \
|
||||
apt-get install -y --no-install-recommends unzip chromium=$VERSION chromium-common=$VERSION chromium-sandbox=$VERSION openbox; \
|
||||
RUN set -eux; \
|
||||
echo "deb http://ftp.de.debian.org/debian bookworm main" >> /etc/apt/sources.list; \
|
||||
apt-get update; \
|
||||
apt-get install -y --no-install-recommends unzip chromium chromium-common chromium-sandbox openbox; \
|
||||
#
|
||||
# install widevine module
|
||||
CHROMIUM_DIR="/usr/lib/chromium"; \
|
||||
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; \
|
||||
wget -O /tmp/widevine.zip "https://dl.google.com/widevine-cdm/${WIDEVINE_VERSION}-linux-x64.zip"; \
|
||||
mkdir -p "${CHROMIUM_DIR}/WidevineCdm/_platform_specific/linux_x64"; \
|
||||
unzip -p /tmp/widevine.zip LICENSE.txt > "${CHROMIUM_DIR}/WidevineCdm/LICENSE"; \
|
||||
unzip -p /tmp/widevine.zip manifest.json > "${CHROMIUM_DIR}/WidevineCdm/manifest.json"; \
|
||||
unzip -p /tmp/widevine.zip libwidevinecdm.so > "${CHROMIUM_DIR}/WidevineCdm/_platform_specific/linux_x64/libwidevinecdm.so"; \
|
||||
find "${CHROMIUM_DIR}/WidevineCdm" -type d -exec chmod 0755 '{}' \;; \
|
||||
find "${CHROMIUM_DIR}/WidevineCdm" -type f -exec chmod 0644 '{}' \;; \
|
||||
rm /tmp/widevine.zip; \
|
||||
#
|
||||
# clean up
|
||||
|
@ -20,17 +20,18 @@
|
||||
"PromptForDownloadLocation": false,
|
||||
"BookmarkBarEnabled": false,
|
||||
"PasswordManagerEnabled": false,
|
||||
"BrowserLabsEnabled": false,
|
||||
"URLBlacklist": [
|
||||
"file://*",
|
||||
"chrome://policy"
|
||||
],
|
||||
"ExtensionInstallForcelist": [
|
||||
"cjpalhdlnbpafiamejdnhcphjbkeiagm;https://clients2.google.com/service/update2/crx",
|
||||
"fjoaledfpmneenckfbpdfhkmimnjocfa;https://clients2.google.com/service/update2/crx"
|
||||
"mnjggcdmjocbbbhaepdhchncahnbgone;https://clients2.google.com/service/update2/crx"
|
||||
],
|
||||
"ExtensionInstallWhitelist": [
|
||||
"cjpalhdlnbpafiamejdnhcphjbkeiagm",
|
||||
"fjoaledfpmneenckfbpdfhkmimnjocfa"
|
||||
"mnjggcdmjocbbbhaepdhchncahnbgone"
|
||||
],
|
||||
"ExtensionInstallBlacklist": [
|
||||
"*"
|
||||
|
@ -10,7 +10,7 @@ RUN set -eux; apt-get update; \
|
||||
# install extensions
|
||||
mkdir -p /usr/lib/firefox-esr/distribution/extensions; \
|
||||
wget -O '/usr/lib/firefox-esr/distribution/extensions/uBlock0@raymondhill.net.xpi' https://addons.mozilla.org/firefox/downloads/latest/ublock-origin/latest.xpi; \
|
||||
wget -O /usr/lib/firefox-esr/distribution/extensions/nordvpnproxy@nordvpn.com.xpi https://addons.mozilla.org/firefox/downloads/latest/nordvpn-proxy-extension/latest.xpi; \
|
||||
wget -O '/usr/lib/firefox-esr/distribution/extensions/sponsorBlocker@ajay.app.xpi' https://addons.mozilla.org/firefox/downloads/latest/sponsorblock/latest.xpi; \
|
||||
#
|
||||
# create a profile directory
|
||||
mkdir -p /home/neko/.mozilla/firefox/profile.default/extensions; \
|
||||
|
@ -13,7 +13,7 @@
|
||||
|
||||
<applications>
|
||||
<!-- Match all windows and remove their decorations (obxprop | grep "^_OB_APP") -->
|
||||
<application class="Firefox*" name="Navigator">
|
||||
<application class="firefox" name="Navigator">
|
||||
<decor>no</decor>
|
||||
<maximized>true</maximized>
|
||||
<focus>yes</focus>
|
||||
|
@ -56,8 +56,8 @@
|
||||
"*": {
|
||||
"installation_mode": "blocked"
|
||||
},
|
||||
"nordvpnproxy@nordvpn.com": {
|
||||
"install_url": "https://addons.mozilla.org/firefox/downloads/latest/nordvpn-proxy-extension/latest.xpi",
|
||||
"sponsorBlocker@ajay.app": {
|
||||
"install_url": "https://addons.mozilla.org/firefox/downloads/latest/sponsorblock/latest.xpi",
|
||||
"installation_mode": "force_installed"
|
||||
},
|
||||
"uBlock0@raymondhill.net": {
|
||||
@ -108,7 +108,7 @@
|
||||
"datareporting.policy.dataSubmissionPolicyBypassNotification": true,
|
||||
"dom.disable_window_flip": true,
|
||||
"dom.disable_window_move_resize": true,
|
||||
"dom.event.contextmenu.enabled": false,
|
||||
"dom.event.contextmenu.enabled": true,
|
||||
"extensions.getAddons.showPane": false,
|
||||
"places.history.enabled": false,
|
||||
"privacy.file_unique_origin": true,
|
||||
|
@ -26,11 +26,11 @@
|
||||
],
|
||||
"ExtensionInstallForcelist": [
|
||||
"cjpalhdlnbpafiamejdnhcphjbkeiagm;https://clients2.google.com/service/update2/crx",
|
||||
"fjoaledfpmneenckfbpdfhkmimnjocfa;https://clients2.google.com/service/update2/crx"
|
||||
"mnjggcdmjocbbbhaepdhchncahnbgone;https://clients2.google.com/service/update2/crx"
|
||||
],
|
||||
"ExtensionInstallWhitelist": [
|
||||
"cjpalhdlnbpafiamejdnhcphjbkeiagm",
|
||||
"fjoaledfpmneenckfbpdfhkmimnjocfa"
|
||||
"mnjggcdmjocbbbhaepdhchncahnbgone"
|
||||
],
|
||||
"ExtensionInstallBlacklist": [
|
||||
"*"
|
||||
|
@ -26,11 +26,11 @@
|
||||
],
|
||||
"ExtensionInstallForcelist": [
|
||||
"cjpalhdlnbpafiamejdnhcphjbkeiagm;https://clients2.google.com/service/update2/crx",
|
||||
"fjoaledfpmneenckfbpdfhkmimnjocfa;https://clients2.google.com/service/update2/crx"
|
||||
"mnjggcdmjocbbbhaepdhchncahnbgone;https://clients2.google.com/service/update2/crx"
|
||||
],
|
||||
"ExtensionInstallWhitelist": [
|
||||
"cjpalhdlnbpafiamejdnhcphjbkeiagm",
|
||||
"fjoaledfpmneenckfbpdfhkmimnjocfa"
|
||||
"mnjggcdmjocbbbhaepdhchncahnbgone"
|
||||
],
|
||||
"ExtensionInstallBlacklist": [
|
||||
"*"
|
||||
|
20
.docker/remmina/Dockerfile
Normal file
20
.docker/remmina/Dockerfile
Normal file
@ -0,0 +1,20 @@
|
||||
ARG BASE_IMAGE=m1k1o/neko:base
|
||||
FROM $BASE_IMAGE
|
||||
|
||||
# install remmina
|
||||
RUN set -eux; apt-get update; \
|
||||
apt-get install -y --no-install-recommends \
|
||||
remmina-plugin-rdp remmina-plugin-vnc \
|
||||
# remmina-plugin-x2go # not in bullseye
|
||||
remmina-plugin-spice remmina-plugin-nx; \
|
||||
# clean up
|
||||
apt-get clean -y; \
|
||||
rm -rf /var/lib/apt/lists/* /var/cache/apt/*
|
||||
|
||||
# copy configuation files
|
||||
COPY supervisord.conf /etc/neko/supervisord/remmina.conf
|
||||
COPY --chown=neko remmina.pref /home/neko/.config/remmina/remmina.pref
|
||||
COPY --chown=neko rdp.remmina spice.remmina vnc.remmina /home/neko/.local/share/remmina/
|
||||
COPY run-remmina.sh /usr/bin/run-remmina.sh
|
||||
ENV REMMINA_URL=
|
||||
ENV REMMINA_PROFILE=
|
90
.docker/remmina/rdp.remmina
Normal file
90
.docker/remmina/rdp.remmina
Normal file
@ -0,0 +1,90 @@
|
||||
[remmina]
|
||||
password=
|
||||
gateway_username=
|
||||
notes_text=
|
||||
vc=
|
||||
preferipv6=0
|
||||
ssh_tunnel_loopback=0
|
||||
serialname=
|
||||
sound=local
|
||||
printer_overrides=
|
||||
name=rdpdefault
|
||||
console=0
|
||||
colordepth=99
|
||||
security=
|
||||
precommand=
|
||||
disable_fastpath=0
|
||||
left-handed=0
|
||||
postcommand=
|
||||
multitransport=0
|
||||
group=
|
||||
server=
|
||||
ssh_tunnel_certfile=
|
||||
glyph-cache=0
|
||||
ssh_tunnel_enabled=0
|
||||
disableclipboard=0
|
||||
audio-output=
|
||||
parallelpath=
|
||||
monitorids=
|
||||
cert_ignore=0
|
||||
gateway_server=
|
||||
serialpermissive=0
|
||||
protocol=RDP
|
||||
old-license=0
|
||||
ssh_tunnel_password=
|
||||
resolution_mode=2
|
||||
pth=
|
||||
loadbalanceinfo=
|
||||
disableautoreconnect=0
|
||||
clientname=
|
||||
clientbuild=
|
||||
resolution_width=0
|
||||
drive=
|
||||
relax-order-checks=0
|
||||
username=
|
||||
base-cred-for-gw=0
|
||||
gateway_domain=
|
||||
network=none
|
||||
rdp2tcp=
|
||||
gateway_password=
|
||||
serialdriver=
|
||||
domain=
|
||||
profile-lock=0
|
||||
rdp_reconnect_attempts=
|
||||
restricted-admin=0
|
||||
multimon=0
|
||||
exec=
|
||||
smartcardname=
|
||||
serialpath=
|
||||
enable-autostart=0
|
||||
usb=
|
||||
shareprinter=0
|
||||
ssh_tunnel_passphrase=
|
||||
shareparallel=0
|
||||
disablepasswordstoring=0
|
||||
quality=0
|
||||
span=0
|
||||
parallelname=
|
||||
ssh_tunnel_auth=0
|
||||
keymap=
|
||||
ssh_tunnel_username=
|
||||
execpath=
|
||||
shareserial=0
|
||||
resolution_height=0
|
||||
timeout=
|
||||
useproxyenv=0
|
||||
sharesmartcard=0
|
||||
freerdp_log_filters=
|
||||
microphone=
|
||||
dvc=
|
||||
ssh_tunnel_privatekey=
|
||||
gwtransp=http
|
||||
ssh_tunnel_server=
|
||||
ignore-tls-errors=1
|
||||
disable-smooth-scrolling=0
|
||||
gateway_usage=0
|
||||
websockets=0
|
||||
freerdp_log_level=INFO
|
||||
window_maximize=1
|
||||
scale=1
|
||||
viewmode=4
|
103
.docker/remmina/remmina.pref
Normal file
103
.docker/remmina/remmina.pref
Normal file
@ -0,0 +1,103 @@
|
||||
[remmina_pref]
|
||||
secret=Jsh7BJPwHqLCKi2vdkMAImSgdBVZGF6s8VbUPY3Q9WA=
|
||||
datadir_path=
|
||||
remmina_file_name=%G_%P_%N_%h
|
||||
screenshot_path=
|
||||
screenshot_name=
|
||||
deny_screenshot_clipboard=true
|
||||
save_view_mode=true
|
||||
use_master_password=false
|
||||
unlock_timeout=0
|
||||
unlock_password=
|
||||
trust_all=true
|
||||
floating_toolbar_placement=0
|
||||
toolbar_placement=3
|
||||
prevent_snap_welcome_message=true
|
||||
last_quickconnect_protocol=
|
||||
fullscreen_on_auto=true
|
||||
always_show_tab=false
|
||||
hide_connection_toolbar=true
|
||||
hide_searchbar=true
|
||||
default_action=0
|
||||
scale_quality=3
|
||||
ssh_loglevel=1
|
||||
ssh_parseconfig=true
|
||||
hide_toolbar=true
|
||||
small_toolbutton=true
|
||||
view_file_mode=0
|
||||
resolutions=640x480,800x600,1024x768,1152x864,1280x960,1400x1050
|
||||
keystrokes=
|
||||
main_width=600
|
||||
main_height=400
|
||||
main_maximize=true
|
||||
main_sort_column_id=1
|
||||
main_sort_order=0
|
||||
expanded_group=
|
||||
toolbar_pin_down=false
|
||||
sshtunnel_port=4732
|
||||
ssh_tcp_keepidle=20
|
||||
ssh_tcp_keepintvl=10
|
||||
ssh_tcp_keepcnt=3
|
||||
ssh_tcp_usrtimeout=60000
|
||||
applet_new_ontop=false
|
||||
applet_hide_count=true
|
||||
applet_enable_avahi=false
|
||||
disable_tray_icon=true
|
||||
dark_tray_icon=false
|
||||
recent_maximum=10
|
||||
default_mode=3
|
||||
tab_mode=0
|
||||
fullscreen_toolbar_visibility=2
|
||||
auto_scroll_step=10
|
||||
hostkey=65508
|
||||
shortcutkey_fullscreen=
|
||||
shortcutkey_autofit=
|
||||
shortcutkey_nexttab=
|
||||
shortcutkey_prevtab=
|
||||
shortcutkey_scale=
|
||||
shortcutkey_grab=65508
|
||||
shortcutkey_viewonly=109
|
||||
shortcutkey_screenshot=
|
||||
shortcutkey_minimize=65478
|
||||
shortcutkey_disconnect=65473
|
||||
shortcutkey_toolbar=116
|
||||
vte_font=
|
||||
vte_allow_bold_text=true
|
||||
vte_lines=512
|
||||
|
||||
[ssh_colors]
|
||||
background=#d5ccba
|
||||
cursor=#45373c
|
||||
bold=#45373c
|
||||
foreground=#45373c
|
||||
color0=#20111b
|
||||
color1=#be100e
|
||||
color2=#858162
|
||||
color3=#eaa549
|
||||
color4=#426a79
|
||||
color5=#97522c
|
||||
color6=#989a9c
|
||||
color7=#968c83
|
||||
color8=#5e5252
|
||||
color9=#be100e
|
||||
color10=#858162
|
||||
color11=#eaa549
|
||||
color12=#426a79
|
||||
color13=#97522c
|
||||
color14=#989a9c
|
||||
color15=#d5ccba
|
||||
|
||||
[usage_stats]
|
||||
periodic_usage_stats_permitted=false
|
||||
periodic_usage_stats_last_sent=0
|
||||
periodic_usage_stats_uuid_prefix=
|
||||
|
||||
[remmina_news]
|
||||
periodic_news_permitted=false
|
||||
periodic_rmnews_last_get=0
|
||||
periodic_rmnews_get_count=1
|
||||
periodic_rmnews_uuid_prefix=
|
||||
|
||||
[remmina]
|
||||
name=
|
||||
ignore-tls-errors=1
|
38
.docker/remmina/run-remmina.sh
Executable file
38
.docker/remmina/run-remmina.sh
Executable file
@ -0,0 +1,38 @@
|
||||
#!/bin/bash
|
||||
set -u
|
||||
|
||||
err() {
|
||||
echo "ERROR: $*" >&2
|
||||
exit 1
|
||||
}
|
||||
|
||||
profile_dir="/home/neko/.local/share/remmina"
|
||||
if [[ -n "$REMMINA_PROFILE" ]]; then
|
||||
profile=${REMMINA_PROFILE%.remmina}.remmina
|
||||
file=${profile##/*/}
|
||||
[[ "$file" = "$profile" ]] && profile="$profile_dir"/"$file"
|
||||
[[ -f "$profile" ]] || err "Connection profile $profile not found"
|
||||
echo "Running remmina with connection profile $profile"
|
||||
exec remmina -c "$profile"
|
||||
fi
|
||||
|
||||
[[ -z "$REMMINA_URL" ]] && err "Neither 'REMMINA_PROFILE' nor 'REMMINA_URL' found in env vars"
|
||||
|
||||
readarray -t arr < <( echo -n "$REMMINA_URL" | perl -pe 's|^(\w+)\:\/\/(?:([^:]+)(?::([^@]+))?@)?(.*)$|\1\n\2\n\3\n\4|' )
|
||||
proto="${arr[0]}"
|
||||
user="${arr[1]}"
|
||||
pw="${arr[2]}"
|
||||
host="${arr[3]}"
|
||||
echo "Parsed url in 'REMMINA_URL': proto:$proto username:$user host:$host"
|
||||
|
||||
[[ "$proto" != "vnc" && "$proto" != "rdp" && "$proto" != "spice" ]] && err "Unsupported protocol $proto in connection url 'REMMINA_URL'"
|
||||
|
||||
profile="$profile_dir"/"$proto".remmina
|
||||
remmina --set-option username="$user" --update-profile "$profile"
|
||||
remmina --set-option password="$pw" --update-profile "$profile"
|
||||
remmina --set-option server="$host" --update-profile "$profile"
|
||||
|
||||
# remmina --set-option window_maximize=1 --update-profile "$profile"
|
||||
# remmina --set-option scale=1 --update-profile "$profile"
|
||||
|
||||
exec remmina -c "$profile"
|
33
.docker/remmina/spice.remmina
Normal file
33
.docker/remmina/spice.remmina
Normal file
@ -0,0 +1,33 @@
|
||||
[remmina]
|
||||
disablegstvideooverlay=0
|
||||
disablepasswordstoring=0
|
||||
sharesmartcard=0
|
||||
videocodec=0
|
||||
ssh_tunnel_password=
|
||||
postcommand=
|
||||
server=
|
||||
name=spicedefault
|
||||
ssh_tunnel_enabled=0
|
||||
profile-lock=0
|
||||
enable-autostart=0
|
||||
imagecompression=0
|
||||
password=
|
||||
precommand=
|
||||
disableclipboard=0
|
||||
group=
|
||||
ssh_tunnel_certfile=
|
||||
protocol=SPICE
|
||||
enableaudio=1
|
||||
viewonly=0
|
||||
ssh_tunnel_server=
|
||||
ssh_tunnel_loopback=0
|
||||
ssh_tunnel_auth=0
|
||||
ignore-tls-errors=1
|
||||
ssh_tunnel_username=
|
||||
ssh_tunnel_passphrase=
|
||||
ssh_tunnel_privatekey=
|
||||
notes_text=
|
||||
usetls=0
|
||||
window_maximize=1
|
||||
scale=1
|
||||
viewmode=4
|
12
.docker/remmina/supervisord.conf
Normal file
12
.docker/remmina/supervisord.conf
Normal file
@ -0,0 +1,12 @@
|
||||
|
||||
[program:remmina]
|
||||
environment=HOME="/home/%(ENV_USER)s",USER="%(ENV_USER)s",DISPLAY="%(ENV_DISPLAY)s"
|
||||
command=/usr/bin/run-remmina.sh
|
||||
stopsignal=INT
|
||||
autorestart=true
|
||||
priority=500
|
||||
user=%(ENV_USER)s
|
||||
stdout_logfile=/var/log/neko/remmina.log
|
||||
stdout_logfile_maxbytes=100MB
|
||||
stdout_logfile_backups=10
|
||||
redirect_stderr=true
|
49
.docker/remmina/vnc.remmina
Normal file
49
.docker/remmina/vnc.remmina
Normal file
@ -0,0 +1,49 @@
|
||||
[remmina]
|
||||
encodings=
|
||||
videocodec=0
|
||||
name=temp eos
|
||||
ssh_tunnel_server=
|
||||
ssh_tunnel_privatekey=
|
||||
password=
|
||||
quality=0
|
||||
disablesmoothscrolling=0
|
||||
enableaudio=1
|
||||
precommand=
|
||||
disablegstvideooverlay=0
|
||||
ssh_tunnel_enabled=0
|
||||
sharesmartcard=0
|
||||
imagecompression=0
|
||||
ssh_tunnel_passphrase=
|
||||
ssh_tunnel_password=
|
||||
usetls=0
|
||||
viewonly=0
|
||||
disableserverinput=0
|
||||
depth_profile=0
|
||||
postcommand=
|
||||
tightencoding=0
|
||||
disablepasswordstoring=0
|
||||
lossy_encoding=0
|
||||
ignore-tls-errors=1
|
||||
gvncdebug=0
|
||||
ssh_tunnel_username=
|
||||
server=
|
||||
disableclipboard=0
|
||||
disableserverbell=0
|
||||
profile-lock=0
|
||||
enable-autostart=0
|
||||
window_maximize=1
|
||||
scale=1
|
||||
disableencryption=0
|
||||
ssh_tunnel_auth=0
|
||||
group=
|
||||
ssh_tunnel_loopback=0
|
||||
showcursor=1
|
||||
viewmode=4
|
||||
notes_text=
|
||||
keymap=
|
||||
colordepth=32
|
||||
proxy=
|
||||
protocol=VNC
|
||||
ssh_tunnel_certfile=
|
||||
shared=0
|
||||
username=
|
Binary file not shown.
@ -1,4 +0,0 @@
|
||||
{
|
||||
"external_crx": "/usr/share/chromium/extensions/fjoaledfpmneenckfbpdfhkmimnjocfa.crx",
|
||||
"external_version": "2.32.0"
|
||||
}
|
Binary file not shown.
@ -0,0 +1,4 @@
|
||||
{
|
||||
"external_crx": "/usr/share/chromium/extensions/mnjggcdmjocbbbhaepdhchncahnbgone.crx",
|
||||
"external_version": "4.0.5"
|
||||
}
|
@ -26,7 +26,7 @@
|
||||
],
|
||||
"ExtensionInstallWhitelist": [
|
||||
"cjpalhdlnbpafiamejdnhcphjbkeiagm",
|
||||
"fjoaledfpmneenckfbpdfhkmimnjocfa"
|
||||
"mnjggcdmjocbbbhaepdhchncahnbgone"
|
||||
],
|
||||
"ExtensionInstallBlacklist": [
|
||||
"*"
|
||||
|
@ -1,18 +0,0 @@
|
||||
ARG BASE_IMAGE=m1k1o/neko:base
|
||||
FROM $BASE_IMAGE
|
||||
|
||||
#
|
||||
# install vncviewer
|
||||
RUN set -eux; apt-get update; \
|
||||
apt-get install -y --no-install-recommends openbox xtightvncviewer; \
|
||||
#
|
||||
# clean up
|
||||
apt-get clean -y; \
|
||||
rm -rf /var/lib/apt/lists/* /var/cache/apt/*
|
||||
|
||||
ENV NEKO_VNC_URL=""
|
||||
|
||||
#
|
||||
# copy configuation files
|
||||
COPY supervisord.conf /etc/neko/supervisord/vncviewer.conf
|
||||
COPY openbox.xml /etc/neko/openbox.xml
|
@ -1,763 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!-- Default openbox config but all window decorations are moved
|
||||
thereby making it harder to accidentally close the virtual browser -->
|
||||
|
||||
<openbox_config xmlns="http://openbox.org/3.4/rc"
|
||||
xmlns:xi="http://www.w3.org/2001/XInclude">
|
||||
|
||||
<resistance>
|
||||
<strength>10</strength>
|
||||
<screen_edge_strength>20</screen_edge_strength>
|
||||
</resistance>
|
||||
|
||||
<applications>
|
||||
<!-- Match all windows and remove their decorations (obxprop | grep "^_OB_APP") -->
|
||||
<application class="Vncviewer" name="vncviewer">
|
||||
<decor>no</decor>
|
||||
<maximized>true</maximized>
|
||||
<focus>yes</focus>
|
||||
<layer>normal</layer>
|
||||
</application>
|
||||
</applications>
|
||||
|
||||
<focus>
|
||||
<focusNew>yes</focusNew>
|
||||
<!-- always try to focus new windows when they appear. other rules do
|
||||
apply -->
|
||||
<followMouse>no</followMouse>
|
||||
<!-- move focus to a window when you move the mouse into it -->
|
||||
<focusLast>yes</focusLast>
|
||||
<!-- focus the last used window when changing desktops, instead of the one
|
||||
under the mouse pointer. when followMouse is enabled -->
|
||||
<underMouse>no</underMouse>
|
||||
<!-- move focus under the mouse, even when the mouse is not moving -->
|
||||
<focusDelay>200</focusDelay>
|
||||
<!-- when followMouse is enabled, the mouse must be inside the window for
|
||||
this many milliseconds (1000 = 1 sec) before moving focus to it -->
|
||||
<raiseOnFocus>no</raiseOnFocus>
|
||||
<!-- when followMouse is enabled, and a window is given focus by moving the
|
||||
mouse into it, also raise the window -->
|
||||
</focus>
|
||||
|
||||
<placement>
|
||||
<policy>Smart</policy>
|
||||
<!-- 'Smart' or 'UnderMouse' -->
|
||||
<center>yes</center>
|
||||
<!-- whether to place windows in the center of the free area found or
|
||||
the top left corner -->
|
||||
<monitor>Primary</monitor>
|
||||
<!-- with Smart placement on a multi-monitor system, try to place new windows
|
||||
on: 'Any' - any monitor, 'Mouse' - where the mouse is, 'Active' - where
|
||||
the active window is, 'Primary' - only on the primary monitor -->
|
||||
<primaryMonitor>1</primaryMonitor>
|
||||
<!-- The monitor where Openbox should place popup dialogs such as the
|
||||
focus cycling popup, or the desktop switch popup. It can be an index
|
||||
from 1, specifying a particular monitor. Or it can be one of the
|
||||
following: 'Mouse' - where the mouse is, or
|
||||
'Active' - where the active window is -->
|
||||
</placement>
|
||||
|
||||
<theme>
|
||||
<name>Clearlooks</name>
|
||||
<titleLayout>NLIMC</titleLayout>
|
||||
<!--
|
||||
available characters are NDSLIMC, each can occur at most once.
|
||||
N: window icon
|
||||
L: window label (AKA title).
|
||||
I: iconify
|
||||
M: maximize
|
||||
C: close
|
||||
S: shade (roll up/down)
|
||||
D: omnipresent (on all desktops).
|
||||
-->
|
||||
<keepBorder>yes</keepBorder>
|
||||
<animateIconify>yes</animateIconify>
|
||||
<font place="ActiveWindow">
|
||||
<name>sans</name>
|
||||
<size>8</size>
|
||||
<!-- font size in points -->
|
||||
<weight>bold</weight>
|
||||
<!-- 'bold' or 'normal' -->
|
||||
<slant>normal</slant>
|
||||
<!-- 'italic' or 'normal' -->
|
||||
</font>
|
||||
<font place="InactiveWindow">
|
||||
<name>sans</name>
|
||||
<size>8</size>
|
||||
<!-- font size in points -->
|
||||
<weight>bold</weight>
|
||||
<!-- 'bold' or 'normal' -->
|
||||
<slant>normal</slant>
|
||||
<!-- 'italic' or 'normal' -->
|
||||
</font>
|
||||
<font place="MenuHeader">
|
||||
<name>sans</name>
|
||||
<size>9</size>
|
||||
<!-- font size in points -->
|
||||
<weight>normal</weight>
|
||||
<!-- 'bold' or 'normal' -->
|
||||
<slant>normal</slant>
|
||||
<!-- 'italic' or 'normal' -->
|
||||
</font>
|
||||
<font place="MenuItem">
|
||||
<name>sans</name>
|
||||
<size>9</size>
|
||||
<!-- font size in points -->
|
||||
<weight>normal</weight>
|
||||
<!-- 'bold' or 'normal' -->
|
||||
<slant>normal</slant>
|
||||
<!-- 'italic' or 'normal' -->
|
||||
</font>
|
||||
<font place="ActiveOnScreenDisplay">
|
||||
<name>sans</name>
|
||||
<size>9</size>
|
||||
<!-- font size in points -->
|
||||
<weight>bold</weight>
|
||||
<!-- 'bold' or 'normal' -->
|
||||
<slant>normal</slant>
|
||||
<!-- 'italic' or 'normal' -->
|
||||
</font>
|
||||
<font place="InactiveOnScreenDisplay">
|
||||
<name>sans</name>
|
||||
<size>9</size>
|
||||
<!-- font size in points -->
|
||||
<weight>bold</weight>
|
||||
<!-- 'bold' or 'normal' -->
|
||||
<slant>normal</slant>
|
||||
<!-- 'italic' or 'normal' -->
|
||||
</font>
|
||||
</theme>
|
||||
|
||||
<desktops>
|
||||
<!-- this stuff is only used at startup, pagers allow you to change them
|
||||
during a session
|
||||
|
||||
these are default values to use when other ones are not already set
|
||||
by other applications, or saved in your session
|
||||
|
||||
use obconf if you want to change these without having to log out
|
||||
and back in -->
|
||||
<number>1</number>
|
||||
<firstdesk>1</firstdesk>
|
||||
<names>
|
||||
<!-- set names up here if you want to, like this:
|
||||
<name>desktop 1</name>
|
||||
<name>desktop 2</name>
|
||||
-->
|
||||
</names>
|
||||
<popupTime>875</popupTime>
|
||||
<!-- The number of milliseconds to show the popup for when switching
|
||||
desktops. Set this to 0 to disable the popup. -->
|
||||
</desktops>
|
||||
|
||||
<resize>
|
||||
<drawContents>yes</drawContents>
|
||||
<popupShow>Nonpixel</popupShow>
|
||||
<!-- 'Always', 'Never', or 'Nonpixel' (xterms and such) -->
|
||||
<popupPosition>Center</popupPosition>
|
||||
<!-- 'Center', 'Top', or 'Fixed' -->
|
||||
<popupFixedPosition>
|
||||
<!-- these are used if popupPosition is set to 'Fixed' -->
|
||||
|
||||
<x>10</x>
|
||||
<!-- positive number for distance from left edge, negative number for
|
||||
distance from right edge, or 'Center' -->
|
||||
<y>10</y>
|
||||
<!-- positive number for distance from top edge, negative number for
|
||||
distance from bottom edge, or 'Center' -->
|
||||
</popupFixedPosition>
|
||||
</resize>
|
||||
|
||||
<!-- You can reserve a portion of your screen where windows will not cover when
|
||||
they are maximized, or when they are initially placed.
|
||||
Many programs reserve space automatically, but you can use this in other
|
||||
cases. -->
|
||||
<margins>
|
||||
<top>0</top>
|
||||
<bottom>0</bottom>
|
||||
<left>0</left>
|
||||
<right>0</right>
|
||||
</margins>
|
||||
|
||||
<dock>
|
||||
<position>TopLeft</position>
|
||||
<!-- (Top|Bottom)(Left|Right|)|Top|Bottom|Left|Right|Floating -->
|
||||
<floatingX>0</floatingX>
|
||||
<floatingY>0</floatingY>
|
||||
<noStrut>no</noStrut>
|
||||
<stacking>Above</stacking>
|
||||
<!-- 'Above', 'Normal', or 'Below' -->
|
||||
<direction>Vertical</direction>
|
||||
<!-- 'Vertical' or 'Horizontal' -->
|
||||
<autoHide>no</autoHide>
|
||||
<hideDelay>300</hideDelay>
|
||||
<!-- in milliseconds (1000 = 1 second) -->
|
||||
<showDelay>300</showDelay>
|
||||
<!-- in milliseconds (1000 = 1 second) -->
|
||||
<moveButton>Middle</moveButton>
|
||||
<!-- 'Left', 'Middle', 'Right' -->
|
||||
</dock>
|
||||
|
||||
<keyboard>
|
||||
<chainQuitKey>C-g</chainQuitKey>
|
||||
|
||||
<!-- Keybindings for desktop switching -->
|
||||
<keybind key="C-A-Left">
|
||||
<action name="GoToDesktop"><to>left</to><wrap>no</wrap></action>
|
||||
</keybind>
|
||||
<keybind key="C-A-Right">
|
||||
<action name="GoToDesktop"><to>right</to><wrap>no</wrap></action>
|
||||
</keybind>
|
||||
<keybind key="C-A-Up">
|
||||
<action name="GoToDesktop"><to>up</to><wrap>no</wrap></action>
|
||||
</keybind>
|
||||
<keybind key="C-A-Down">
|
||||
<action name="GoToDesktop"><to>down</to><wrap>no</wrap></action>
|
||||
</keybind>
|
||||
<keybind key="S-A-Left">
|
||||
<action name="SendToDesktop"><to>left</to><wrap>no</wrap></action>
|
||||
</keybind>
|
||||
<keybind key="S-A-Right">
|
||||
<action name="SendToDesktop"><to>right</to><wrap>no</wrap></action>
|
||||
</keybind>
|
||||
<keybind key="S-A-Up">
|
||||
<action name="SendToDesktop"><to>up</to><wrap>no</wrap></action>
|
||||
</keybind>
|
||||
<keybind key="S-A-Down">
|
||||
<action name="SendToDesktop"><to>down</to><wrap>no</wrap></action>
|
||||
</keybind>
|
||||
<keybind key="W-F1">
|
||||
<action name="GoToDesktop"><to>1</to></action>
|
||||
</keybind>
|
||||
<keybind key="W-F2">
|
||||
<action name="GoToDesktop"><to>2</to></action>
|
||||
</keybind>
|
||||
<keybind key="W-F3">
|
||||
<action name="GoToDesktop"><to>3</to></action>
|
||||
</keybind>
|
||||
<keybind key="W-F4">
|
||||
<action name="GoToDesktop"><to>4</to></action>
|
||||
</keybind>
|
||||
<keybind key="W-d">
|
||||
<action name="ToggleShowDesktop"/>
|
||||
</keybind>
|
||||
|
||||
<!-- Keybindings for windows -->
|
||||
<keybind key="A-F4">
|
||||
<action name="Close"/>
|
||||
</keybind>
|
||||
<keybind key="A-Escape">
|
||||
<action name="Lower"/>
|
||||
<action name="FocusToBottom"/>
|
||||
<action name="Unfocus"/>
|
||||
</keybind>
|
||||
<keybind key="A-space">
|
||||
<!--action name="ShowMenu"><menu>client-menu</menu></action-->
|
||||
</keybind>
|
||||
<!-- Take a screenshot of the current window with scrot when Alt+Print are pressed -->
|
||||
<keybind key="A-Print">
|
||||
<action name="Execute"><command>scrot -s</command></action>
|
||||
</keybind>
|
||||
|
||||
<!-- Keybindings for window switching -->
|
||||
<keybind key="A-Tab">
|
||||
<action name="NextWindow">
|
||||
<finalactions>
|
||||
<action name="Focus"/>
|
||||
<action name="Raise"/>
|
||||
<action name="Unshade"/>
|
||||
</finalactions>
|
||||
</action>
|
||||
</keybind>
|
||||
<keybind key="A-S-Tab">
|
||||
<action name="PreviousWindow">
|
||||
<finalactions>
|
||||
<action name="Focus"/>
|
||||
<action name="Raise"/>
|
||||
<action name="Unshade"/>
|
||||
</finalactions>
|
||||
</action>
|
||||
</keybind>
|
||||
<keybind key="C-A-Tab">
|
||||
<action name="NextWindow">
|
||||
<panels>yes</panels><desktop>yes</desktop>
|
||||
<finalactions>
|
||||
<action name="Focus"/>
|
||||
<action name="Raise"/>
|
||||
<action name="Unshade"/>
|
||||
</finalactions>
|
||||
</action>
|
||||
</keybind>
|
||||
|
||||
<!-- Keybindings for window switching with the arrow keys -->
|
||||
<keybind key="W-S-Right">
|
||||
<action name="DirectionalCycleWindows">
|
||||
<direction>right</direction>
|
||||
</action>
|
||||
</keybind>
|
||||
<keybind key="W-S-Left">
|
||||
<action name="DirectionalCycleWindows">
|
||||
<direction>left</direction>
|
||||
</action>
|
||||
</keybind>
|
||||
<keybind key="W-S-Up">
|
||||
<action name="DirectionalCycleWindows">
|
||||
<direction>up</direction>
|
||||
</action>
|
||||
</keybind>
|
||||
<keybind key="W-S-Down">
|
||||
<action name="DirectionalCycleWindows">
|
||||
<direction>down</direction>
|
||||
</action>
|
||||
</keybind>
|
||||
|
||||
<!-- Keybindings for running applications -->
|
||||
<keybind key="W-e">
|
||||
<action name="Execute">
|
||||
<startupnotify>
|
||||
<enabled>true</enabled>
|
||||
<name>Konqueror</name>
|
||||
</startupnotify>
|
||||
<command>kfmclient openProfile filemanagement</command>
|
||||
</action>
|
||||
</keybind>
|
||||
<!-- Launch scrot when Print is pressed -->
|
||||
<keybind key="Print">
|
||||
<action name="Execute"><command>scrot</command></action>
|
||||
</keybind>
|
||||
</keyboard>
|
||||
|
||||
<mouse>
|
||||
<dragThreshold>1</dragThreshold>
|
||||
<!-- number of pixels the mouse must move before a drag begins -->
|
||||
<doubleClickTime>500</doubleClickTime>
|
||||
<!-- in milliseconds (1000 = 1 second) -->
|
||||
<screenEdgeWarpTime>400</screenEdgeWarpTime>
|
||||
<!-- Time before changing desktops when the pointer touches the edge of the
|
||||
screen while moving a window, in milliseconds (1000 = 1 second).
|
||||
Set this to 0 to disable warping -->
|
||||
<screenEdgeWarpMouse>false</screenEdgeWarpMouse>
|
||||
<!-- Set this to TRUE to move the mouse pointer across the desktop when
|
||||
switching due to hitting the edge of the screen -->
|
||||
|
||||
<context name="Frame">
|
||||
<mousebind button="A-Left" action="Press">
|
||||
<action name="Focus"/>
|
||||
<action name="Raise"/>
|
||||
</mousebind>
|
||||
<mousebind button="A-Left" action="Click">
|
||||
<action name="Unshade"/>
|
||||
</mousebind>
|
||||
<mousebind button="A-Left" action="Drag">
|
||||
<action name="Move"/>
|
||||
</mousebind>
|
||||
|
||||
<mousebind button="A-Right" action="Press">
|
||||
<action name="Focus"/>
|
||||
<action name="Raise"/>
|
||||
<action name="Unshade"/>
|
||||
</mousebind>
|
||||
<mousebind button="A-Right" action="Drag">
|
||||
<action name="Resize"/>
|
||||
</mousebind>
|
||||
|
||||
<mousebind button="A-Middle" action="Press">
|
||||
<action name="Lower"/>
|
||||
<action name="FocusToBottom"/>
|
||||
<action name="Unfocus"/>
|
||||
</mousebind>
|
||||
|
||||
<mousebind button="A-Up" action="Click">
|
||||
<action name="GoToDesktop"><to>previous</to></action>
|
||||
</mousebind>
|
||||
<mousebind button="A-Down" action="Click">
|
||||
<action name="GoToDesktop"><to>next</to></action>
|
||||
</mousebind>
|
||||
<mousebind button="C-A-Up" action="Click">
|
||||
<action name="GoToDesktop"><to>previous</to></action>
|
||||
</mousebind>
|
||||
<mousebind button="C-A-Down" action="Click">
|
||||
<action name="GoToDesktop"><to>next</to></action>
|
||||
</mousebind>
|
||||
<mousebind button="A-S-Up" action="Click">
|
||||
<action name="SendToDesktop"><to>previous</to></action>
|
||||
</mousebind>
|
||||
<mousebind button="A-S-Down" action="Click">
|
||||
<action name="SendToDesktop"><to>next</to></action>
|
||||
</mousebind>
|
||||
</context>
|
||||
|
||||
<context name="Titlebar">
|
||||
<mousebind button="Left" action="Drag">
|
||||
<action name="Move"/>
|
||||
</mousebind>
|
||||
<mousebind button="Left" action="DoubleClick">
|
||||
<action name="ToggleMaximize"/>
|
||||
</mousebind>
|
||||
|
||||
<mousebind button="Up" action="Click">
|
||||
<action name="if">
|
||||
<shaded>no</shaded>
|
||||
<then>
|
||||
<action name="Shade"/>
|
||||
<action name="FocusToBottom"/>
|
||||
<action name="Unfocus"/>
|
||||
<action name="Lower"/>
|
||||
</then>
|
||||
</action>
|
||||
</mousebind>
|
||||
<mousebind button="Down" action="Click">
|
||||
<action name="if">
|
||||
<shaded>yes</shaded>
|
||||
<then>
|
||||
<action name="Unshade"/>
|
||||
<action name="Raise"/>
|
||||
</then>
|
||||
</action>
|
||||
</mousebind>
|
||||
</context>
|
||||
|
||||
<context name="Titlebar Top Right Bottom Left TLCorner TRCorner BRCorner BLCorner">
|
||||
<mousebind button="Left" action="Press">
|
||||
<action name="Focus"/>
|
||||
<action name="Raise"/>
|
||||
<action name="Unshade"/>
|
||||
</mousebind>
|
||||
|
||||
<mousebind button="Middle" action="Press">
|
||||
<action name="Lower"/>
|
||||
<action name="FocusToBottom"/>
|
||||
<action name="Unfocus"/>
|
||||
</mousebind>
|
||||
|
||||
<!--mousebind button="Right" action="Press">
|
||||
<action name="Focus"/>
|
||||
<action name="Raise"/>
|
||||
<action name="ShowMenu"><menu>client-menu</menu></action>
|
||||
</mousebind-->
|
||||
</context>
|
||||
|
||||
<context name="Top">
|
||||
<mousebind button="Left" action="Drag">
|
||||
<action name="Resize"><edge>top</edge></action>
|
||||
</mousebind>
|
||||
</context>
|
||||
|
||||
<context name="Left">
|
||||
<mousebind button="Left" action="Drag">
|
||||
<action name="Resize"><edge>left</edge></action>
|
||||
</mousebind>
|
||||
</context>
|
||||
|
||||
<context name="Right">
|
||||
<mousebind button="Left" action="Drag">
|
||||
<action name="Resize"><edge>right</edge></action>
|
||||
</mousebind>
|
||||
</context>
|
||||
|
||||
<context name="Bottom">
|
||||
<mousebind button="Left" action="Drag">
|
||||
<action name="Resize"><edge>bottom</edge></action>
|
||||
</mousebind>
|
||||
|
||||
<!--mousebind button="Right" action="Press">
|
||||
<action name="Focus"/>
|
||||
<action name="Raise"/>
|
||||
<action name="ShowMenu"><menu>client-menu</menu></action>
|
||||
</mousebind-->
|
||||
</context>
|
||||
|
||||
<context name="TRCorner BRCorner TLCorner BLCorner">
|
||||
<mousebind button="Left" action="Press">
|
||||
<action name="Focus"/>
|
||||
<action name="Raise"/>
|
||||
<action name="Unshade"/>
|
||||
</mousebind>
|
||||
<mousebind button="Left" action="Drag">
|
||||
<action name="Resize"/>
|
||||
</mousebind>
|
||||
</context>
|
||||
|
||||
<context name="Client">
|
||||
<mousebind button="Left" action="Press">
|
||||
<action name="Focus"/>
|
||||
<action name="Raise"/>
|
||||
</mousebind>
|
||||
<mousebind button="Middle" action="Press">
|
||||
<action name="Focus"/>
|
||||
<action name="Raise"/>
|
||||
</mousebind>
|
||||
<mousebind button="Right" action="Press">
|
||||
<action name="Focus"/>
|
||||
<action name="Raise"/>
|
||||
</mousebind>
|
||||
</context>
|
||||
|
||||
<context name="Icon">
|
||||
<!--mousebind button="Left" action="Press">
|
||||
<action name="Focus"/>
|
||||
<action name="Raise"/>
|
||||
<action name="Unshade"/>
|
||||
<action name="ShowMenu"><menu>client-menu</menu></action>
|
||||
</mousebind>
|
||||
<mousebind button="Right" action="Press">
|
||||
<action name="Focus"/>
|
||||
<action name="Raise"/>
|
||||
<action name="ShowMenu"><menu>client-menu</menu></action>
|
||||
</mousebind-->
|
||||
</context>
|
||||
|
||||
<context name="AllDesktops">
|
||||
<mousebind button="Left" action="Press">
|
||||
<action name="Focus"/>
|
||||
<action name="Raise"/>
|
||||
<action name="Unshade"/>
|
||||
</mousebind>
|
||||
<mousebind button="Left" action="Click">
|
||||
<action name="ToggleOmnipresent"/>
|
||||
</mousebind>
|
||||
</context>
|
||||
|
||||
<context name="Shade">
|
||||
<mousebind button="Left" action="Press">
|
||||
<action name="Focus"/>
|
||||
<action name="Raise"/>
|
||||
</mousebind>
|
||||
<mousebind button="Left" action="Click">
|
||||
<action name="ToggleShade"/>
|
||||
</mousebind>
|
||||
</context>
|
||||
|
||||
<context name="Iconify">
|
||||
<mousebind button="Left" action="Press">
|
||||
<action name="Focus"/>
|
||||
<action name="Raise"/>
|
||||
</mousebind>
|
||||
<mousebind button="Left" action="Click">
|
||||
<action name="Iconify"/>
|
||||
</mousebind>
|
||||
</context>
|
||||
|
||||
<context name="Maximize">
|
||||
<mousebind button="Left" action="Press">
|
||||
<action name="Focus"/>
|
||||
<action name="Raise"/>
|
||||
<action name="Unshade"/>
|
||||
</mousebind>
|
||||
<mousebind button="Middle" action="Press">
|
||||
<action name="Focus"/>
|
||||
<action name="Raise"/>
|
||||
<action name="Unshade"/>
|
||||
</mousebind>
|
||||
<mousebind button="Right" action="Press">
|
||||
<action name="Focus"/>
|
||||
<action name="Raise"/>
|
||||
<action name="Unshade"/>
|
||||
</mousebind>
|
||||
<mousebind button="Left" action="Click">
|
||||
<action name="ToggleMaximize"/>
|
||||
</mousebind>
|
||||
<mousebind button="Middle" action="Click">
|
||||
<action name="ToggleMaximize"><direction>vertical</direction></action>
|
||||
</mousebind>
|
||||
<mousebind button="Right" action="Click">
|
||||
<action name="ToggleMaximize"><direction>horizontal</direction></action>
|
||||
</mousebind>
|
||||
</context>
|
||||
|
||||
<context name="Close">
|
||||
<mousebind button="Left" action="Press">
|
||||
<action name="Focus"/>
|
||||
<action name="Raise"/>
|
||||
<action name="Unshade"/>
|
||||
</mousebind>
|
||||
<mousebind button="Left" action="Click">
|
||||
<action name="Close"/>
|
||||
</mousebind>
|
||||
</context>
|
||||
|
||||
<context name="Desktop">
|
||||
<mousebind button="Up" action="Click">
|
||||
<action name="GoToDesktop"><to>previous</to></action>
|
||||
</mousebind>
|
||||
<mousebind button="Down" action="Click">
|
||||
<action name="GoToDesktop"><to>next</to></action>
|
||||
</mousebind>
|
||||
|
||||
<mousebind button="A-Up" action="Click">
|
||||
<action name="GoToDesktop"><to>previous</to></action>
|
||||
</mousebind>
|
||||
<mousebind button="A-Down" action="Click">
|
||||
<action name="GoToDesktop"><to>next</to></action>
|
||||
</mousebind>
|
||||
<mousebind button="C-A-Up" action="Click">
|
||||
<action name="GoToDesktop"><to>previous</to></action>
|
||||
</mousebind>
|
||||
<mousebind button="C-A-Down" action="Click">
|
||||
<action name="GoToDesktop"><to>next</to></action>
|
||||
</mousebind>
|
||||
|
||||
<mousebind button="Left" action="Press">
|
||||
<action name="Focus"/>
|
||||
<action name="Raise"/>
|
||||
</mousebind>
|
||||
<mousebind button="Right" action="Press">
|
||||
<action name="Focus"/>
|
||||
<action name="Raise"/>
|
||||
</mousebind>
|
||||
</context>
|
||||
|
||||
<context name="Root">
|
||||
<!-- Menus -->
|
||||
<!--mousebind button="Middle" action="Press">
|
||||
<action name="ShowMenu"><menu>client-list-combined-menu</menu></action>
|
||||
</mousebind>
|
||||
<mousebind button="Right" action="Press">
|
||||
<action name="ShowMenu"><menu>root-menu</menu></action>
|
||||
</mousebind-->
|
||||
</context>
|
||||
|
||||
<context name="MoveResize">
|
||||
<mousebind button="Up" action="Click">
|
||||
<action name="GoToDesktop"><to>previous</to></action>
|
||||
</mousebind>
|
||||
<mousebind button="Down" action="Click">
|
||||
<action name="GoToDesktop"><to>next</to></action>
|
||||
</mousebind>
|
||||
<mousebind button="A-Up" action="Click">
|
||||
<action name="GoToDesktop"><to>previous</to></action>
|
||||
</mousebind>
|
||||
<mousebind button="A-Down" action="Click">
|
||||
<action name="GoToDesktop"><to>next</to></action>
|
||||
</mousebind>
|
||||
</context>
|
||||
</mouse>
|
||||
|
||||
<menu>
|
||||
<!-- You can specify more than one menu file in here and they are all loaded,
|
||||
just don't make menu ids clash or, well, it'll be kind of pointless -->
|
||||
|
||||
<!-- default menu file (or custom one in $HOME/.config/openbox/) -->
|
||||
<!-- system menu files on Debian systems -->
|
||||
<!--file>/var/lib/openbox/debian-menu.xml</file-->
|
||||
<file>menu.xml</file>
|
||||
<hideDelay>200</hideDelay>
|
||||
<!-- if a press-release lasts longer than this setting (in milliseconds), the
|
||||
menu is hidden again -->
|
||||
<middle>no</middle>
|
||||
<!-- center submenus vertically about the parent entry -->
|
||||
<submenuShowDelay>100</submenuShowDelay>
|
||||
<!-- time to delay before showing a submenu after hovering over the parent
|
||||
entry.
|
||||
if this is a negative value, then the delay is infinite and the
|
||||
submenu will not be shown until it is clicked on -->
|
||||
<submenuHideDelay>400</submenuHideDelay>
|
||||
<!-- time to delay before hiding a submenu when selecting another
|
||||
entry in parent menu
|
||||
if this is a negative value, then the delay is infinite and the
|
||||
submenu will not be hidden until a different submenu is opened -->
|
||||
<showIcons>yes</showIcons>
|
||||
<!-- controls if icons appear in the client-list-(combined-)menu -->
|
||||
<manageDesktops>yes</manageDesktops>
|
||||
<!-- show the manage desktops section in the client-list-(combined-)menu -->
|
||||
</menu>
|
||||
|
||||
<applications>
|
||||
<!--
|
||||
# this is an example with comments through out. use these to make your
|
||||
# own rules, but without the comments of course.
|
||||
# you may use one or more of the name/class/role/title/type rules to specify
|
||||
# windows to match
|
||||
|
||||
<application name="the window's _OB_APP_NAME property (see obxprop)"
|
||||
class="the window's _OB_APP_CLASS property (see obxprop)"
|
||||
groupname="the window's _OB_APP_GROUP_NAME property (see obxprop)"
|
||||
groupclass="the window's _OB_APP_GROUP_CLASS property (see obxprop)"
|
||||
role="the window's _OB_APP_ROLE property (see obxprop)"
|
||||
title="the window's _OB_APP_TITLE property (see obxprop)"
|
||||
type="the window's _OB_APP_TYPE property (see obxprob)..
|
||||
(if unspecified, then it is 'dialog' for child windows)">
|
||||
# you may set only one of name/class/role/title/type, or you may use more
|
||||
# than one together to restrict your matches.
|
||||
|
||||
# the name, class, role, and title use simple wildcard matching such as those
|
||||
# used by a shell. you can use * to match any characters and ? to match
|
||||
# any single character.
|
||||
|
||||
# the type is one of: normal, dialog, splash, utility, menu, toolbar, dock,
|
||||
# or desktop
|
||||
|
||||
# when multiple rules match a window, they will all be applied, in the
|
||||
# order that they appear in this list
|
||||
|
||||
|
||||
# each rule element can be left out or set to 'default' to specify to not
|
||||
# change that attribute of the window
|
||||
|
||||
<decor>yes</decor>
|
||||
# enable or disable window decorations
|
||||
|
||||
<shade>no</shade>
|
||||
# make the window shaded when it appears, or not
|
||||
|
||||
<position force="no">
|
||||
# the position is only used if both an x and y coordinate are provided
|
||||
# (and not set to 'default')
|
||||
# when force is "yes", then the window will be placed here even if it
|
||||
# says you want it placed elsewhere. this is to override buggy
|
||||
# applications who refuse to behave
|
||||
<x>center</x>
|
||||
# a number like 50, or 'center' to center on screen. use a negative number
|
||||
# to start from the right (or bottom for <y>), ie -50 is 50 pixels from
|
||||
# the right edge (or bottom). use 'default' to specify using value
|
||||
# provided by the application, or chosen by openbox, instead.
|
||||
<y>200</y>
|
||||
<monitor>1</monitor>
|
||||
# specifies the monitor in a xinerama setup.
|
||||
# 1 is the first head, or 'mouse' for wherever the mouse is
|
||||
</position>
|
||||
|
||||
<size>
|
||||
# the size to make the window.
|
||||
<width>20</width>
|
||||
# a number like 20, or 'default' to use the size given by the application.
|
||||
# you can use fractions such as 1/2 or percentages such as 75% in which
|
||||
# case the value is relative to the size of the monitor that the window
|
||||
# appears on.
|
||||
<height>30%</height>
|
||||
</size>
|
||||
|
||||
<focus>yes</focus>
|
||||
# if the window should try be given focus when it appears. if this is set
|
||||
# to yes it doesn't guarantee the window will be given focus. some
|
||||
# restrictions may apply, but Openbox will try to
|
||||
|
||||
<desktop>1</desktop>
|
||||
# 1 is the first desktop, 'all' for all desktops
|
||||
|
||||
<layer>normal</layer>
|
||||
# 'above', 'normal', or 'below'
|
||||
|
||||
<iconic>no</iconic>
|
||||
# make the window iconified when it appears, or not
|
||||
|
||||
<skip_pager>no</skip_pager>
|
||||
# asks to not be shown in pagers
|
||||
|
||||
<skip_taskbar>no</skip_taskbar>
|
||||
# asks to not be shown in taskbars. window cycling actions will also
|
||||
# skip past such windows
|
||||
|
||||
<fullscreen>yes</fullscreen>
|
||||
# make the window in fullscreen mode when it appears
|
||||
|
||||
<maximized>true</maximized>
|
||||
# 'Horizontal', 'Vertical' or boolean (yes/no)
|
||||
</application>
|
||||
|
||||
# end of the example
|
||||
-->
|
||||
</applications>
|
||||
|
||||
</openbox_config>
|
@ -1,22 +0,0 @@
|
||||
[program:vncviewer]
|
||||
environment=HOME="/home/%(ENV_USER)s",USER="%(ENV_USER)s",DISPLAY="%(ENV_DISPLAY)s"
|
||||
command=/usr/bin/vncviewer -autopass -x11cursor -nojpeg -quality 9 -compresslevel 9 %(ENV_NEKO_VNC_URL)s
|
||||
stopsignal=INT
|
||||
autorestart=true
|
||||
priority=800
|
||||
user=%(ENV_USER)s
|
||||
stdout_logfile=/var/log/neko/vncviewer.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
|
2
.github/workflows/build.yml
vendored
2
.github/workflows/build.yml
vendored
@ -48,7 +48,7 @@ jobs:
|
||||
needs: [ build-base ]
|
||||
strategy:
|
||||
matrix:
|
||||
tags: [ firefox, chromium, google-chrome, ungoogled-chromium, microsoft-edge, brave, tor-browser, vncviewer, vlc, xfce ]
|
||||
tags: [ firefox, chromium, google-chrome, ungoogled-chromium, microsoft-edge, brave, tor-browser, remmina, vlc, xfce ]
|
||||
env:
|
||||
DOCKER_TAG: ${{ matrix.tags }}
|
||||
steps:
|
||||
|
4
.github/workflows/tags.yml
vendored
4
.github/workflows/tags.yml
vendored
@ -79,8 +79,8 @@ jobs:
|
||||
platforms: linux/amd64
|
||||
- tag: tor-browser
|
||||
platforms: linux/amd64,linux/arm64
|
||||
- tag: vncviewer
|
||||
platforms: linux/amd64,linux/arm64
|
||||
- tag: remmina
|
||||
platforms: linux/amd64
|
||||
- tag: vlc
|
||||
platforms: linux/amd64,linux/arm64
|
||||
- tag: xfce
|
||||
|
@ -11,11 +11,15 @@
|
||||
- Fixed clipboard sync in chromium based browsers.
|
||||
- Added support for implicit control (using `NEKO_IMPLICITCONTROL=1`). That means, users do not need to request control prior usage.
|
||||
- Automatically start broadcasting using `NEKO_BROADCAST_URL=rtmp://your-rtmp-endpoint/live` (thanks @konsti).
|
||||
- Added `m1k1o/neko:remmina` tag (by @lowne).
|
||||
|
||||
### Misc
|
||||
- Automatic WebRTC SDP negotiation using onnegotiationneeded handlers. This allows adding/removing track on demand in a session.
|
||||
- Added UDP and TCP mux for WebRTC connection. It should handle multiple peers.
|
||||
- Broadcast status change is sent to all admins now.
|
||||
- NordVPN replaced with Sponsorblock extension in default configuration #144.
|
||||
- Removed `vncviewer` image, as its functionality is replaced and extended by remmina.
|
||||
- Opus uses `useinbandfec=1` from now on, hopefully fixes minor audio loss issues.
|
||||
|
||||
## [n.eko v2.5](https://github.com/m1k1o/neko/releases/tag/v2.5)
|
||||
|
||||
|
@ -8,7 +8,9 @@ Use the following docker images:
|
||||
- `m1k1o/neko:microsoft-edge` - for Microsoft Edge (needs `--cap-add=SYS_ADMIN`, see the [security implications](https://www.redhat.com/en/blog/container-tidbits-adding-capabilities-container)).
|
||||
- `m1k1o/neko:brave` - for [Brave Browser](https://brave.com) (needs `--cap-add=SYS_ADMIN`, see the [security implications](https://www.redhat.com/en/blog/container-tidbits-adding-capabilities-container)).
|
||||
- `m1k1o/neko:tor-browser` - for Tor Browser.
|
||||
- `m1k1o/neko:vncviewer` - for simple VNC viewer (specify `NEKO_VNC_URL` to your VNC target).
|
||||
- `m1k1o/neko:remmina` - for remote desktop connection (by @lowne).
|
||||
- Pass env var `REMMINA_URL=<proto>://[<username>[:<password>]@]server[:port]` (proto being `vnc`, `rdp` or `spice`).
|
||||
- Or create your custom configuration with remmina locally (it's saved in `~/.local/share/remmina/path_to_profile.remmina`) and bind-mount it, then pass env var `REMMINA_PROFILE=<path_to_profile.remmina>`.
|
||||
- `m1k1o/neko:vlc` - for VLC Video player (needs volume mounted to `/media` with local video files, or setting `VLC_MEDIA=/media` path).
|
||||
- `m1k1o/neko:xfce` - for a shared desktop / installing shared software.
|
||||
- `m1k1o/neko:base` - for custom base.
|
||||
@ -79,6 +81,11 @@ services:
|
||||
- There are no accounts, display name (a.k.a. username) can be freely chosen. Only password needs to match. Depending on which password matches, the visitor gets its privilege:
|
||||
- Anyone, who enters with `NEKO_PASSWORD` will be **user**.
|
||||
- Anyone, who enters with `NEKO_PASSWORD_ADMIN` will be **admin**.
|
||||
- Disabling passwords is not possible. However, you can use following query parameters to create auto-join links:
|
||||
- Adding `?pwd=<password>` will prefill password.
|
||||
- Adding `?usr=<display-name>` will prefill username.
|
||||
- Adding `?cast=1` will hide all control and show only video.
|
||||
- e.g. `http(s)://<URL:Port>/?pwd=neko&usr=guest&cast=1`
|
||||
|
||||
### Screen size
|
||||
- Only admins can change screen size.
|
||||
|
@ -1,79 +1,148 @@
|
||||
# Configuration
|
||||
|
||||
Config values can be set using three methods, sorted on this page by priority.
|
||||
|
||||
Example, setting `nat1to1` variable:
|
||||
- As env variable: `NEKO_NAT1TO1=<ip>`
|
||||
- As argument: `--nat1to1=<ip>`
|
||||
- In YAML config file:
|
||||
```yaml
|
||||
nat1to1: <ip>
|
||||
```
|
||||
|
||||
## Environment variables
|
||||
|
||||
```
|
||||
NEKO_SCREEN:
|
||||
#### `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_AUDIO_BITRATE:
|
||||
- Bitrate of the audio stream in kb/s
|
||||
- e.g. 196
|
||||
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'
|
||||
NEKO_ICELITE:
|
||||
- Use the ice lite protocol
|
||||
- e.g. false
|
||||
NEKO_ICESERVER:
|
||||
- Describes a single STUN and TURN server that can be used by the ICEAgent to establish a connection with a peer (simple usage for server without authentication)
|
||||
- e.g. 'stun:stun.l.google.com:19302'
|
||||
NEKO_ICESERVERS:
|
||||
- Describes multiple STUN and TURN server that can be used by the ICEAgent to establish a connection with a peer
|
||||
- e.g. '[{"urls": ["turn:turn.example.com:19302", "stun:stun.example.com:19302"], "username": "name", "credential": "password"}, {"urls": ["stun:stun.example2.com:19302"]}]'
|
||||
- [More information](https://developer.mozilla.org/en-US/docs/Web/API/RTCIceServer)
|
||||
NEKO_LOCKS:
|
||||
- Resources, that will be locked when starting, separated by whitespace.
|
||||
- Currently supported: control login
|
||||
NEKO_CONTROL_PROTECTION:
|
||||
- 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_CONTROL_PROTECTION`:
|
||||
- Control protection means, users can gain control only if at least one admin is in the room.
|
||||
- e.g. false
|
||||
NEKO_BROADCAST_URL:
|
||||
- Set a default URL for broadcast streams. Setting this value will automatically enable broadcasting when n.eko starts. It can be disabled/changed later in GUI.
|
||||
```
|
||||
- e.g. `false`
|
||||
#### `NEKO_IMPLICIT_CONTROL`:
|
||||
- If enabled members can gain control implicitly, they don't needd to request control.
|
||||
- e.g. `false`
|
||||
#### `NEKO_LOCKS`:
|
||||
- Resources, that will be locked when starting, separated by whitespace.
|
||||
- Currently supported:
|
||||
- `control`
|
||||
- `login`
|
||||
- e.g. `control`
|
||||
|
||||
### WebRTC
|
||||
|
||||
#### `NEKO_EPR`:
|
||||
- For WebRTC needed range of UDP ports.
|
||||
- e.g. `52000-52099`
|
||||
#### `NEKO_UDPMUX`:
|
||||
- Alternative to epr with only one UDP port.
|
||||
- e.g. `52100`
|
||||
#### `NEKO_TCPMUX`:
|
||||
- Use TCP connection, meant as fallback for UDP.
|
||||
- e.g. `52100`
|
||||
#### `NEKO_NAT1TO1`:
|
||||
- IP of the server that will be sent to client, if not specified, public IP is automatically resolved.
|
||||
- e.g. `10.0.0.1`
|
||||
#### `NEKO_IPFETCH`:
|
||||
- Automatically fetch IP address from given URL when `nat1to1` is not specified.
|
||||
- e.g. `http://checkip.amazonaws.com`
|
||||
#### `NEKO_ICELITE`:
|
||||
- Use the ice lite protocol.
|
||||
- e.g. `false`
|
||||
#### `NEKO_ICESERVER`:
|
||||
- Describes a single STUN and TURN server that can be used by the ICEAgent to establish a connection with a peer (simple usage for server without authentication).
|
||||
- e.g. `stun:stun.l.google.com:19302`
|
||||
#### `NEKO_ICESERVERS`:
|
||||
- Describes multiple STUN and TURN server that can be used by the ICEAgent to establish a connection with a peer.
|
||||
- e.g. `[{"urls": ["turn:turn.example.com:19302", "stun:stun.example.com:19302"], "username": "name", "credential": "password"}, {"urls": ["stun:stun.example2.com:19302"]}]`
|
||||
- [More information](https://developer.mozilla.org/en-US/docs/Web/API/RTCIceServer)
|
||||
|
||||
### Video
|
||||
|
||||
#### `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 video pipeline. 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_HWENC`:
|
||||
- Use hardware accelerated encoding, for now supported only `VAAPI`.
|
||||
- e.g. `VAAPI`
|
||||
|
||||
### Audio
|
||||
|
||||
#### `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_AUDIO_BITRATE`:
|
||||
- Bitrate of the audio stream in kb/s.
|
||||
- e.g. `196`
|
||||
#### `NEKO_AUDIO`:
|
||||
- Makes it possible to create custom gstreamer audio pipeline, same as for video.
|
||||
e.g. `pulsesrc device=%s ! audio/x-raw,channels=2 ! audioconvert ! opusenc bitrate=128000`
|
||||
|
||||
### Broadcast
|
||||
|
||||
#### `NEKO_BROADCAST_PIPELINE`:
|
||||
- Makes it possible to create custom gstreamer pipeline used for broadcasting, strings `{url}`, `{device}` and `{display}` will be replaced.
|
||||
#### `NEKO_BROADCAST_URL`:
|
||||
- Set a default URL for broadcast streams. Setting this value will automatically enable broadcasting when n.eko starts. It can be disabled/changed later by admins in the GUI.
|
||||
- e.g. `rtmp://<your-server>:1935/ingest/<stream-key>`
|
||||
|
||||
### Server
|
||||
|
||||
#### `NEKO_BIND`:
|
||||
- Address/port/socket where neko binds to *(default 127.0.0.1:8080)*.
|
||||
- e.g. `:8080`
|
||||
#### `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`
|
||||
#### `NEKO_PROXY`:
|
||||
- Enable reverse proxy mode, so that neko trusts `X-Forwarded-For` headers.
|
||||
- e.g. `false`
|
||||
|
||||
### Expert settings
|
||||
|
||||
#### `NEKO_DISPLAY`:
|
||||
- XDisplay to capture.
|
||||
#### `NEKO_DEVICE`:
|
||||
- Audio device be to captured.
|
||||
#### `NEKO_STATIC`:
|
||||
- Path to neko client files to serve.
|
||||
|
||||
## Agruments
|
||||
|
||||
@ -97,6 +166,7 @@ Flags:
|
||||
--g722 use G722 audio codec
|
||||
--h264 use H264 video codec
|
||||
-h, --help help for serve
|
||||
--hwenc string use hardware accelerated encoding
|
||||
--icelite configures whether or not the ice agent should be a lite agent
|
||||
--iceserver strings describes a single STUN and TURN server that can be used by the ICEAgent to establish a connection with a peer (default [stun:stun.l.google.com:19302])
|
||||
--iceservers string describes a single STUN and TURN server that can be used by the ICEAgent to establish a connection with a peer
|
||||
@ -130,3 +200,30 @@ Global Flags:
|
||||
## Config file
|
||||
|
||||
You can mount YAML config file to docker container on this path `/etc/neko/neko.yaml` and store your configuration there.
|
||||
|
||||
Config uses the keys from arguments, that can be viewed in program's help output.
|
||||
|
||||
Example (with just some of the available arguments):
|
||||
|
||||
```yaml
|
||||
# audio bitrate in kbit/s
|
||||
audio_bitrate: 128
|
||||
|
||||
# video bitrate in kbit/s
|
||||
video_bitrate: 3072
|
||||
|
||||
# maximum fps delivered via WebRTC, 0 is for no maximum
|
||||
max_fps: 25
|
||||
|
||||
# password for connecting to stream
|
||||
password: "neko"
|
||||
|
||||
# admin password for connecting to stream
|
||||
password_admin: "admin"
|
||||
|
||||
# default screen resolution and framerate
|
||||
screen: "1280x720@30"
|
||||
|
||||
# limits the pool of ephemeral ports that ICE UDP connections can allocate from
|
||||
epr: "59000-59100"
|
||||
```
|
||||
|
@ -79,7 +79,7 @@ func CreateRTMPPipeline(pipelineDevice string, pipelineDisplay string, pipelineS
|
||||
}
|
||||
|
||||
// CreateAppPipeline creates a GStreamer Pipeline
|
||||
func CreateAppPipeline(codecName string, pipelineDevice string, pipelineSrc string, fps int, bitrate uint) (*Pipeline, error) {
|
||||
func CreateAppPipeline(codecName string, pipelineDevice string, pipelineSrc string, fps int, bitrate uint, hwenc string) (*Pipeline, error) {
|
||||
pipelineStr := " ! appsink name=appsink"
|
||||
|
||||
// if using custom pipeline
|
||||
@ -90,14 +90,24 @@ func CreateAppPipeline(codecName string, pipelineDevice string, pipelineSrc stri
|
||||
|
||||
switch codecName {
|
||||
case "VP8":
|
||||
// https://gstreamer.freedesktop.org/documentation/vpx/vp8enc.html?gi-language=c
|
||||
// gstreamer1.0-plugins-good
|
||||
// vp8enc error-resilient=partitions keyframe-max-dist=10 auto-alt-ref=true cpu-used=5 deadline=1
|
||||
if err := CheckPlugins([]string{"ximagesrc", "vpx"}); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if hwenc == "VAAPI" {
|
||||
if err := CheckPlugins([]string{"ximagesrc", "vaapi"}); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
// vp8 encode is missing from gstreamer.freedesktop.org/documentation
|
||||
// note that it was removed from some recent intel CPUs: https://trac.ffmpeg.org/wiki/Hardware/QuickSync
|
||||
// https://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer-vaapi-plugins/html/gstreamer-vaapi-plugins-vaapivp8enc.html
|
||||
pipelineStr = fmt.Sprintf(videoSrc+"video/x-raw,format=NV12 ! vaapivp8enc rate-control=vbr bitrate=%d keyframe-period=180"+pipelineStr, pipelineDevice, fps, bitrate)
|
||||
} else {
|
||||
// https://gstreamer.freedesktop.org/documentation/vpx/vp8enc.html?gi-language=c
|
||||
// gstreamer1.0-plugins-good
|
||||
// vp8enc error-resilient=partitions keyframe-max-dist=10 auto-alt-ref=true cpu-used=5 deadline=1
|
||||
if err := CheckPlugins([]string{"ximagesrc", "vpx"}); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
pipelineStr = fmt.Sprintf(videoSrc+"vp8enc target-bitrate=%d cpu-used=4 end-usage=cbr threads=4 deadline=1 undershoot=95 buffer-size=%d buffer-initial-size=%d buffer-optimal-size=%d keyframe-max-dist=180 min-quantizer=3 max-quantizer=40"+pipelineStr, pipelineDevice, fps, bitrate*1000, bitrate*6, bitrate*4, bitrate*5)
|
||||
pipelineStr = fmt.Sprintf(videoSrc+"vp8enc target-bitrate=%d cpu-used=4 end-usage=cbr threads=4 deadline=1 undershoot=95 buffer-size=%d buffer-initial-size=%d buffer-optimal-size=%d keyframe-max-dist=180 min-quantizer=3 max-quantizer=40"+pipelineStr, pipelineDevice, fps, bitrate*1000, bitrate*6, bitrate*4, bitrate*5)
|
||||
}
|
||||
case "VP9":
|
||||
// https://gstreamer.freedesktop.org/documentation/vpx/vp9enc.html?gi-language=c
|
||||
// gstreamer1.0-plugins-good
|
||||
@ -112,27 +122,36 @@ func CreateAppPipeline(codecName string, pipelineDevice string, pipelineSrc stri
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// https://gstreamer.freedesktop.org/documentation/openh264/openh264enc.html?gi-language=c#openh264enc
|
||||
// gstreamer1.0-plugins-bad
|
||||
// openh264enc multi-thread=4 complexity=high bitrate=3072000 max-bitrate=4096000
|
||||
if err := CheckPlugins([]string{"openh264"}); err == nil {
|
||||
pipelineStr = fmt.Sprintf(videoSrc+"openh264enc multi-thread=4 complexity=high bitrate=%d max-bitrate=%d ! video/x-h264,stream-format=byte-stream"+pipelineStr, pipelineDevice, fps, bitrate*1000, (bitrate+1024)*1000)
|
||||
break
|
||||
}
|
||||
if hwenc == "VAAPI" {
|
||||
if err := CheckPlugins([]string{"vaapi"}); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// https://gstreamer.freedesktop.org/documentation/x264/index.html?gi-language=c
|
||||
// gstreamer1.0-plugins-ugly
|
||||
// video/x-raw,format=I420 ! x264enc bframes=0 key-int-max=60 byte-stream=true tune=zerolatency speed-preset=veryfast ! video/x-h264,stream-format=byte-stream
|
||||
if err := CheckPlugins([]string{"x264"}); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
pipelineStr = fmt.Sprintf(videoSrc+"video/x-raw,format=NV12 ! vaapih264enc rate-control=vbr bitrate=%d keyframe-period=180 quality-level=7 ! video/x-h264,stream-format=byte-stream"+pipelineStr, pipelineDevice, fps, bitrate)
|
||||
|
||||
vbvbuf := uint(1000)
|
||||
if bitrate > 1000 {
|
||||
vbvbuf = bitrate
|
||||
}
|
||||
} else {
|
||||
// https://gstreamer.freedesktop.org/documentation/openh264/openh264enc.html?gi-language=c#openh264enc
|
||||
// gstreamer1.0-plugins-bad
|
||||
// openh264enc multi-thread=4 complexity=high bitrate=3072000 max-bitrate=4096000
|
||||
if err := CheckPlugins([]string{"openh264"}); err == nil {
|
||||
pipelineStr = fmt.Sprintf(videoSrc+"openh264enc multi-thread=4 complexity=high bitrate=%d max-bitrate=%d ! video/x-h264,stream-format=byte-stream"+pipelineStr, pipelineDevice, fps, bitrate*1000, (bitrate+1024)*1000)
|
||||
break
|
||||
}
|
||||
|
||||
pipelineStr = fmt.Sprintf(videoSrc+"video/x-raw,format=NV12 ! x264enc threads=4 bitrate=%d key-int-max=60 vbv-buf-capacity=%d byte-stream=true tune=zerolatency speed-preset=veryfast ! video/x-h264,stream-format=byte-stream"+pipelineStr, pipelineDevice, fps, bitrate, vbvbuf)
|
||||
// https://gstreamer.freedesktop.org/documentation/x264/index.html?gi-language=c
|
||||
// gstreamer1.0-plugins-ugly
|
||||
// video/x-raw,format=I420 ! x264enc bframes=0 key-int-max=60 byte-stream=true tune=zerolatency speed-preset=veryfast ! video/x-h264,stream-format=byte-stream
|
||||
if err := CheckPlugins([]string{"x264"}); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
vbvbuf := uint(1000)
|
||||
if bitrate > 1000 {
|
||||
vbvbuf = bitrate
|
||||
}
|
||||
|
||||
pipelineStr = fmt.Sprintf(videoSrc+"video/x-raw,format=NV12 ! x264enc threads=4 bitrate=%d key-int-max=60 vbv-buf-capacity=%d byte-stream=true tune=zerolatency speed-preset=veryfast ! video/x-h264,stream-format=byte-stream"+pipelineStr, pipelineDevice, fps, bitrate, vbvbuf)
|
||||
}
|
||||
case "Opus":
|
||||
// https://gstreamer.freedesktop.org/documentation/opus/opusenc.html
|
||||
// gstreamer1.0-plugins-base
|
||||
@ -141,7 +160,7 @@ func CreateAppPipeline(codecName string, pipelineDevice string, pipelineSrc stri
|
||||
return nil, err
|
||||
}
|
||||
|
||||
pipelineStr = fmt.Sprintf(audioSrc+"opusenc bitrate=%d"+pipelineStr, pipelineDevice, bitrate*1000)
|
||||
pipelineStr = fmt.Sprintf(audioSrc+"opusenc inband-fec=true bitrate=%d"+pipelineStr, pipelineDevice, bitrate*1000)
|
||||
case "G722":
|
||||
// https://gstreamer.freedesktop.org/documentation/libav/avenc_g722.html?gi-language=c
|
||||
// gstreamer1.0-libav
|
||||
|
@ -147,6 +147,7 @@ func (manager *RemoteManager) createPipelines() {
|
||||
manager.config.VideoParams,
|
||||
rate,
|
||||
manager.config.VideoBitrate,
|
||||
manager.config.VideoHWEnc,
|
||||
)
|
||||
if err != nil {
|
||||
manager.logger.Panic().Err(err).Msg("unable to create video pipeline")
|
||||
@ -158,6 +159,7 @@ func (manager *RemoteManager) createPipelines() {
|
||||
manager.config.AudioParams,
|
||||
0, // fps: n/a for audio
|
||||
manager.config.AudioBitrate,
|
||||
"", // hwenc: n/a for audio
|
||||
)
|
||||
if err != nil {
|
||||
manager.logger.Panic().Err(err).Msg("unable to create audio pipeline")
|
||||
@ -197,6 +199,7 @@ func (manager *RemoteManager) ChangeResolution(width int, height int, rate int)
|
||||
manager.config.VideoParams,
|
||||
rate,
|
||||
manager.config.VideoBitrate,
|
||||
manager.config.VideoHWEnc,
|
||||
)
|
||||
if err != nil {
|
||||
manager.logger.Panic().Err(err).Msg("unable to create new video pipeline")
|
||||
|
@ -14,6 +14,7 @@ type Remote struct {
|
||||
AudioCodec string
|
||||
AudioParams string
|
||||
AudioBitrate uint
|
||||
VideoHWEnc string
|
||||
VideoCodec string
|
||||
VideoParams string
|
||||
VideoBitrate uint
|
||||
@ -64,6 +65,12 @@ func (Remote) Init(cmd *cobra.Command) error {
|
||||
return err
|
||||
}
|
||||
|
||||
// hw encoding
|
||||
cmd.PersistentFlags().String("hwenc", "", "use hardware accelerated encoding")
|
||||
if err := viper.BindPFlag("hwenc", cmd.PersistentFlags().Lookup("hwenc")); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
// video codecs
|
||||
cmd.PersistentFlags().Bool("vp8", false, "use VP8 video codec")
|
||||
if err := viper.BindPFlag("vp8", cmd.PersistentFlags().Lookup("vp8")); err != nil {
|
||||
@ -105,15 +112,6 @@ func (Remote) Init(cmd *cobra.Command) error {
|
||||
}
|
||||
|
||||
func (s *Remote) Set() {
|
||||
videoCodec := "VP8"
|
||||
if viper.GetBool("vp8") {
|
||||
videoCodec = "VP8"
|
||||
} else if viper.GetBool("vp9") {
|
||||
videoCodec = "VP9"
|
||||
} else if viper.GetBool("h264") {
|
||||
videoCodec = "H264"
|
||||
}
|
||||
|
||||
audioCodec := "Opus"
|
||||
if viper.GetBool("opus") {
|
||||
audioCodec = "Opus"
|
||||
@ -129,7 +127,21 @@ func (s *Remote) Set() {
|
||||
s.AudioCodec = audioCodec
|
||||
s.AudioParams = viper.GetString("audio")
|
||||
s.AudioBitrate = viper.GetUint("audio_bitrate")
|
||||
|
||||
videoCodec := "VP8"
|
||||
if viper.GetBool("vp8") {
|
||||
videoCodec = "VP8"
|
||||
} else if viper.GetBool("vp9") {
|
||||
videoCodec = "VP9"
|
||||
} else if viper.GetBool("h264") {
|
||||
videoCodec = "H264"
|
||||
}
|
||||
videoHWEnc := ""
|
||||
if viper.GetString("hwenc") == "VAAPI" {
|
||||
videoHWEnc = "VAAPI"
|
||||
}
|
||||
s.Display = viper.GetString("display")
|
||||
s.VideoHWEnc = videoHWEnc
|
||||
s.VideoCodec = videoCodec
|
||||
s.VideoParams = viper.GetString("video")
|
||||
s.VideoBitrate = viper.GetUint("video_bitrate")
|
||||
|
@ -322,7 +322,7 @@ func (manager *WebRTCManager) createTrack(codecName string) (*webrtc.TrackLocalS
|
||||
codec = webrtc.RTPCodecParameters{RTPCodecCapability: webrtc.RTPCodecCapability{MimeType: webrtc.MimeTypeH264, ClockRate: 90000, Channels: 0, SDPFmtpLine: "level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42e01f", RTCPFeedback: fb}, PayloadType: 102}
|
||||
id = "video"
|
||||
case "Opus":
|
||||
codec = webrtc.RTPCodecParameters{RTPCodecCapability: webrtc.RTPCodecCapability{MimeType: webrtc.MimeTypeOpus, ClockRate: 48000, Channels: 2, SDPFmtpLine: "", RTCPFeedback: fb}, PayloadType: 111}
|
||||
codec = webrtc.RTPCodecParameters{RTPCodecCapability: webrtc.RTPCodecCapability{MimeType: webrtc.MimeTypeOpus, ClockRate: 48000, Channels: 2, SDPFmtpLine: "useinbandfec=1", RTCPFeedback: fb}, PayloadType: 111}
|
||||
id = "audio"
|
||||
case "G722":
|
||||
codec = webrtc.RTPCodecParameters{RTPCodecCapability: webrtc.RTPCodecCapability{MimeType: webrtc.MimeTypeG722, ClockRate: 8000, Channels: 0, SDPFmtpLine: "", RTCPFeedback: fb}, PayloadType: 9}
|
||||
|
Reference in New Issue
Block a user