From ca2a98b14c82f7b28a37f9bf3711f99bb73b0903 Mon Sep 17 00:00:00 2001 From: Alexandre DEVELY <12896316+alexandredevely@users.noreply.github.com> Date: Wed, 11 Mar 2026 15:23:56 +0100 Subject: [PATCH 01/28] Fix Dockerfile remove vim --- Dockerfile.ubuntu | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile.ubuntu b/Dockerfile.ubuntu index a7ffb95..4677af7 100644 --- a/Dockerfile.ubuntu +++ b/Dockerfile.ubuntu @@ -340,7 +340,7 @@ RUN date > /etc/build.date # install qterminal xfonts-base RUN if [ "${TARGET_MODE}" != "hardening" ]; then \ apt-get update && \ - apt-get install -y --no-install-recommends qterminal vim vim-gtk3 && \ + apt-get install -y --no-install-recommends qterminal vim-gtk3 && \ rm -rf /usr/share/applications/qterminal-drop.desktop && \ apt-get clean && rm -rf /var/lib/apt/lists/*; \ fi From b2062ee3a25e5392757b654b59470ba29ccf13a6 Mon Sep 17 00:00:00 2001 From: alexandredevely <12896316+alexandredevely@users.noreply.github.com> Date: Wed, 11 Mar 2026 15:28:24 +0100 Subject: [PATCH 02/28] move vim to sudo --- Dockerfile.ubuntu | 2 +- Dockerfile.ubuntu.sudo | 14 ++------------ 2 files changed, 3 insertions(+), 13 deletions(-) diff --git a/Dockerfile.ubuntu b/Dockerfile.ubuntu index 4677af7..d963459 100644 --- a/Dockerfile.ubuntu +++ b/Dockerfile.ubuntu @@ -341,7 +341,7 @@ RUN date > /etc/build.date RUN if [ "${TARGET_MODE}" != "hardening" ]; then \ apt-get update && \ apt-get install -y --no-install-recommends qterminal vim-gtk3 && \ - rm -rf /usr/share/applications/qterminal-drop.desktop && \ + rm -rf /usr/share/applications/qterminal-drop.desktop && \ apt-get clean && rm -rf /var/lib/apt/lists/*; \ fi diff --git a/Dockerfile.ubuntu.sudo b/Dockerfile.ubuntu.sudo index 44e958e..f765b96 100644 --- a/Dockerfile.ubuntu.sudo +++ b/Dockerfile.ubuntu.sudo @@ -1,17 +1,8 @@ ARG BASE_IMAGE=dummy -ARG BASE_IMAGE_RELEASE=4.0 +ARG BASE_IMAGE_RELEASE=release ARG TARGETPLATFORM ARG BUILDPLATFORM -# Default release is 22.04 ARG TAG=latest - -# ABCDESKTOP_LOCALACCOUNT_DIR arg -# use in ENV ABCDESKTOP_LOCALACCOUNT_DIR=$ABCDESKTOP_LOCALACCOUNT_DIR -# release >= 3.1 set value to "/etc/localaccount" -# release < 3.1 set value to "/var/secrets/abcdesktop/localaccount" -ARG ABCDESKTOP_LOCALACCOUNT_DIR -# ="/etc/localaccount" - # # create package for openbox # deb files will be located in /root/packages/$(uname -m) directory @@ -19,11 +10,10 @@ ARG ABCDESKTOP_LOCALACCOUNT_DIR FROM ${BASE_IMAGE}:${BASE_IMAGE_RELEASE} ARG TARGET_MODE ENV TARGET_MODE=$TARGET_MODE -USER 0 # install sudo # install qterminal xfonts-base # allow all users to run sudo commands # remove it if need # RUN /composer/unaccount.sh -RUN if [ "${TARGET_MODE}" != "hardening" ]; then apt-get update && apt-get reinstall -y --no-install-recommends sudo && apt-get clean && rm -rf /var/lib/apt/lists/*; fi +RUN if [ "${TARGET_MODE}" != "hardening" ]; then apt-get update && apt-get reinstall -y --no-install-recommends sudo vim && apt-get clean && rm -rf /var/lib/apt/lists/*; fi From a3ab472c7b9742ee83def7cab2d0506958788593 Mon Sep 17 00:00:00 2001 From: alexandredevely <12896316+alexandredevely@users.noreply.github.com> Date: Fri, 13 Mar 2026 16:11:53 +0100 Subject: [PATCH 03/28] add ABCDESKTOP_FORCE_OVERWRITE_PLASMA_CONFIG --- composer/docker-entrypoint.sh | 77 ++++++++++++++++------------------- 1 file changed, 34 insertions(+), 43 deletions(-) diff --git a/composer/docker-entrypoint.sh b/composer/docker-entrypoint.sh index 0f61c9a..89fab86 100755 --- a/composer/docker-entrypoint.sh +++ b/composer/docker-entrypoint.sh @@ -57,16 +57,6 @@ echo NAMESPACE=${NAMESPACE} echo "Container local ip addr is $CONTAINER_IP_ADDR" echo X11LISTEN=${X11LISTEN} -# export DBUS_SESSION_BUS_ADDRESS=tcp:host=localhost,bind=*,port=55556,family=ipv4 - -# Note that '/home/balloon/.local/share' is not in the search path -# set by the XDG_DATA_HOME and XDG_DATA_DIRS -# environment variables, so applications may not be able to find it until you set them. The directories currently searched are: -# -# - /root/.local/share -# - /usr/local/share/ -# - /usr/share/ - # set umask to # make sur log file can not be read by everyone umask 027 @@ -101,28 +91,38 @@ echo "== stage env == " # create a MIT-MAGIC-COOKIE-1 entry in .Xauthority if [ ! -z "$XAUTH_KEY" ]; then + echo 'create XAUTH_KEY' # reset file content true > ~/.Xauthority xauth add :0 MIT-MAGIC-COOKIE-1 $XAUTH_KEY fi -if [ ! -d ~/.store ]; then - echo "create ~/.store directory" - mkdir -p ~/.store & -fi - -if [ ! -d ~/Desktop ]; then - echo "create ~/Desktop directory" - mkdir -p ~/Desktop & -fi - -if [ ! -d ~/.config ]; then - echo "create ~/.config directory" - mkdir -p ~/.config - cp -r /composer/.config ~ -fi +# create directory in home directory +mkdir -p ~/.store ~/Desktop & +# create ~/.config +mkdir -p ~/.config +mkdir -p ~/.config/nautilus & + +# Define file name for plasma kde5 +files=( + "plasmashellrc" + "plasma-org.kde.plasma.desktop-appletsrc" + "kwinrc" + "plasmarc" + "kactivitymanagerdrc" + "kglobalshortcutsrc" +) + +# loop to check if file doesn't exist, copy it +for file in "${files[@]}"; do + if [ ! -f ~/.config/"$file" ] || [ ! -z "$ABCDESKTOP_FORCE_OVERWRITE_PLASMA_CONFIG" ]; then + echo "create $file" + cp "/composer/.config/$file" ~/.config/ + fi +done if [ ! -z "$PULSEAUDIO_COOKIE" ]; then + echo 'create PULSEAUDIO_COOKIE' # create ~/.config/pulse if not exist mkdir -p ~/.config/pulse # remove file content ~/.config/pulse/cookie @@ -147,11 +147,6 @@ fi # cp /composer/.config/gtk-3.0/settings.ini ~/.config/gtk-3.0 & #fi -if [ ! -d ~/.config/nautilus ]; then - echo "create ~/.config/nautilus directory" - mkdir -p ~/.config/nautilus -fi - # # read https://wiki.archlinux.org/title/GTK#:~:text=Depending%20on%20GTK%20version%2C%20these,etc%2Fgtk%2D2.0%2Fgtkrc #if [ ! -f ~/.gtkrc-2.0 ]; then @@ -168,14 +163,14 @@ fi # cp -rp /composer/.xsettingsd ~ # fi -if [ ! -d ~/.gconf ]; then - cp -rp /composer/.gconf ~ -fi +# if [ ! -d ~/.gconf ]; then +# cp -rp /composer/.gconf ~ +# fi -if [ ! -d ~/.gconf/apps ]; then - cp -rp /composer/.gconf/apps ~/.gconf - chmod -R 700 ~/.gconf/apps -fi +# if [ ! -d ~/.gconf/apps ]; then +# cp -rp /composer/.gconf/apps ~/.gconf +# chmod -R 700 ~/.gconf/apps +# fi THEME_DIR=/usr/share/themes/Windows-10 if [ ! -d ~/.config/gtk-4.0 ]; then @@ -226,11 +221,7 @@ if [ -d ~/.local/share/applications ]; then fi # always create ~/.local/share/applications/bin -mkdir -p ~/.local/share/mime ~/.local/share/applications/bin ~/.local/share/xfce4/helpers - -if [ ! -f ~/.local/share/xfce4/helpers/custom-FileManager.desktop ]; then - cp /composer/.local/share/xfce4/helpers/custom-FileManager.desktop ~/.local/share/xfce4/helpers/ -fi +mkdir -p ~/.local/share/mime ~/.local/share/applications/bin if [ ! -d ~/.local/share/icons ]; then cp -rp /composer/icons ~/.local/share & @@ -337,7 +328,7 @@ dbus-daemon --config-file=/usr/share/dbus-1/system.conf --print-address --fork echo "== stage XDG_RUNTIME_DIR == " if [ ! -d "${XDG_RUNTIME_DIR}" ]; then - mkdir "${XDG_RUNTIME_DIR}" + mkdir -p "${XDG_RUNTIME_DIR}" chmod 0700 "${XDG_RUNTIME_DIR}" fi From 93d588f8553dd620dfde9b513dfa513f2efa74f5 Mon Sep 17 00:00:00 2001 From: alexandredevely <12896316+alexandredevely@users.noreply.github.com> Date: Fri, 13 Mar 2026 16:13:03 +0100 Subject: [PATCH 04/28] use default ini package --- .../spawner-service/lib_spawner/desktop.js | 2 +- .../node/spawner-service/lib_spawner/ini.js | 201 ------------------ composer/node/spawner-service/package.json | 2 +- 3 files changed, 2 insertions(+), 203 deletions(-) delete mode 100644 composer/node/spawner-service/lib_spawner/ini.js diff --git a/composer/node/spawner-service/lib_spawner/desktop.js b/composer/node/spawner-service/lib_spawner/desktop.js index ee83ccb..f1c2b85 100644 --- a/composer/node/spawner-service/lib_spawner/desktop.js +++ b/composer/node/spawner-service/lib_spawner/desktop.js @@ -32,7 +32,7 @@ const middlewares = require('./middlewares'); const { set, get } = require('./utils'); const { roothomedir, abcdesktoprundir, abcdesktoplogdir } = require('../global-values'); const magic = new Magic(MAGIC_MIME_TYPE); -const ini = require('./ini'); +const ini = require('ini'); function supervisorctl( method, service_name ) { diff --git a/composer/node/spawner-service/lib_spawner/ini.js b/composer/node/spawner-service/lib_spawner/ini.js deleted file mode 100644 index 1013774..0000000 --- a/composer/node/spawner-service/lib_spawner/ini.js +++ /dev/null @@ -1,201 +0,0 @@ -/* eslint-disable no-shadow */ -/* eslint-disable no-unused-vars */ -const eol = typeof process !== 'undefined' - && process.platform === 'win32' ? '\r\n' : '\n'; - -function isQuoted(val) { - return (val.charAt(0) === '"' && val.slice(-1) === '"') - || (val.charAt(0) === "'" && val.slice(-1) === "'"); -} - -function safe(val) { - return (typeof val !== 'string' - || val.match(/[=\r\n]/) - || val.match(/^\[/) - || (val.length > 1 - && isQuoted(val)) - || val !== val.trim()) - ? JSON.stringify(val) - : val.replace(/#/g, '\\#'); -} - -function dotSplit(str) { - return str.replace(/\1/g, '\u0002LITERAL\\1LITERAL\u0002') - .replace(/\\\./g, '\u0001') - .split(/\./).map((part) => part.replace(/\1/g, '\\.') - .replace(/\2LITERAL\\1LITERAL\2/g, '\u0001')); -} - -function unsafe(val) { - val = (val || '').trim(); - if (isQuoted(val)) { - // remove the single quotes before calling JSON.parse - if (val.charAt(0) === "'") { - val = val.substr(1, val.length - 2); - } - try { val = JSON.parse(val); } catch (e) { console.error(e); } - } else { - // walk the val to find the first not-escaped ; character - let esc = false; - let unesc = ''; - for (let i = 0, l = val.length; i < l; i++) { - const c = val.charAt(i); - if (esc) { - if ('\\;#'.indexOf(c) !== -1) { - unesc += c; - } else { - unesc += `\\${c}`; - } - esc = false; - } else if (';#'.indexOf(c) !== -1) { - break; - } else if (c === '\\') { - esc = true; - } else { - unesc += c; - } - } - if (esc) { - unesc += '\\'; - } - return unesc.trim(); - } - return val; -} - -function encode(obj, opt) { - const children = []; - let out = ''; - - if (typeof opt === 'string') { - opt = { - section: opt, - whitespace: false, - }; - } else { - opt = opt || {}; - opt.whitespace = opt.whitespace === true; - } - - const separator = opt.whitespace ? ' = ' : '='; - - Object.keys(obj).forEach((k, _, __) => { - const val = obj[k]; - if (val && Array.isArray(val)) { - val.forEach((item) => { - out += `${safe(`${k}[]`) + separator + safe(item)}\n`; - }); - } else if (val && typeof val === 'object') { - children.push(k); - } else { - out += safe(k) + separator + safe(val) + eol; - } - }); - - if (opt.section && out.length) { - out = `[${safe(opt.section)}]${eol}${out}`; - } - - children.forEach((k, _, __) => { - const nk = dotSplit(k).join('\\.'); - const section = (opt.section ? `${opt.section}.` : '') + nk; - const child = encode(obj[k], { - section, - whitespace: opt.whitespace, - }); - if (out.length && child.length) { - out += eol; - } - out += child; - }); - - return out; -} - -function decode(str) { - const out = {}; - let p = out; - let section = null; - // section |key = value - const re = /^\[([^\]]*)\]$|^([^=]+)(=(.*))?$/i; - const lines = str.split(/[\r\n]+/g); - - lines.forEach((line, _, __) => { - if (!line || line.match(/^\s*[;#]/)) return; - const match = line.match(re); - if (!match) return; - if (match[1] !== undefined) { - section = unsafe(match[1]); - if (!out[section]) { - out[section] = {}; - } - p = out[section]; - return; - } - let key = unsafe(match[2]); - let value = match[3] ? unsafe(match[4]) : true; - switch (value) { - case 'true': - case 'false': - case 'null': value = JSON.parse(value); - break; - default: - break; - } - - // Convert keys with '[]' suffix to an array - if (key.length > 2 && key.slice(-2) === '[]') { - key = key.substring(0, key.length - 2); - if (!p[key]) { - p[key] = []; - } else if (!Array.isArray(p[key])) { - p[key] = [p[key]]; - } - } - - // safeguard against resetting a previously defined - // array by accidentally forgetting the brackets - if (Array.isArray(p[key])) { - p[key].push(value); - } else { - p[key] = value; - } - }); - - // {a:{y:1},"a.b":{x:2}} --> {a:{y:1,b:{x:2}}} - // use a filter to return the keys that have to be deleted. - Object.keys(out).filter((k, _, __) => { - if (!out[k] - || typeof out[k] !== 'object' - || Array.isArray(out[k])) { - return false; - } - // see if the parent section is also an object. - // if so, add it to that, and mark this one for deletion - const parts = dotSplit(k); - let p = out; - const l = parts.pop(); - const nl = l.replace(/\\\./g, '.'); - parts.forEach((part, _, __) => { - if (!p[part] || typeof p[part] !== 'object') p[part] = {}; - p = p[part]; - }); - if (p === out && nl === l) { - return false; - } - p[nl] = out[k]; - return true; - }).forEach((del, _, __) => { - delete out[del]; - }); - - return out; -} - -exports.parse = decode; -exports.decode = decode; - -exports.stringify = encode; -exports.encode = encode; -exports.safe = safe; -exports.unsafe = unsafe; diff --git a/composer/node/spawner-service/package.json b/composer/node/spawner-service/package.json index 34f5efd..9cf68e7 100644 --- a/composer/node/spawner-service/package.json +++ b/composer/node/spawner-service/package.json @@ -19,7 +19,7 @@ "express-validator": "^6.14.0", "geoip-lite": "^1.4.10", "helmet": "^8.0.0", - "ini": "^5.0.0", + "ini": "^6.0.0", "mime-types": "2.1.35", "mmmagic": "^0.5.3", "node-addon-api": "^8.1.0", From 29b009a5e90aa39d3ba05f41512892b28edf530f Mon Sep 17 00:00:00 2001 From: Alexandre DEVELY <12896316+alexandredevely@users.noreply.github.com> Date: Fri, 13 Mar 2026 17:13:59 +0100 Subject: [PATCH 05/28] Update exit code for Trivy action Change Trivy action exit code from 1 to 0. --- .github/workflows/test_update_linux_amd64.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test_update_linux_amd64.yml b/.github/workflows/test_update_linux_amd64.yml index 85400fc..e46c58d 100644 --- a/.github/workflows/test_update_linux_amd64.yml +++ b/.github/workflows/test_update_linux_amd64.yml @@ -73,7 +73,7 @@ jobs: with: image-ref: ghcr.io/abcdesktopio/oc.user.${{ matrix.target_mode }}.${{ env.base_image_release }}:${{ env.imagetag }} format: 'table' - exit-code: '1' + exit-code: '0' ignore-unfixed: true vuln-type: 'os,library' severity: 'CRITICAL,HIGH' From 9fa29ddfbde57ddebf93cfd723910313424e1941 Mon Sep 17 00:00:00 2001 From: alexandredevely <12896316+alexandredevely@users.noreply.github.com> Date: Sun, 15 Mar 2026 10:32:11 +0100 Subject: [PATCH 06/28] remove supervisorctl calls --- .../spawner-service/lib_spawner/desktop.js | 28 ------------------- 1 file changed, 28 deletions(-) diff --git a/composer/node/spawner-service/lib_spawner/desktop.js b/composer/node/spawner-service/lib_spawner/desktop.js index f1c2b85..3058cbe 100644 --- a/composer/node/spawner-service/lib_spawner/desktop.js +++ b/composer/node/spawner-service/lib_spawner/desktop.js @@ -35,29 +35,6 @@ const magic = new Magic(MAGIC_MIME_TYPE); const ini = require('ini'); -function supervisorctl( method, service_name ) { - let command = '/usr/bin/supervisorctl'; - let args = [ method, service_name ]; - //if (!process.env[service_name]) { - // console.log( `ENV ${service_name} is not set` ); - // console.log( `${command} ${method} ${service_name} is canceled` ); - // return; - //} - console.log( command, method, service_name ); - cmd = spawn(command, args ); - cmd.stdout.on('data', (data) => { - console.log(`${command} stdout: ${data}`); - }); - - cmd.stderr.on('data', (data) => { - console.error(`${command} stderr: ${data}`); - }); - - cmd.on('close', (code) => { - console.log(`${command} child process exited with code ${code}`); - }); -} - /** * * @param {string} _filename @@ -144,8 +121,6 @@ function update_desktop_database() { function startservices() { // call update_desktop_database ${HOME}/.local/share/applications update_desktop_database(); - // call supervisorctl start plasmashell - // supervisorctl( 'start', 'plasmashell' ); } function symlinkPromise( ocrunpath, execcommand) @@ -241,9 +216,6 @@ async function generateDesktopFiles(list = []) { const ocrunpath_frontendjs = '/composer/node/ocrun/ocrun.frontendjs.js'; console.log('generateDesktopFiles start'); - // stop plasmashell - // supervisorctl( 'stop', 'plasmashell' ); - // dump applist.json file fs.promises.writeFile( `${abcdesktoplogdir}/applist.json`, JSON.stringify(list, null, 2) ) .catch( (err) => { console.log(`promises.writeFile error ${err}`); } ); From e0c622e55373b0b4e904add5edae2a6c1b83544d Mon Sep 17 00:00:00 2001 From: alexandredevely <12896316+alexandredevely@users.noreply.github.com> Date: Mon, 16 Mar 2026 15:10:26 +0100 Subject: [PATCH 07/28] new file --- composer/set-backgroundcolor.sh | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100755 composer/set-backgroundcolor.sh diff --git a/composer/set-backgroundcolor.sh b/composer/set-backgroundcolor.sh new file mode 100755 index 0000000..5fd7108 --- /dev/null +++ b/composer/set-backgroundcolor.sh @@ -0,0 +1,30 @@ +#!/bin/bash +# +# this script add line "var launchers=\"${LAUNCHERS}\"; to add-to-quicklaunch.js and runs the javascript +# javascript add-to-quicklaunch update the launcher ison for plasmashell without restarting it +# +# +HEXACOLOR=$1 + + +export ABCDESKTOP_RUN_DIR=${ABCDESKTOP_RUN_DIR:-'/var/run/desktop'} +export ABCDESKTOP_LOG_DIR=${ABCDESKTOP_LOG_DIR:-'var/log/desktop'} + +# find qdbus /usr/lib/qt6/bin/qdbus is not in default PATH +qdbus=/usr/bin/qdbus +if [[ -x /usr/lib/qt6/bin/qdbus ]]; then + qdbus=/usr/lib/qt6/bin/qdbus +fi +echo ${qdbus} + +# wait for plasmashell running +# else /usr/bin/qdbus org.kde.plasmashell org.kde.PlasmaShell.evaluateScript failed +until pids=$($qdbus org.kde.plasmashell 2>/dev/null) +do + sleep 1 +done + +${qdbus} org.kde.plasmashell /PlasmaShell org.kde.PlasmaShell.evaluateScript "var hexacolor=\"${HEXACOLOR}\"; $(cat /composer/set-backgroundcolor.js)" + +# ${qdbus} org.kde.plasmashell /PlasmaShell color +# kill -HUP $(pidof plasmashell) From e897cba214d6e19e8e0ecfd19ce9ab524f314a28 Mon Sep 17 00:00:00 2001 From: alexandredevely <12896316+alexandredevely@users.noreply.github.com> Date: Mon, 16 Mar 2026 15:10:33 +0100 Subject: [PATCH 08/28] new file --- composer/set-wallpaper.sh | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100755 composer/set-wallpaper.sh diff --git a/composer/set-wallpaper.sh b/composer/set-wallpaper.sh new file mode 100755 index 0000000..96bb5d3 --- /dev/null +++ b/composer/set-wallpaper.sh @@ -0,0 +1,26 @@ +#!/bin/bash +# +# this script add line "var launchers=\"${LAUNCHERS}\"; to add-to-quicklaunch.js and runs the javascript +# javascript add-to-quicklaunch update the launcher ison for plasmashell without restarting it +# +# +IMAGE=$1 + +export ABCDESKTOP_RUN_DIR=${ABCDESKTOP_RUN_DIR:-'/var/run/desktop'} +export ABCDESKTOP_LOG_DIR=${ABCDESKTOP_LOG_DIR:-'var/log/desktop'} + +# find qdbus /usr/lib/qt6/bin/qdbus is not in default PATH +qdbus=/usr/bin/qdbus +if [[ -x /usr/lib/qt6/bin/qdbus ]]; then + qdbus=/usr/lib/qt6/bin/qdbus +fi +echo ${qdbus} + +# wait for plasmashell running +# else /usr/bin/qdbus org.kde.plasmashell org.kde.PlasmaShell.evaluateScript failed +until pids=$($qdbus org.kde.plasmashell 2>/dev/null) +do + sleep 1 +done + +${qdbus} org.kde.plasmashell /PlasmaShell org.kde.PlasmaShell.evaluateScript "var image=\"${IMAGE}\"; $(cat /composer/set-wallpaper.js)" From 61c19c47699f408244317a514231ae5da354a3c1 Mon Sep 17 00:00:00 2001 From: alexandredevely <12896316+alexandredevely@users.noreply.github.com> Date: Mon, 16 Mar 2026 15:10:47 +0100 Subject: [PATCH 09/28] remove file --- composer/esetroot.sh | 47 -------------------------------------------- 1 file changed, 47 deletions(-) delete mode 100755 composer/esetroot.sh diff --git a/composer/esetroot.sh b/composer/esetroot.sh deleted file mode 100755 index 4fa971f..0000000 --- a/composer/esetroot.sh +++ /dev/null @@ -1,47 +0,0 @@ -#!/bin/bash -bgColor=$1 -imgName=$2 - -imgParam='' -ABCDESKTOP_LOG_DIR=${ABCDESKTOP_LOG_DIR:-'/var/log/desktop'} -ESETROOT_LOGFILE=$ABCDESKTOP_LOG_DIR/esetroot.log -echo "bgColor=$bgColor" &>> $ESETROOT_LOGFILE -echo "imgName=$imgName" &>> $ESETROOT_LOGFILE - -if [ -z "$bgColor" ]; then - echo bad paramters &>> $ESETROOT_LOGFILE - exit 1 -fi - -if [ -x /usr/bin/Esetroot ]; then - if [ ! -z "$imgName" ]; then - exec /usr/bin/Esetroot -bg "${bgColor}" -center -fit "${imgName}" &>> $ESETROOT_LOGFILE - else - exec /usr/bin/Esetroot -bg "${bgColor}" &>> $ESETROOT_LOGFILE - fi -fi - -if [ -x /usr/bin/hsetroot ]; then - if [ ! -z "$imgName" ]; then - exec /usr/bin/hsetroot -solid "${bgColor}" -center "${imgName}" &>> $ESETROOT_LOGFILE - else - exec /usr/bin/hsetroot -solid "${bgColor}" &>> $ESETROOT_LOGFILE - fi -fi - -if [ ! -z "$imgName" ]; then - if [ -x /usr/bin/feh ]; then - killall /usr/bin/feh &>> $ESETROOT_LOGFILE - exec /usr/bin/feh --no-fehbg --bg-center --borderless --image-bg "${bgColor}" "${imgName}" &>> $ESETROOT_LOGFILE - fi - if [ -x /usr/bin/plasma-apply-wallpaperimage ]; then - exec /usr/bin/plasma-apply-wallpaperimage "${imgName}" - fi -fi - -if [ ! -z "$bgColor" ]; then - echo "last case" &> $ESETROOT_LOGFILE - exec /usr/bin/xsetroot -solid $bgColor &>> $ESETROOT_LOGFILE -fi - -exit 1 From c1bd065b87476dd44063c2300ea22e1892a2f6e8 Mon Sep 17 00:00:00 2001 From: alexandredevely <12896316+alexandredevely@users.noreply.github.com> Date: Mon, 16 Mar 2026 15:12:51 +0100 Subject: [PATCH 10/28] new files --- composer/plasmabackgroundcolor.sh | 12 ++++++++++++ composer/plasmabackgroundimage.sh | 13 +++++++++++++ 2 files changed, 25 insertions(+) create mode 100755 composer/plasmabackgroundcolor.sh create mode 100755 composer/plasmabackgroundimage.sh diff --git a/composer/plasmabackgroundcolor.sh b/composer/plasmabackgroundcolor.sh new file mode 100755 index 0000000..6ee1786 --- /dev/null +++ b/composer/plasmabackgroundcolor.sh @@ -0,0 +1,12 @@ +#!/bin/bash +bgColor=$1 +ABCDESKTOP_LOG_DIR=${ABCDESKTOP_LOG_DIR:-'/var/log/desktop'} +ESETROOT_LOGFILE=$ABCDESKTOP_LOG_DIR/plasmabackgroundcolor.log + +echo "bgColor=$bgColor" &>> $ESETROOT_LOGFILE +if [ ! -z "$bgColor" ]; then + echo "set-backgroundcolor $bgColor" &>> $ESETROOT_LOGFILE + exec /composer/set-backgroundcolor.sh "${bgColor}" +fi + +exit 1 diff --git a/composer/plasmabackgroundimage.sh b/composer/plasmabackgroundimage.sh new file mode 100755 index 0000000..004c672 --- /dev/null +++ b/composer/plasmabackgroundimage.sh @@ -0,0 +1,13 @@ +#!/bin/bash +imgName=$1 + +ABCDESKTOP_LOG_DIR=${ABCDESKTOP_LOG_DIR:-'/var/log/desktop'} +ESETROOT_LOGFILE=$ABCDESKTOP_LOG_DIR/plasmabackgroundcolorandimage.log +echo "imgName=$imgName" &>> $ESETROOT_LOGFILE + +if [ ! -z "$imgName" ]; then + echo "set-wallpaper imgName=$imgName" &>> $ESETROOT_LOGFILE + exec /composer/set-wallpaper.sh "${imgName}" +fi + +exit 1 From 0490bb7adfc21019b8a9bb3403d3c511638dd231 Mon Sep 17 00:00:00 2001 From: alexandredevely <12896316+alexandredevely@users.noreply.github.com> Date: Mon, 16 Mar 2026 15:20:43 +0100 Subject: [PATCH 11/28] remove file --- composer/doaccount.sh | 3 --- 1 file changed, 3 deletions(-) delete mode 100755 composer/doaccount.sh diff --git a/composer/doaccount.sh b/composer/doaccount.sh deleted file mode 100755 index e91a634..0000000 --- a/composer/doaccount.sh +++ /dev/null @@ -1,3 +0,0 @@ -#/bin/bash -ABCDESKTOP_LOCALACCOUNT_DIR=${ABCDESKTOP_LOCALACCOUNT_DIR:-'/etc/localaccount'} -for f in passwd shadow group gshadow ; do if [ -f /etc/$f ] ; then cp /etc/$f $ABCDESKTOP_LOCALACCOUNT_DIR ; rm -f /etc/$f; ln -s $ABCDESKTOP_LOCALACCOUNT_DIR/$f /etc/$f; fi; done From f68dd39853d9cff434ae32d61b1fcf6f9a94c80f Mon Sep 17 00:00:00 2001 From: alexandredevely <12896316+alexandredevely@users.noreply.github.com> Date: Mon, 16 Mar 2026 15:22:40 +0100 Subject: [PATCH 12/28] remove file --- composer/xfce4-esetroot.sh | 24 ------------------------ 1 file changed, 24 deletions(-) delete mode 100755 composer/xfce4-esetroot.sh diff --git a/composer/xfce4-esetroot.sh b/composer/xfce4-esetroot.sh deleted file mode 100755 index c580bad..0000000 --- a/composer/xfce4-esetroot.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/bash -RrbgColor=$1 -GrbgColor=$2 -BrbgColor=$3 -imgName=$4 - -imgParam='' -ABCDESKTOP_LOG_DIR=${ABCDESKTOP_LOG_DIR:-'/var/log/desktop'} -ESETROOT_LOGFILE=$ABCDESKTOP_LOG_DIR/xfce4-esetroot.log -echo "bgColor=$RrbgColor $GrbgColor $BrbgColor" &>> $ESETROOT_LOGFILE -echo "imgName=$imgName" &>> $ESETROOT_LOGFILE - -/usr/bin/xfconf-query --create -c xfce4-desktop -p /backdrop/screen0/monitorVNC-0/workspace0/rgba1 -t double -t double -t double -t double -s $RrbgColor -s $GrbgColor -s $BrbgColor -s 1 - - -if [ ! -z "$imgName" ]; then - # set image style to centered - /usr/bin/xfconf-query --create -c xfce4-desktop -p /backdrop/screen0/monitorVNC-0/workspace0/image-style -s 1 - # set image - /usr/bin/xfconf-query --create -c xfce4-desktop -p /backdrop/screen0/monitorVNC-0/workspace0/last-image -s "$imgName" -else - # set solid color - /usr/bin/xfconf-query --create -c xfce4-desktop -p /backdrop/screen0/monitorVNC-0/workspace0/color-style -s 0 -fi From 254236455b013191f801d41f9182bf09fe089d6e Mon Sep 17 00:00:00 2001 From: alexandredevely <12896316+alexandredevely@users.noreply.github.com> Date: Mon, 16 Mar 2026 15:23:36 +0100 Subject: [PATCH 13/28] change wallpapers --- composer/docker-entrypoint.sh | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/composer/docker-entrypoint.sh b/composer/docker-entrypoint.sh index 89fab86..39e9901 100755 --- a/composer/docker-entrypoint.sh +++ b/composer/docker-entrypoint.sh @@ -181,10 +181,9 @@ if [ ! -d ~/.config/gtk-4.0 ]; then fi -#if [ ! -f ~/.Xresources ]; then -# cp -p /composer/.Xresources ~ -#fi +# Wallpaper stage +# echo "== stage wallpaper == " if [ ! -d ~/.wallpapers ]; then # add default wallpapers # we can't run a link if home dir is configured as a dedicated volume @@ -192,19 +191,18 @@ if [ ! -d ~/.wallpapers ]; then echo create ~/.wallpapers mkdir ~/.wallpapers echo copy new wallpaper files in ~/.wallpapers - cp -rp /composer/wallpapers/* ~/.wallpapers - # cp -rp /composer/wallpapers/* ~/.wallpapers & - # cp_pid=$! - # echo "TESTING_MODE=$TESTING_MODE" - # # if we are in testing mode wait for cp command finnish - # if [ ! -z "$TESTING_MODE" ]; then - # echo "We are in testing mode, waiting for cp command complete" - # wait $cp_pid - # echo "~/.wallpapers dump" - # ls -la ~/.wallpapers - # fi + cp -rp /composer/wallpapers/* ~/.wallpapers & + cp_pid=$! + echo "TESTING_MODE=$TESTING_MODE" + # if we are in testing mode wait for cp command finnish + if [ ! -z "$TESTING_MODE" ]; then + echo "We are in testing mode, waiting for cp command complete" + wait $cp_pid + fi fi + +echo "== stage xdg-user-dirs == " if [ ! -f ~/.config/user-dirs.dirs ]; then echo "run xdg-user-dirs-update" # xdg-user-dirs-update --force From 16d253a965e098d29049203f5ef95e79f5ab0875 Mon Sep 17 00:00:00 2001 From: alexandredevely <12896316+alexandredevely@users.noreply.github.com> Date: Mon, 16 Mar 2026 15:24:22 +0100 Subject: [PATCH 14/28] chmod --- composer/add-to-quicklaunch.js | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 composer/add-to-quicklaunch.js diff --git a/composer/add-to-quicklaunch.js b/composer/add-to-quicklaunch.js old mode 100644 new mode 100755 From dcd4fd44bef5a615a0d4086bdecb44a5b409b267 Mon Sep 17 00:00:00 2001 From: alexandredevely <12896316+alexandredevely@users.noreply.github.com> Date: Mon, 16 Mar 2026 15:24:44 +0100 Subject: [PATCH 15/28] change screen --- .../lib_spawner/screen-mode.js | 47 ++++--------------- 1 file changed, 8 insertions(+), 39 deletions(-) diff --git a/composer/node/spawner-service/lib_spawner/screen-mode.js b/composer/node/spawner-service/lib_spawner/screen-mode.js index fdad05c..ad8c5a6 100644 --- a/composer/node/spawner-service/lib_spawner/screen-mode.js +++ b/composer/node/spawner-service/lib_spawner/screen-mode.js @@ -53,36 +53,14 @@ function hexToRGBPercent(hex, alpha) { } -/** - * - * @param {string} color - */ -async function xsetroot(color) { - const ret = { code: 500, data: '' }; - const command = `/composer/esetroot.sh "${color}"`; - console.log(command); - try { - await exec(command); - ret.code = 200; - ret.data = 'ok'; - } catch (err) { - console.error(err); - ret.data = err; - } - return ret; -} - /** * * @param {string} imgName * @param {string} bgColor */ -async function esetroot(bgColor, imgName) { +async function plasmabackgroundimage(imgName) { const ret = { code: 500, data: 'unknow error' }; - // const command = `Esetroot -bg "${bgColor}" -center -fit "${imgName}"`; - // const command = `/usr/bin/feh --bg-fill "${imgName}"`; - // const command = `/usr/bin/feh --fullscreen --borderless --image-bg "${bgColor}" --bg-fill "${imgName}"`; - const command = `/composer/esetroot.sh "${bgColor}" "${imgName}"`; + let command = `/composer/plasmabackgrounddimage.sh "${imgName}"`; console.log(command); try { await exec(command); @@ -100,15 +78,9 @@ async function esetroot(bgColor, imgName) { * @param {string} imgName * @param {string} bgColor */ -async function xfce4_esetroot(bgColor, imgName) { - const ret = { code: 500, data: 'Internal server error' }; - // const command = `Esetroot -bg "${bgColor}" -center -fit "${imgName}"`; - // const command = `/usr/bin/feh --bg-fill "${imgName}"`; - // const command = `/usr/bin/feh --fullscreen --borderless --image-bg "${bgColor}" --bg-fill "${imgName}"`; - const rgbPercent = hexToRGBPercent( bgColor ); - let command = `/composer/xfce4-esetroot.sh ${rgbPercent.r} ${rgbPercent.g} ${rgbPercent.b}`; - if (imgName) - command += command + ` ${imgName}`; +async function plasmabackgroundcolor(bgColor) { + const ret = { code: 500, data: 'unknow error' }; + let command = `/composer/plasmabackgroundcolor.sh "${bgColor}"`; console.log(command); try { await exec(command); @@ -116,12 +88,11 @@ async function xfce4_esetroot(bgColor, imgName) { ret.data = 'ok'; } catch (err) { console.error(err); + ret.data = err; } return ret; } - - /** * * @param {string} imgName @@ -130,8 +101,7 @@ async function changeBgImage(imgName = '') { const ret = { code: 500, data: 'Internal server error' }; try { const color = await colorflow(imgName); - // const { code, data } = await xfce4_esetroot( color, imgName ); - const { code, data } = await esetroot( color, imgName ); + const { code, data } = await plasmabackgroundimage( imgName ); if (code === 200) { await set('currentImgColor', color); await broadcast.broadcastevent('display.setBackgroundBorderColor', color); @@ -190,8 +160,7 @@ function routerInit(router) { await fs.promises.unlink(currentWallpaper); } - // const { code, data } = await xfce4_esetroot(color); - const { code, data } = await esetroot(color); + const { code, data } = await plasmabackgroundcolor(color); ret.code = code; ret.data = data; From ea4caef1eca90b2b12e4c51d7d2e88a710c55be4 Mon Sep 17 00:00:00 2001 From: alexandredevely <12896316+alexandredevely@users.noreply.github.com> Date: Mon, 16 Mar 2026 15:25:35 +0100 Subject: [PATCH 16/28] add Win11OS-light wallpaper --- Dockerfile.ubuntu | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Dockerfile.ubuntu b/Dockerfile.ubuntu index d963459..c9299d8 100644 --- a/Dockerfile.ubuntu +++ b/Dockerfile.ubuntu @@ -302,6 +302,11 @@ RUN apt-get update && \ apt-get clean && \ rm -rf /var/lib/apt/lists/* +# create a link to Win11OS-light wallpaper in /composer/wallpapers +RUN cd /composer/wallpapers && \ + ln -s /usr/share/wallpapers/Win11OS-light/contents/images/3840x2400.jpg Win11OS-light.jpg && \ + ln -s /usr/share/wallpapers/Win11OS-dark/contents/images/3840x2400.jpg Win11OS-dark.jpg + # add breeze theme RUN apt-get update && \ apt-get install -y --no-install-recommends \ From 37fad8371e559dfcd1b7c81cb8ad01da11cdefa5 Mon Sep 17 00:00:00 2001 From: alexandredevely <12896316+alexandredevely@users.noreply.github.com> Date: Mon, 16 Mar 2026 16:34:03 +0100 Subject: [PATCH 17/28] fix path --- composer/node/spawner-service/lib_spawner/screen-mode.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer/node/spawner-service/lib_spawner/screen-mode.js b/composer/node/spawner-service/lib_spawner/screen-mode.js index ad8c5a6..1331f6b 100644 --- a/composer/node/spawner-service/lib_spawner/screen-mode.js +++ b/composer/node/spawner-service/lib_spawner/screen-mode.js @@ -60,7 +60,7 @@ function hexToRGBPercent(hex, alpha) { */ async function plasmabackgroundimage(imgName) { const ret = { code: 500, data: 'unknow error' }; - let command = `/composer/plasmabackgrounddimage.sh "${imgName}"`; + let command = `/composer/plasmabackgroundimage.sh "${imgName}"`; console.log(command); try { await exec(command); From db6289693965042ed5956e15586141b21437f59e Mon Sep 17 00:00:00 2001 From: alexandredevely <12896316+alexandredevely@users.noreply.github.com> Date: Mon, 16 Mar 2026 16:34:20 +0100 Subject: [PATCH 18/28] add Win11OS-light --- Dockerfile.ubuntu | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Dockerfile.ubuntu b/Dockerfile.ubuntu index c9299d8..aab2fb6 100644 --- a/Dockerfile.ubuntu +++ b/Dockerfile.ubuntu @@ -303,9 +303,7 @@ RUN apt-get update && \ rm -rf /var/lib/apt/lists/* # create a link to Win11OS-light wallpaper in /composer/wallpapers -RUN cd /composer/wallpapers && \ - ln -s /usr/share/wallpapers/Win11OS-light/contents/images/3840x2400.jpg Win11OS-light.jpg && \ - ln -s /usr/share/wallpapers/Win11OS-dark/contents/images/3840x2400.jpg Win11OS-dark.jpg +RUN cp /usr/share/wallpapers/Win11OS-light/contents/images/3840x2400.jpg /composer/wallpapers/Win11OS-light.jpg # add breeze theme RUN apt-get update && \ From 9b458891ef198b3efae620bfa09f144cfaaa1c29 Mon Sep 17 00:00:00 2001 From: alexandredevely <12896316+alexandredevely@users.noreply.github.com> Date: Mon, 16 Mar 2026 17:06:37 +0100 Subject: [PATCH 19/28] revert 4.3 --- ...ma-org.kde.plasma.desktop-appletsrc.origin | 158 ++++++++++++++ .../spawner-service/lib_spawner/ini.js.origin | 201 ++++++++++++++++++ 2 files changed, 359 insertions(+) create mode 100755 composer/.config/plasma-org.kde.plasma.desktop-appletsrc.origin create mode 100644 composer/node/spawner-service/lib_spawner/ini.js.origin diff --git a/composer/.config/plasma-org.kde.plasma.desktop-appletsrc.origin b/composer/.config/plasma-org.kde.plasma.desktop-appletsrc.origin new file mode 100755 index 0000000..b2a0c7e --- /dev/null +++ b/composer/.config/plasma-org.kde.plasma.desktop-appletsrc.origin @@ -0,0 +1,158 @@ +[ActionPlugins][0] +MiddleButton;NoModifier=org.kde.paste +RightButton;NoModifier=org.kde.contextmenu + +[ActionPlugins][1] +RightButton;NoModifier=org.kde.contextmenu + +[Containments][47] +ItemGeometries-1440x788= +ItemGeometries-1440x876= +ItemGeometriesHorizontal= +activityId=120f6434-298f-4da3-b474-9b69ab1d0483 +formfactor=0 +immutability=1 +lastScreen=0 +location=0 +plugin=org.kde.plasma.folder +wallpaperplugin=org.kde.image + +[Containments][47][ConfigDialog] +DialogHeight=510 +DialogWidth=680 + +[Containments][47][General] +ToolBoxButtonState=topcenter +ToolBoxButtonX=319 + +[Containments][47][Wallpaper][org.kde.image][General] +FillMode=0 +Image=/usr/share/wallpapers/Win11OS-light/ +SlidePaths=/usr/share/wallpapers/ + +[Containments][48] +activityId= +formfactor=2 +immutability=1 +lastScreen=0 +location=4 +plugin=org.kde.panel +wallpaperplugin=org.kde.image + +[Containments][48][Applets][49] +immutability=1 +plugin=org.kde.plasma.kickoff + +[Containments][48][Applets][49][Configuration] +PreloadWeight=100 +popupHeight=504 +popupWidth=637 + +[Containments][48][Applets][49][Configuration][General] +alphaSort=true +favoritesPortedToKAstats=true +primaryActions=3 +showActionButtonCaptions=true +systemFavorites=lock-screen\\,logout +icon=/composer/icon/start-here-kde.svg + +[Containments][48][Applets][49][Configuration][Shortcuts] +global=Alt+F1 + +[Containments][48][Applets][50] +immutability=1 +plugin=org.kde.plasma.pager + +[Containments][48][Applets][51] +immutability=1 +plugin=org.kde.plasma.icontasks + +[Containments][48][Applets][51][Configuration][General] +launchers= + +[Containments][48][Applets][52] +immutability=1 +plugin=org.kde.plasma.marginsseparator + +[Containments][48][Applets][53] +immutability=1 +plugin=org.kde.plasma.systemtray +transient=true + +[Containments][48][Applets][53][Configuration] +PreloadWeight=80 +SystrayContainmentId=54 + +[Containments][48][Applets][55] +immutability=1 +plugin=org.kde.plasma.panelspacer + +[Containments][48][Applets][56] +immutability=1 +plugin=org.kde.plasma.panelspacer + +[Containments][48][Applets][58] +immutability=1 +plugin=org.kde.plasma.panelspacer +transient=true + +[Containments][48][Applets][59] +immutability=1 +plugin=org.kde.plasma.panelspacer + +[Containments][48][Applets][60] +immutability=1 +plugin=org.kde.plasma.panelspacer + +[Containments][48][Applets][64] +immutability=1 +plugin=org.kde.milou + +[Containments][48][ConfigDialog] +DialogHeight=74 +DialogWidth=1440 +[Containments][48][General] +AppletOrder=60;59;49;50;51;52;55;56,64 + +[Containments][54] +activityId= +formfactor=2 +immutability=1 +lastScreen=0 +location=4 +plugin=org.kde.plasma.private.systemtray +popupHeight=432 +popupWidth=432 +wallpaperplugin=org.kde.image + +[Containments][54][Applets][55][Configuration] +PreloadWeight=42 + +[Containments][54][Applets][56][Configuration] +PreloadWeight=42 + +[Containments][54][Applets][57] +immutability=1 +plugin=org.kde.plasma.devicenotifier + +[Containments][54][Applets][57][Configuration] +PreloadWeight=52 + +[Containments][54][Applets][58][Configuration] +PreloadWeight=42 + +[Containments][54][Applets][59][Configuration] +PreloadWeight=42 + +[Containments][54][Applets][60][Configuration] +PreloadWeight=42 + +[Containments][54][ConfigDialog] +DialogHeight=510 +DialogWidth=680 + +[Containments][54][General] +extraItems=org.kde.plasma.devicenotifier,org.kde.plasma.battery,org.kde.plasma.bluetooth,org.kde.plasma.networkmanagement +knownItems=org.kde.plasma.manage-inputmethod,org.kde.plasma.clipboard,org.kde.plasma.notifications,org.kde.plasma.keyboardlayout,org.kde.plasma.mediacontroller,org.kde.plasma.volume,org.kde.plasma.devicenotifier,org.kde.plasma.battery,org.kde.plasma.bluetooth,org.kde.plasma.networkmanagement +scaleIconsToFit=true + diff --git a/composer/node/spawner-service/lib_spawner/ini.js.origin b/composer/node/spawner-service/lib_spawner/ini.js.origin new file mode 100644 index 0000000..1013774 --- /dev/null +++ b/composer/node/spawner-service/lib_spawner/ini.js.origin @@ -0,0 +1,201 @@ +/* eslint-disable no-shadow */ +/* eslint-disable no-unused-vars */ +const eol = typeof process !== 'undefined' + && process.platform === 'win32' ? '\r\n' : '\n'; + +function isQuoted(val) { + return (val.charAt(0) === '"' && val.slice(-1) === '"') + || (val.charAt(0) === "'" && val.slice(-1) === "'"); +} + +function safe(val) { + return (typeof val !== 'string' + || val.match(/[=\r\n]/) + || val.match(/^\[/) + || (val.length > 1 + && isQuoted(val)) + || val !== val.trim()) + ? JSON.stringify(val) + : val.replace(/#/g, '\\#'); +} + +function dotSplit(str) { + return str.replace(/\1/g, '\u0002LITERAL\\1LITERAL\u0002') + .replace(/\\\./g, '\u0001') + .split(/\./).map((part) => part.replace(/\1/g, '\\.') + .replace(/\2LITERAL\\1LITERAL\2/g, '\u0001')); +} + +function unsafe(val) { + val = (val || '').trim(); + if (isQuoted(val)) { + // remove the single quotes before calling JSON.parse + if (val.charAt(0) === "'") { + val = val.substr(1, val.length - 2); + } + try { val = JSON.parse(val); } catch (e) { console.error(e); } + } else { + // walk the val to find the first not-escaped ; character + let esc = false; + let unesc = ''; + for (let i = 0, l = val.length; i < l; i++) { + const c = val.charAt(i); + if (esc) { + if ('\\;#'.indexOf(c) !== -1) { + unesc += c; + } else { + unesc += `\\${c}`; + } + esc = false; + } else if (';#'.indexOf(c) !== -1) { + break; + } else if (c === '\\') { + esc = true; + } else { + unesc += c; + } + } + if (esc) { + unesc += '\\'; + } + return unesc.trim(); + } + return val; +} + +function encode(obj, opt) { + const children = []; + let out = ''; + + if (typeof opt === 'string') { + opt = { + section: opt, + whitespace: false, + }; + } else { + opt = opt || {}; + opt.whitespace = opt.whitespace === true; + } + + const separator = opt.whitespace ? ' = ' : '='; + + Object.keys(obj).forEach((k, _, __) => { + const val = obj[k]; + if (val && Array.isArray(val)) { + val.forEach((item) => { + out += `${safe(`${k}[]`) + separator + safe(item)}\n`; + }); + } else if (val && typeof val === 'object') { + children.push(k); + } else { + out += safe(k) + separator + safe(val) + eol; + } + }); + + if (opt.section && out.length) { + out = `[${safe(opt.section)}]${eol}${out}`; + } + + children.forEach((k, _, __) => { + const nk = dotSplit(k).join('\\.'); + const section = (opt.section ? `${opt.section}.` : '') + nk; + const child = encode(obj[k], { + section, + whitespace: opt.whitespace, + }); + if (out.length && child.length) { + out += eol; + } + out += child; + }); + + return out; +} + +function decode(str) { + const out = {}; + let p = out; + let section = null; + // section |key = value + const re = /^\[([^\]]*)\]$|^([^=]+)(=(.*))?$/i; + const lines = str.split(/[\r\n]+/g); + + lines.forEach((line, _, __) => { + if (!line || line.match(/^\s*[;#]/)) return; + const match = line.match(re); + if (!match) return; + if (match[1] !== undefined) { + section = unsafe(match[1]); + if (!out[section]) { + out[section] = {}; + } + p = out[section]; + return; + } + let key = unsafe(match[2]); + let value = match[3] ? unsafe(match[4]) : true; + switch (value) { + case 'true': + case 'false': + case 'null': value = JSON.parse(value); + break; + default: + break; + } + + // Convert keys with '[]' suffix to an array + if (key.length > 2 && key.slice(-2) === '[]') { + key = key.substring(0, key.length - 2); + if (!p[key]) { + p[key] = []; + } else if (!Array.isArray(p[key])) { + p[key] = [p[key]]; + } + } + + // safeguard against resetting a previously defined + // array by accidentally forgetting the brackets + if (Array.isArray(p[key])) { + p[key].push(value); + } else { + p[key] = value; + } + }); + + // {a:{y:1},"a.b":{x:2}} --> {a:{y:1,b:{x:2}}} + // use a filter to return the keys that have to be deleted. + Object.keys(out).filter((k, _, __) => { + if (!out[k] + || typeof out[k] !== 'object' + || Array.isArray(out[k])) { + return false; + } + // see if the parent section is also an object. + // if so, add it to that, and mark this one for deletion + const parts = dotSplit(k); + let p = out; + const l = parts.pop(); + const nl = l.replace(/\\\./g, '.'); + parts.forEach((part, _, __) => { + if (!p[part] || typeof p[part] !== 'object') p[part] = {}; + p = p[part]; + }); + if (p === out && nl === l) { + return false; + } + p[nl] = out[k]; + return true; + }).forEach((del, _, __) => { + delete out[del]; + }); + + return out; +} + +exports.parse = decode; +exports.decode = decode; + +exports.stringify = encode; +exports.encode = encode; +exports.safe = safe; +exports.unsafe = unsafe; From 6b05da198ef2a49df3df2f9ce894f1df98171d05 Mon Sep 17 00:00:00 2001 From: alexandredevely <12896316+alexandredevely@users.noreply.github.com> Date: Mon, 16 Mar 2026 17:16:38 +0100 Subject: [PATCH 20/28] remove files --- Dockerfile.alpine | 211 -------------------- Dockerfile.kubernetes | 199 ------------------- Dockerfile.ubuntu.24.10 | 429 ---------------------------------------- 3 files changed, 839 deletions(-) delete mode 100755 Dockerfile.alpine delete mode 100644 Dockerfile.kubernetes delete mode 100644 Dockerfile.ubuntu.24.10 diff --git a/Dockerfile.alpine b/Dockerfile.alpine deleted file mode 100755 index 1663e20..0000000 --- a/Dockerfile.alpine +++ /dev/null @@ -1,211 +0,0 @@ -ARG TARGETPLATFORM -ARG BUILDPLATFORM -# Default release is 18.04 -ARG BASE_IMAGE_RELEASE=edge -# Default base image -ARG BASE_IMAGE=alpine - - -# -# create apk package for openbox -# pkg files will be located in /root/packages/$(uname -m) directory -# patched with openbox.title.patch for abcdesktop -FROM ${BASE_IMAGE}:${BASE_IMAGE_RELEASE} as openbox_alpine_builder -RUN apk add gcc make g++ bash build-base alpine-sdk sudo wget python3 -RUN mkdir -p /var/cache/distfiles -RUN mkdir -p /openbox/src -WORKDIR /openbox -RUN wget https://raw.githubusercontent.com/abcdesktopio/openbox/main/openbox-3.6.1.tar.gz -RUN wget https://git.alpinelinux.org/aports/plain/community/openbox/python3.patch -RUN wget https://raw.githubusercontent.com/abcdesktopio/openbox/main/APKBUILD -RUN wget https://raw.githubusercontent.com/abcdesktopio/openbox/main/openbox.title.patch -RUN abuild-keygen -a -n -RUN abuild -F deps -# -a Add 1 to current pkgrel -RUN apkgrel -a APKBUILD -RUN abuild -F -# package are in directory /root/packages/$(uname -m) - - -# install all nodejs modules -# build nodejs module -# create /composer/node -# use FROM BASE_IMAGE -# define FROM before use ENV command -FROM ${BASE_IMAGE}:${BASE_IMAGE_RELEASE} as alpine_node_modules_builder - -COPY TARGET_MODE /TARGET_MODE - -# Add alpine repo -# https://dl-cdn.alpinelinux.org/alpine/edge/main -# https://dl-cdn.alpinelinux.org/alpine/edge/community -# https://dl-cdn.alpinelinux.org/alpine/edge/testing -# Add tagged repos as well as the edge repo so that we can selectively install edge packages -#RUN echo "https://dl-cdn.alpinelinux.org/alpine/edge/main" >> /etc/apk/repositories && \ -# echo "https://dl-cdn.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories && \ -# echo "https://dl-cdn.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories - -RUN apk add --no-cache --update \ - python3 \ - nodejs \ - yarn \ - make \ - gcc \ - g++ \ - libx11-dev \ - libxmu-dev - -COPY composer /composer -RUN mkdir -p /composer/node/wait-port && \ - cd /composer/node/wait-port && \ - yarn add wait-port@1.0.1 - -# Use this flag to instruct Yarn to ignore NODE_ENV and take its production-or-not status from this flag instead. -WORKDIR /composer/node/common-libraries -RUN yarn install --production=true - -WORKDIR /composer/node/broadcast-service -RUN yarn install --production=true - -WORKDIR /composer/node/ocrun -RUN yarn install --production=true - -WORKDIR /composer/node/ocdownload -RUN yarn install --production=true - -WORKDIR /composer/node/occall -RUN yarn install --production=true - -WORKDIR /composer/node/spawner-service -RUN yarn global add node-gyp -RUN yarn install --production=true - -WORKDIR /composer/node/xterm.js -RUN if [ $(cat /TARGET_MODE) != hardening ]; then yarn install --production=true; fi - - - - - - - - - - -# -# The main oc.user start here -# -FROM ${BASE_IMAGE}:${BASE_IMAGE_RELEASE} - -COPY TARGET_MODE /TARGET_MODE - -COPY etc /etc - -RUN echo "https://dl-cdn.alpinelinux.org/alpine/edge/main" >> /etc/apk/repositories && \ - echo "https://dl-cdn.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories && \ - echo "https://dl-cdn.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories - -RUN apk add --no-cache --update \ - gcompat \ - python3 \ - curl \ - bash \ - supervisor \ - tigervnc \ - wmctrl \ - cups-client \ - pulseaudio-utils \ - xauth \ - websockify \ - openssl \ - krb5 - -RUN apk add --no-cache --update \ - desktop-file-utils \ - xdg-user-dirs \ - xhost \ - xsetroot \ - adwaita-icon-theme \ - adwaita-qt \ - xclip \ - imagemagick \ - libadwaita - - -# add some fonts -RUN apk add --no-cache --update \ - terminus-font \ - qterminal - -# add some fonts These selections will cover most languages and are a good fit for most setups -RUN apk add --no-cache --update \ - ttf-inconsolata \ - ttf-dejavu \ - ttf-font-awesome \ - font-noto-extra \ - font-noto - - -COPY --from=openbox_alpine_builder /root/packages /tmp/packages -RUN apk add --allow-untrusted \ - /tmp/packages/$(apk add --print-arch)/openbox-libs-3.6.1* \ - /tmp/packages/$(apk add --print-arch)/openbox-3.6.1* - -RUN apk add --no-cache --update \ - obconf-qt \ - nodejs \ - feh - -COPY --from=alpine_node_modules_builder /composer /composer - -# -# themes section -# copy themes from abcdesktopio/oc.themes -# COPY themes /usr/share/themes -# COPY --from=abcdesktopio/oc.themes /usr/share/icons /usr/share/icons -# COPY --from=abcdesktopio/oc.themes /usr/share/themes /usr/share/themes -# COPY --from=theme_builder /usr/share/themes /usr/share/themes -ADD Arc_OSXbuttons.tar /usr/share/themes - - -# version.json must be created by mkversion.sh bash script -COPY composer/version.json /composer/version.json - -# LOG AND PID SECTION -RUN mkdir -p /var/log/desktop /var/run/desktop - -# change passwd shadow group gshadow -ENV ABCDESKTOP_LOCALACCOUNT_DIR "/var/secrets/abcdesktop/localaccount" -RUN mkdir -p $ABCDESKTOP_LOCALACCOUNT_DIR -RUN for f in passwd shadow group gshadow ; do if [ -f /etc/$f ] ; then cp /etc/$f $ABCDESKTOP_LOCALACCOUNT_DIR ; rm -f /etc/$f; ln -s $ABCDESKTOP_LOCALACCOUNT_DIR/$f /etc/$f; fi; done - -# set build date -RUN date > /etc/build.date - -# WORKDIR /home/$BUSER -# set default user -# USER $BUSER -RUN apk add --no-cache --update \ - sudo \ - vim - -RUN echo "ALL ALL=(ALL:ALL) ALL" > /etc/sudoers.d/all - -# set command -CMD [ "/composer/docker-entrypoint.sh" ] - -#################################################### -# SERVICE # TCP PORT # -#################################################### -# XTERM_TCP_PORT 29781 -# BROADCAST_SERVICE_TCP_PORT 29784 -# SPAWNER_SERVICE_TCP_PORT 29786 -# WS_TCP_BRIDGE_SERVICE_TCP_PORT 6081 -# DBUS_SESSION_TCP_PORT 55556 -# DBUS_SYSTEM_TCP_PORT 55557 -#################################################### - -## RESERVED TCP PORT 29782 for pulseaudio -## RESERVED TCP PORT 29785 for cupsd - -EXPOSE 6081 29781 29784 29786 diff --git a/Dockerfile.kubernetes b/Dockerfile.kubernetes deleted file mode 100644 index 8955121..0000000 --- a/Dockerfile.kubernetes +++ /dev/null @@ -1,199 +0,0 @@ -# defaul TAG is dev -ARG TAG=dev -# Default release is 18.04 -ARG BASE_IMAGE_RELEASE=18.04 -# Default base image -ARG BASE_IMAGE=abcdesktopio/oc.software.18.04 - -# --- BEGIN node_modules_builder --- -FROM $BASE_IMAGE:$TAG as node_modules_builder - -# -# Add dev package to node install -## You may also need development tools to build native addons: -## sudo apt-get install gcc g++ make -RUN apt-get update && apt-get install -y --no-install-recommends \ - gcc \ - g++ \ - make \ - && apt-get clean \ - && rm -rf /var/lib/apt/lists/* - -# to make install wmctrljs nodejs components -# add build dev package -RUN apt-get update && apt-get install -y --no-install-recommends \ - libx11-dev \ - libxmu-dev \ - git \ - && apt-get clean \ - && rm -rf /var/lib/apt/lists/* - -#Install yarn -RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - -RUN echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list -RUN apt-get update && apt-get install -y --no-install-recommends \ - yarn \ - && apt-get clean \ - && rm -rf /var/lib/apt/lists/* - -COPY composer /composer - -# add wait-port -RUN mkdir -p /composer/node/wait-port && cd /composer/node/wait-port && yarn add wait-port - -# Add nodejs service -WORKDIR /composer/node/common-libraries -RUN yarn install - -WORKDIR /composer/node/broadcast-service -RUN yarn install - -WORKDIR /composer/node/ocrun -RUN yarn install - -WORKDIR /composer/node/ocdownload -RUN yarn install - -WORKDIR /composer/node/occall -RUN yarn install - -WORKDIR /composer/node/spawner-service -RUN yarn install - -WORKDIR /composer/node/xterm.js -RUN yarn install - -COPY Makefile / -COPY mkversion.sh / -COPY .git / - -WORKDIR / -RUN make version - -# --- END node_modules_builder --- - - -# --- START Build image --- -FROM $BASE_IMAGE:$TAG - -# add websockify as ws to tcp proxy -RUN apt-get update && apt-get install -y --no-install-recommends \ - python3-pip \ - python3-wheel \ - python3-setuptools \ - && pip3 install websockify \ - && apt-get remove -y python3-pip python3-wheel python3-setuptools \ - && apt-get clean \ - && rm -rf /var/lib/apt/lists/* - -#Install yarn -# yarn is use for the test mode -RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - -RUN echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list -RUN apt-get update && apt-get install -y --no-install-recommends \ - yarn \ - && apt-get clean \ - && rm -rf /var/lib/apt/lists/* - -# only for dev -RUN apt-get update && apt-get install -y --no-install-recommends \ - vim \ - file \ - && apt-get clean \ - && rm -rf /var/lib/apt/lists/* - -COPY --from=node_modules_builder /composer /composer - - -# Next command use $BUSER context -ENV BUSER balloon -# RUN adduser --disabled-password --gecos '' $BUSER -# RUN id -u $BUSER &>/dev/null || -RUN groupadd --gid 4096 $BUSER -RUN useradd --create-home --shell /bin/bash --uid 4096 -g $BUSER --groups sudo $BUSER -# create an ubuntu user -RUN echo "balloon:lmdpocpetit" | chpasswd $BUSER - -# hack: be shure to own the home dir -RUN chown -R $BUSER:$BUSER /home/$BUSER - -# remove symlink in /etc/X11 -# openbox -> ../xdg/openbox -# xdg does not exist -RUN rm -rf /etc/X11/openbox - -COPY etc /etc -RUN rm -rf /etc/supervisor/conf.d/pulseaudio.conf /etc/supervisor/conf.d/printer-service.conf /etc/supervisor/conf.d/file-service.conf /etc/supervisor/conf.d/cupsd.conf -RUN date > /etc/build.date - -# Add here commands need to run as sudo user -# cupsd must be run as root -# changehomeowner -RUN echo "$BUSER ALL=(root) NOPASSWD: /composer/changehomeowner.sh" >> /etc/sudoers.d/changehomeowner - -# create a fake ntlm_auth.desktop file -# just to hidden missing link dest -RUN touch /usr/bin/ntlm_auth.desktop - - -# LOG AND PID SECTION -RUN mkdir -p /var/log/desktop \ - /var/run/desktop \ - /composer/run - -## DBUS SECTION -RUN mkdir -p /var/run/dbus -RUN touch /var/lib/dbus/machine-id -RUN chown -R $BUSER:$BUSER \ - /var/run/dbus \ - /var/lib/dbus \ - /var/lib/dbus/machine-id -# DO NOT CHANGE -# COPY usr/share/dbus-1/session.conf /usr/share/dbus-1/session.conf -# COPY usr/share/dbus-1/system.conf /usr/share/dbus-1/system.conf - - -# change access rights -RUN chown -R $BUSER:$BUSER \ - /etc/X11/openbox \ - /var/log/desktop \ - /var/run/desktop \ - /composer/run \ - /composer/mime \ - /composer/icons \ - /composer/.themes \ - /composer/.gtkrc-2.0 \ - /composer/.xsettings \ - /composer/.gconf \ - /composer/.Xressources \ - /composer/.bashrc \ - /composer/.cache - -# Clean unecessary package -RUN rm -rf /tmp/* - -# VOLUME /home/$BUSER -WORKDIR /home/$BUSER -USER $BUSER -CMD [ "/composer/docker-entrypoint.sh" ] - -#################################################### -# SERVICE # TCP PORT # -#################################################### -# FILEMANAGER_BRIDGE_TCP_PORT 29780 -# XTERM_TCP_PORT 29781 -# PULSEAUDIO_HTTP_PORT 4714 -# FILE_SERVICE_TCP_PORT 29783 -# BROADCAST_SERVICE_TCP_PORT 29784 -# RESERVED FOR CUPSD 29785 -# SPAWNER_SERVICE_TCP_PORT 29786 -# WS_TCP_BRIDGE_SERVICE_TCP_PORT 6081 -# DBUS_SESSION_TCP_PORT 55556 -# DBUS_SYSTEM_TCP_PORT 55557 -#################################################### - -## RESERVED TCP PORT 29782 for pulseaudio -## RESERVED TCP PORT 29785 for cupsd - -EXPOSE 4714 6081 29780 29781 29783 29784 29786 55556 55557 - diff --git a/Dockerfile.ubuntu.24.10 b/Dockerfile.ubuntu.24.10 deleted file mode 100644 index df5f76c..0000000 --- a/Dockerfile.ubuntu.24.10 +++ /dev/null @@ -1,429 +0,0 @@ -ARG TARGETPLATFORM -ARG BUILDPLATFORM -ARG TAG -# Default base image -ARG BASE_IMAGE=ubuntu -# Default release is 24.04 -ARG BASE_IMAGE_RELEASE=24.10 - - - - -FROM ${BASE_IMAGE}:${BASE_IMAGE_RELEASE} AS plasmaworkspace_ubuntu_builder -ENV DEBEMAIL=dev@abcdesktop.io -ENV EMAIL=dev@abcdesktop.io -SHELL [ "/bin/bash", "-c" ] -RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections -# add src in sources.list -# for <= 22.04 -RUN source /etc/os-release ; echo "$ID $VERSION" -RUN if [ -f /etc/apt/sources.list ] ; then \ - sed -Ei 's/^# deb-src /deb-src /' /etc/apt/sources.list ||true ;\ - fi -# for >= 24.04 -RUN source /etc/os-release ; \ - if [ -f "/etc/apt/sources.list.d/$ID.sources" ] ; then \ - sed -Ei 's/^Types: deb/Types: deb deb-src/' "/etc/apt/sources.list.d/$ID.sources" ||true ;\ - fi -RUN apt-get update -RUN apt-get install -y --no-install-recommends devscripts wget ca-certificates cmake -RUN apt-get build-dep -y plasma-workspace -RUN mkdir -p /plasma-workspace/src -WORKDIR /plasma-workspace -RUN apt-get source plasma-workspace -# COPY plasma-workspace/plasma-workspace-5.27.12/ksplash/ksplashqml/splashwindow.cpp / -# COPY plasma-workspace/plasma-workspace-5.27.12/ksplash/ksplashqml/splashapp.cpp / -RUN cd plasma-workspace-*/ksplash/ksplashqml && sed -i -e 's/30000/10000/' splashwindow.cpp -RUN cd plasma-workspace-* && dch -n timeout3s -RUN cd plasma-workspace-* && EDITOR=/bin/true dpkg-source -q --commit . timeout3s -RUN cd plasma-workspace-* && debuild -us -uc -RUN ls *.deb - - - - - - -# install all nodejs modules -# build nodejs module -# create /composer/node -# use FROM BASE_IMAGE -# define FROM before use ENV command -FROM ${BASE_IMAGE}:${BASE_IMAGE_RELEASE} AS ubuntu_node_modules_builder - -# use bash -SHELL ["/bin/bash", "-c"] - -# define arg -ARG TARGET_MODE -ARG TARGET_PRUNE -# convert ARG to ENV with same name -ENV TARGET_MODE=$TARGET_MODE -ENV TARGET_PRUNE=$TARGET_PRUNE -ENV NODE_MAJOR=20 - -RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections -RUN apt-get update && apt-get install -y --no-install-recommends \ - gcc \ - g++ \ - make - -# to make install wmctrljs nodejs components -# add build dev package -RUN apt-get update && apt-get install -y --no-install-recommends \ - ca-certificates \ - libx11-dev \ - libxmu-dev \ - libimlib2-dev \ - git \ - curl \ - gnupg \ - dpkg - -# install npm nodejs -RUN mkdir -p /etc/apt/keyrings && \ - curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \ - echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list && apt-get update && apt-get install -y --no-install-recommends nodejs && npm install -g npm - - -COPY composer /composer - -RUN npm install --global node-gyp -RUN echo target_prune="$TARGET_PRUNE" -RUN if [ -z "$TARGET_PRUNE" ] ; then echo "TARGET_PRUNE is not defined, build with dev" ; else echo "TARGET_PRUNE is defined, NO DEV options" ; fi - -# add wait-port -WORKDIR /composer/node/wait-port -RUN npm install --omit=dev && npm audit fix - -WORKDIR /composer/node/broadcast-service -RUN if [ -z "$TARGET_PRUNE" ] ; then npm install ; else npm install --omit=dev; fi -RUN npm i --package-lock-only && npm audit fix - -RUN git clone https://github.com/abcdesktopio/run-service.git /composer/node/ocrun -WORKDIR /composer/node/ocrun -RUN if [ ! -z "$TARGET_PRUNE" ] ; then npm install ; else npm install --omit=dev; fi -RUN cp ocrun.js ocrun.builtin.js && sed -Ei 's/^let DEFAULT_EXECMODE;/let DEFAULT_EXECMODE="builtin";/' ocrun.builtin.js -RUN cp ocrun.js ocrun.frontendjs.js && sed -Ei 's/^let DEFAULT_EXECMODE;/let DEFAULT_EXECMODE="frontendjs";/' ocrun.frontendjs.js -RUN npm i --package-lock-only && npm audit fix - -WORKDIR /composer/node/ocdownload -RUN if [ -z "$TARGET_PRUNE" ] ; then npm install ; else npm install --omit=dev; fi -RUN npm audit fix - -WORKDIR /composer/node/occall -RUN if [ -z "$TARGET_PRUNE" ] ; then npm install ; else npm install --omit=dev; fi -RUN npm audit fix - -WORKDIR /composer/node/spawner-service/lib_spawner/colorflow -RUN if [ -z "$TARGET_PRUNE" ] ; then npm install ; else npm install --omit=dev; fi -RUN npm audit fix - -WORKDIR /composer/node/spawner-service -# install node-gyp to build spawner-service -RUN if [ -z "$TARGET_PRUNE" ] ; then npm install ; else npm install --omit=dev; fi - -WORKDIR /composer/node/spawner-service/lib_spawner/colorflow -RUN if [ -z "$TARGET_PRUNE" ] ; then npm install ; else npm install --omit=dev; npm run build; fi -RUN npm audit fix - -WORKDIR / -RUN if [ "$TARGET_MODE" = "hardening" ] ; then \ - rm -rf /composer/node/xterm.js; \ - else \ - cd /composer/node/xterm.js ;\ - if [ -z "$TARGET_PRUNE" ] ; then npm install ; else npm install --omit=dev; fi ;\ - fi - -# version.json must be created by mkversion.sh bash script -COPY composer/version.json /composer/version.json - - -# -# The main oc.user start here -# -FROM ${BASE_IMAGE}:${BASE_IMAGE_RELEASE} - -# use bash -SHELL ["/bin/bash", "-c"] - -# define arg -ARG ABCDESKTOP_LOCALACCOUNT_DIR -ARG TARGET_MODE -# convert ARG to ENV with same name -ENV ABCDESKTOP_LOCALACCOUNT_DIR=$ABCDESKTOP_LOCALACCOUNT_DIR -ENV TARGET_MODE=$TARGET_MODE -# set node release -ENV NODE_MAJOR=20 - -COPY etc /etc -RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections && \ - apt-get update && \ - apt-get upgrade -y && \ - apt-get install -y --no-install-recommends \ - ca-certificates \ - curl \ - gnupg \ - net-tools \ - bash && \ - apt-get clean && \ - rm -rf /var/lib/apt/lists/* - -# add languages -# locales for locale-gen command -RUN apt-get update && apt-get install -y --no-install-recommends \ - locales \ - language-pack-en \ - language-pack-fr \ - language-pack-de \ - && locale-gen \ - && apt-get clean \ - && rm -rf /var/lib/apt/lists/* - -# install -# Do not use -# COPY tigervncserver_1.13.1-1ubuntu1_amd64.deb /tmp to install -# tigervncserver_1.13.1-1ubuntu1_amd64.deb -# tigervncserver_1.13.1-1ubuntu1_arm64.deb -# but replace by curl command to support dpkg --print-architecture for amd64 and arm64 -# tigervncserver_1.14.80-1ubuntu1_22.04_amd64.deb -# tigervncserver_1.14.1-1ubuntu1_22.04.amd64.deb -# tigervncserver_1.14.1-1ubuntu1_24.04.amd64.deb -ENV TIGERVNC_RELEASE=1.15.0 -RUN apt-get update && \ - source /etc/lsb-release && \ - DISTRIB_RELEASE=24.04 tigervncdeburl="https://github.com/abcdesktopio/oc.user/raw/4.0/tigervncserver_${TIGERVNC_RELEASE}-1ubuntu1_${DISTRIB_RELEASE}_$(dpkg --print-architecture).deb" && \ - echo Downloading $tigervncdeburl && \ - curl -sL --output /tmp/tigervncserver.deb "$tigervncdeburl" && \ - apt-get install -y --no-install-recommends /tmp/tigervncserver.deb && \ - rm -f /tmp/*.deb && \ - apt-get clean && rm -rf /var/lib/apt/lists/* - - -# install core packages -# x11-apps is need to install xeyes xeyes is a test application -RUN apt-get update && \ - apt-get install -y --no-install-recommends -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" \ - supervisor \ - wmctrl \ - cups-client \ - pulseaudio-utils \ - pavumeter \ - xauth \ - websockify \ - krb5-user \ - desktop-file-utils \ - xdg-user-dirs \ - xclip \ - x11-apps \ - libimlib2t64 \ - libglib2.0-bin \ - && apt-get clean && rm -rf /var/lib/apt/lists/* - -RUN apt-get update && \ - apt-get install -y --no-install-recommends \ - dbus-x11 \ - x11-utils \ - xfwm4 && \ - apt-get clean && rm -rf /var/lib/apt/lists/* - -#RUN apt-get update && \ -# apt-get install -y --no-install-recommends \ -# task-french-kde-desktop \ -# task-romanian-kde-desktop \ -# task-german-kde-desktop && \ -# apt-get clean && rm -rf /var/lib/apt/lists/* - - -# RUN apt-get update && \ -# apt-get install -y --no-install-recommends \ -# openbox \ -# obconf \ -# lxappearance \ -# lxappearance-obconf && \ -# apt-get clean && rm -rf /var/lib/apt/lists/* - - -# install composer -COPY --from=ubuntu_node_modules_builder /composer /composer - -# install openbox custom packages -RUN mkdir -p /tmp/packages -COPY --from=plasmaworkspace_ubuntu_builder \ - /plasma-workspace/*.deb /tmp/packages/ -RUN ls -la /tmp/packages/ - - -# dpkg -L libkf5su5 | /composer/rmfol.sh && \ -# dpkg -L sudo | /composer/rmfol.sh && \ - -RUN apt-get update && \ - apt-get install -y --no-install-recommends -f /tmp/packages/*.deb && \ - apt-get install -y --no-install-recommends plasma-desktop && \ - if [ "$TARGET_MODE" = "hardening" ] ; then dpkg -L libkf5su5 | /composer/rmfol.sh; fi && \ - if [ "$TARGET_MODE" = "hardening" ] ; then dpkg -L sudo | /composer/rmfol.sh; fi && \ - rm -rf /tmp/packages && \ - apt-get clean && \ - rm -rf /var/lib/apt/lists/* /tmp/packages/* - -RUN apt-get update && \ - apt-get install -y --no-install-recommends \ - x11-utils \ - libnotify-bin \ - libnotify4 \ - systemsettings \ - plasma-widgets-addons \ - language-pack-kde-en \ - language-pack-kde-fr \ - language-pack-kde-de \ - language-pack-kde-ro \ - qml-module-org-kde-kcm && \ - apt-get clean && rm -rf /var/lib/apt/lists/* - -# RUN apt-get update && \ -# apt-get install -y --no-install-recommends \ -# plasma-desktop \ -# libnotify-bin \ -# libnotify4 \ -# qml-module-org-kde-kcm && \ -# apt-get clean && rm -rf /var/lib/apt/lists/* - - -# RUN apt-get update && \ -# apt-get install -y x11-utils && \ -# apt-get install -y --no-install-recommends \ -# plasma-workspace \ -# plasma-systemmonitor \ -# plasma-mobile \ -# libnotify-bin \ -# libnotify4 && \ -# apt-get clean && rm -rf /var/lib/apt/lists/* - -## install MS fonts -#RUN apt-get update && \ -# echo ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true | sudo debconf-set-selections -# apt-get install -y --no-install-recommends fontconfig ttf-mscorefonts-installer && \ -# apt-get clean && rm -rf /var/lib/apt/lists/* - - -# install Selawik fonts -# comment for licencing -# ADD fonts/SegoeUI.tar /usr/share/fonts/Microsoft/TrueType/SegoeUI/ -# fc-cache -f /usr/share/fonts/Microsoft/TrueType/SegoeUI/ && \ -ADD fonts/Selawik.tar /usr/share/fonts/Microsoft/TrueType/Selawik/ -RUN apt-get update && \ - apt-get install -y --no-install-recommends fontconfig fonts-noto xfonts-base && \ - fc-cache -f /usr/share/fonts/Microsoft/TrueType/Selawik/ && \ - apt-get clean && rm -rf /var/lib/apt/lists/* - - -# copy themes from abcdesktopio/oc.themes:4.0 -COPY --from=abcdesktopio/oc.themes:4.0 /usr/share/themes /usr/share/themes -COPY --from=abcdesktopio/oc.themes:4.0 /usr/share/icons /usr/share/icons -COPY --from=abcdesktopio/oc.themes:4.0 /usr/share/aurorae/themes /usr/share/aurorae/themes -COPY --from=abcdesktopio/oc.themes:4.0 /usr/share/color-schemes /usr/share/color-schemes -COPY --from=abcdesktopio/oc.themes:4.0 /usr/share/plasma/desktoptheme /usr/share/plasma/desktoptheme -# COPY --from=abcdesktopio/oc.themes:4.0 /usr/share/plasma/layout-templates /usr/share/plasma/layout-templates -COPY --from=abcdesktopio/oc.themes:4.0 /usr/share/plasma/look-and-feel /usr/share/plasma/look-and-feel -COPY --from=abcdesktopio/oc.themes:4.0 /usr/share/Kvantum /usr/share/Kvantum -COPY --from=abcdesktopio/oc.themes:4.0 /usr/share/wallpapers /usr/share/wallpapers - -RUN apt-get update && \ - apt-get install -y --no-install-recommends \ - gtk-update-icon-cache && \ - gtk-update-icon-cache && \ - apt-get clean && \ - rm -rf /var/lib/apt/lists/* - - - - - - - -# install nodejs -RUN mkdir -p /etc/apt/keyrings && \ - curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \ - echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list && \ - apt-get update && \ - apt-get install -y --no-install-recommends nodejs && \ - apt-get clean && \ - rm -rf /var/lib/apt/lists/* - - -# add sound files from ubuntu alsa package alsa-utils -ADD usr/share/sounds/alsa /usr/share/sounds/alsa - -# RUN chmod -R 755 /usr/share/plasma/desktoptheme/Win11OS-light/* -# LOG AND PID SECTION -RUN mkdir -p /var/log/desktop /var/run/desktop && \ - chmod 777 /var/log/desktop /var/run/desktop /etc/dbus-1 /etc/dbus-1/session.d /etc/dbus-1/system.d - -# remove /etc/supervisor/conf.d/xterm.conf in hardening -RUN if [ "$TARGET_MODE" = "hardening" ] ; then \ - rm -f /etc/supervisor/conf.d/xterm.conf; \ - echo "supervisor xterm.conf has been removed"; \ - fi - -# -# create account balloon for compatility with 2.0 -# Next command use $BUSER context -# this is the default user if no user defined -# create group, user, set password -# fix home dir owner -ENV BUSER=balloon -RUN groupadd --gid 4096 $BUSER && \ - useradd --create-home --shell /bin/bash --uid 4096 -g $BUSER $BUSER && \ - echo "balloon:lmdpocpetit" | chpasswd $BUSER &&\ - chown -R $BUSER:$BUSER /home/$BUSER - -# change passwd shadow group gshadow -RUN mkdir -p $ABCDESKTOP_LOCALACCOUNT_DIR && \ - for f in passwd shadow group gshadow ; do if [ -f /etc/$f ] ; then cp /etc/$f $ABCDESKTOP_LOCALACCOUNT_DIR ; rm -f /etc/$f; ln -s $ABCDESKTOP_LOCALACCOUNT_DIR/$f /etc/$f; fi; done - -# set build date -RUN date > /etc/build.date - -# install qterminal xfonts-base -RUN if [ "${TARGET_MODE}" != "hardening" ]; then \ - apt-get update && \ - apt-get install -y --no-install-recommends qterminal vim && \ - apt-get clean && rm -rf /var/lib/apt/lists/*; \ - fi - - -# fun but not a good idea -# RUN if [ "$TARGET_MODE" = "hardening" ] ; then \ -# apt-get remove -y --allow-remove-essential apt && \ -# rm -rf /var/lib/dpkg /bin/dpkg* /sbin/dpkg-* /var/log/apt /var/log/*.log /etc/apt ; \ -# fi - - -# Make all NVIDIA GPUs visible by default -ENV NVIDIA_VISIBLE_DEVICES=all -# All NVIDIA driver capabilities should preferably be used, check `NVIDIA_DRIVER_CAPABILITIES` inside the container if things do not work -ENV NVIDIA_DRIVER_CAPABILITIES=all - -# set command -CMD [ "/composer/docker-entrypoint.sh" ] - -#################################################### -# SERVICE # TCP PORT # -#################################################### -# XTERM_TCP_PORT 29781 -# BROADCAST_SERVICE_TCP_PORT 29784 -# SPAWNER_SERVICE_TCP_PORT 29786 -# WS_TCP_BRIDGE_SERVICE_TCP_PORT 6081 -# DBUS_SESSION_TCP_PORT 55556 -# DBUS_SYSTEM_TCP_PORT 55557 -#################################################### - -## RESERVED TCP PORT 29782 for pulseaudio -## RESERVED TCP PORT 29785 for cupsd - -# VOLUME /home/$BUSER -# Set for compatibility 2.0 -WORKDIR /home/$BUSER -USER $BUSER - -EXPOSE 6081 29781 29784 29786 From 68571d70a17297537be07b0c3cb35a40d4c253f3 Mon Sep 17 00:00:00 2001 From: alexandredevely <12896316+alexandredevely@users.noreply.github.com> Date: Mon, 16 Mar 2026 17:18:58 +0100 Subject: [PATCH 21/28] remove files --- Dockerfile.debian | 341 ------------------------- Dockerfile.debian.sudo | 29 --- Dockerfile.ubuntu.addons-nvidia | 105 -------- Dockerfile.ubuntu.nvidia | 424 -------------------------------- 4 files changed, 899 deletions(-) delete mode 100644 Dockerfile.debian delete mode 100644 Dockerfile.debian.sudo delete mode 100644 Dockerfile.ubuntu.addons-nvidia delete mode 100644 Dockerfile.ubuntu.nvidia diff --git a/Dockerfile.debian b/Dockerfile.debian deleted file mode 100644 index 9156605..0000000 --- a/Dockerfile.debian +++ /dev/null @@ -1,341 +0,0 @@ -ARG TARGETPLATFORM -ARG BUILDPLATFORM -ARG TAG -# Default base image -ARG BASE_IMAGE=ubuntu -# Default release is 24.04 -ARG BASE_IMAGE_RELEASE=24.04 - -# install all nodejs modules -# build nodejs module -# create /composer/node -# use FROM BASE_IMAGE -# define FROM before use ENV command -FROM ${BASE_IMAGE}:${BASE_IMAGE_RELEASE} AS ubuntu_node_modules_builder - -# use bash -SHELL ["/bin/bash", "-c"] - -# define arg -ARG TARGET_MODE -ARG TARGET_PRUNE -# convert ARG to ENV with same name -ENV TARGET_MODE=$TARGET_MODE -ENV TARGET_PRUNE=$TARGET_PRUNE -ENV NODE_MAJOR=20 - -RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections -RUN apt-get update && apt-get install -y --no-install-recommends \ - gcc \ - g++ \ - make - -# to make install wmctrljs nodejs components -# add build dev package -RUN apt-get update && apt-get install -y --no-install-recommends \ - ca-certificates \ - libx11-dev \ - libxmu-dev \ - libimlib2-dev \ - git \ - curl \ - gnupg \ - dpkg - -# install npm nodejs -RUN mkdir -p /etc/apt/keyrings && \ - curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \ - echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list - -RUN apt-get update && apt-get install -y --no-install-recommends nodejs npm && npm install -g npm - - -COPY composer /composer - -RUN npm install --global node-gyp -RUN echo target_prune="$TARGET_PRUNE" -RUN if [ -z "$TARGET_PRUNE" ] ; then echo "TARGET_PRUNE is not defined, build with dev" ; else echo "TARGET_PRUNE is defined, NO DEV options" ; fi - -# add wait-port -WORKDIR /composer/node/wait-port -RUN npm install --omit=dev && npm audit fix - -WORKDIR /composer/node/broadcast-service -RUN if [ -z "$TARGET_PRUNE" ] ; then npm install ; else npm install --omit=dev; fi -RUN npm i --package-lock-only && npm audit fix - -RUN git clone https://github.com/abcdesktopio/run-service.git /composer/node/ocrun -WORKDIR /composer/node/ocrun -RUN if [ ! -z "$TARGET_PRUNE" ] ; then npm install ; else npm install --omit=dev; fi -RUN cp ocrun.js ocrun.builtin.js && sed -Ei 's/^let DEFAULT_EXECMODE;/let DEFAULT_EXECMODE="builtin";/' ocrun.builtin.js -RUN cp ocrun.js ocrun.frontendjs.js && sed -Ei 's/^let DEFAULT_EXECMODE;/let DEFAULT_EXECMODE="frontendjs";/' ocrun.frontendjs.js -RUN npm i --package-lock-only && npm audit fix - -WORKDIR /composer/node/ocdownload -RUN if [ -z "$TARGET_PRUNE" ] ; then npm install ; else npm install --omit=dev; fi -RUN npm audit fix - -WORKDIR /composer/node/occall -RUN if [ -z "$TARGET_PRUNE" ] ; then npm install ; else npm install --omit=dev; fi -RUN npm audit fix - -WORKDIR /composer/node/spawner-service/lib_spawner/colorflow -RUN if [ -z "$TARGET_PRUNE" ] ; then npm install ; else npm install --omit=dev; fi -RUN npm audit fix - -WORKDIR /composer/node/spawner-service -# install node-gyp to build spawner-service -RUN if [ -z "$TARGET_PRUNE" ] ; then npm install ; else npm install --omit=dev; fi - -WORKDIR /composer/node/spawner-service/lib_spawner/colorflow -RUN if [ -z "$TARGET_PRUNE" ] ; then npm install ; else npm install --omit=dev; npm run build; fi -RUN npm audit fix - -WORKDIR / -RUN if [ "$TARGET_MODE" = "hardening" ] ; then \ - rm -rf /composer/node/xterm.js; \ - else \ - cd /composer/node/xterm.js ;\ - if [ -z "$TARGET_PRUNE" ] ; then npm install ; else npm install --omit=dev; fi ;\ - fi - -# version.json must be created by mkversion.sh bash script -COPY composer/version.json /composer/version.json - - -# -# The main oc.user start here -# -FROM ${BASE_IMAGE}:${BASE_IMAGE_RELEASE} - -# use bash -SHELL ["/bin/bash", "-c"] - -# define arg -ARG ABCDESKTOP_LOCALACCOUNT_DIR -ARG TARGET_MODE -# convert ARG to ENV with same name -ENV ABCDESKTOP_LOCALACCOUNT_DIR=$ABCDESKTOP_LOCALACCOUNT_DIR -ENV TARGET_MODE=$TARGET_MODE -# set node release -ENV NODE_MAJOR=20 - -COPY etc /etc -RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections && \ - apt-get update && \ - apt-get upgrade -y && \ - apt-get install -y --no-install-recommends \ - ca-certificates \ - curl \ - gnupg \ - net-tools \ - bash && \ - apt-get clean && \ - rm -rf /var/lib/apt/lists/* - -# add languages -# locales for locale-gen command -RUN apt-get update && apt-get install -y --no-install-recommends \ - locales && \ - echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen && \ - locale-gen && \ - apt-get clean && \ - rm -rf /var/lib/apt/lists/* - -# install -# Do not use -# COPY tigervncserver_1.13.1-1ubuntu1_amd64.deb /tmp to install -# tigervncserver_1.13.1-1ubuntu1_amd64.deb -# tigervncserver_1.13.1-1ubuntu1_arm64.deb -# but replace by curl command to support dpkg --print-architecture for amd64 and arm64 -# tigervncserver_1.14.80-1ubuntu1_22.04_amd64.deb -# tigervncserver_1.14.1-1ubuntu1_22.04.amd64.deb -# tigervncserver_1.14.1-1ubuntu1_24.04.amd64.deb -ENV TIGERVNC_RELEASE=1.15.0 -RUN apt-get update && \ - apt-get install -y --no-install-recommends \ - tigervnc-standalone-server \ - tigervnc-tools && \ - apt-get clean && \ - rm -rf /var/lib/apt/lists/* - - -# install core packages -# x11-apps is need to install xeyes xeyes is a test application -RUN apt-get update && \ - apt-get install -y --no-install-recommends -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" \ - supervisor \ - wmctrl \ - cups-client \ - pulseaudio-utils \ - xauth \ - websockify \ - krb5-user \ - desktop-file-utils \ - xdg-user-dirs \ - xclip \ - x11-apps \ - libimlib2t64 \ - libglib2.0-bin \ - && apt-get clean && rm -rf /var/lib/apt/lists/* - -RUN apt-get update && \ - apt-get install -y x11-utils && \ - apt-get install -y --no-install-recommends \ - dbus-x11 \ - xfwm4 && \ - apt-get clean && rm -rf /var/lib/apt/lists/* - -#RUN apt-get update && \ -# apt-get install -y --no-install-recommends \ -# task-french-kde-desktop \ -# task-romanian-kde-desktop \ -# task-german-kde-desktop && \ -# apt-get clean && rm -rf /var/lib/apt/lists/* - - -RUN apt-get update && \ - apt-get install -y x11-utils && \ - apt-get install -y --no-install-recommends \ - openbox \ - obconf \ - lxappearance \ - lxappearance-obconf && \ - apt-get clean && rm -rf /var/lib/apt/lists/* - -RUN apt-get update && \ - apt-get install -y --no-install-recommends \ - plasma-desktop \ - qml-module-org-kde-kcm && \ - apt-get clean && rm -rf /var/lib/apt/lists/* - - -# RUN apt-get update && \ -# apt-get install -y x11-utils && \ -# apt-get install -y --no-install-recommends \ -# plasma-workspace \ -# plasma-systemmonitor \ -# plasma-mobile \ -# libnotify-bin \ -# libnotify4 && \ -# apt-get clean && rm -rf /var/lib/apt/lists/* - - -## install MS fonts -#RUN apt-get update && \ -# echo ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true | sudo debconf-set-selections -# apt-get install -y --no-install-recommends fontconfig ttf-mscorefonts-installer && \ -# apt-get clean && rm -rf /var/lib/apt/lists/* - - -# install Selawik fonts -# comment for licencing -# ADD fonts/SegoeUI.tar /usr/share/fonts/Microsoft/TrueType/SegoeUI/ -# fc-cache -f /usr/share/fonts/Microsoft/TrueType/SegoeUI/ && \ -ADD fonts/Selawik.tar /usr/share/fonts/Microsoft/TrueType/Selawik/ -RUN apt-get update && \ - apt-get install -y --no-install-recommends fontconfig fonts-noto xfonts-base && \ - fc-cache -f /usr/share/fonts/Microsoft/TrueType/Selawik/ && \ - apt-get clean && rm -rf /var/lib/apt/lists/* - -# install composer -COPY --from=ubuntu_node_modules_builder /composer /composer - -# copy themes from abcdesktopio/oc.themes:4.0 -COPY --from=abcdesktopio/oc.themes:4.0 /usr/share/themes /usr/share/themes -# COPY --from=abcdesktopio/oc.themes:4.0 /usr/share/icons /usr/share/icons -COPY --from=abcdesktopio/oc.themes:4.0 /usr/share/aurorae/themes /usr/share/aurorae/themes -COPY --from=abcdesktopio/oc.themes:4.0 /usr/share/color-schemes /usr/share/color-schemes -COPY --from=abcdesktopio/oc.themes:4.0 /usr/share/plasma/desktoptheme /usr/share/plasma/desktoptheme -# COPY --from=abcdesktopio/oc.themes:4.0 /usr/share/plasma/layout-templates /usr/share/plasma/layout-templates -COPY --from=abcdesktopio/oc.themes:4.0 /usr/share/plasma/look-and-feel /usr/share/plasma/look-and-feel -COPY --from=abcdesktopio/oc.themes:4.0 /usr/share/Kvantum /usr/share/Kvantum -COPY --from=abcdesktopio/oc.themes:4.0 /usr/share/wallpapers /usr/share/wallpapers - -RUN apt-get update && \ - apt-get install -y --no-install-recommends \ - gtk-update-icon-cache && \ - gtk-update-icon-cache && \ - apt-get clean && \ - rm -rf /var/lib/apt/lists/* - - -# install nodejs -RUN mkdir -p /etc/apt/keyrings && \ - curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \ - echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list && \ - apt-get update && \ - apt-get install -y --no-install-recommends nodejs && \ - apt-get clean && \ - rm -rf /var/lib/apt/lists/* - - -# add sound files from ubuntu alsa package alsa-utils -ADD usr/share/sounds/alsa /usr/share/sounds/alsa - -# RUN chmod -R 755 /usr/share/plasma/desktoptheme/Win11OS-light/* -# LOG AND PID SECTION -RUN mkdir -p /var/log/desktop /var/run/desktop && chmod 777 /var/log/desktop /var/run/desktop - -# remove /etc/supervisor/conf.d/xterm.conf in hardening -RUN if [ "$TARGET_MODE" = "hardening" ] ; then \ - rm -f /etc/supervisor/conf.d/xterm.conf; \ - echo "supervisor xterm.conf has been removed"; \ - fi - -# -# create account balloon for compatility with 2.0 -# Next command use $BUSER context -# this is the default user if no user defined -# create group, user, set password -# fix home dir owner -ENV BUSER=balloon -RUN groupadd --gid 4096 $BUSER && \ - useradd --create-home --shell /bin/bash --uid 4096 -g $BUSER $BUSER && \ - echo "balloon:lmdpocpetit" | chpasswd $BUSER &&\ - chown -R $BUSER:$BUSER /home/$BUSER - -# change passwd shadow group gshadow -RUN mkdir -p $ABCDESKTOP_LOCALACCOUNT_DIR && \ - for f in passwd shadow group gshadow ; do if [ -f /etc/$f ] ; then cp /etc/$f $ABCDESKTOP_LOCALACCOUNT_DIR ; rm -f /etc/$f; ln -s $ABCDESKTOP_LOCALACCOUNT_DIR/$f /etc/$f; fi; done - -# set build date -RUN date > /etc/build.date - -# install qterminal xfonts-base -RUN if [ "${TARGET_MODE}" != "hardening" ]; then \ - apt-get update && \ - apt-get install -y --no-install-recommends qterminal vim && \ - apt-get clean && rm -rf /var/lib/apt/lists/*; \ - fi - - -# fun but not a good idea -# RUN if [ "$TARGET_MODE" = "hardening" ] ; then \ -# apt-get remove -y --allow-remove-essential apt && \ -# rm -rf /var/lib/dpkg /bin/dpkg* /sbin/dpkg-* /var/log/apt /var/log/*.log /etc/apt ; \ -# fi - -# set command -CMD [ "/composer/docker-entrypoint.sh" ] - -#################################################### -# SERVICE # TCP PORT # -#################################################### -# XTERM_TCP_PORT 29781 -# BROADCAST_SERVICE_TCP_PORT 29784 -# SPAWNER_SERVICE_TCP_PORT 29786 -# WS_TCP_BRIDGE_SERVICE_TCP_PORT 6081 -# DBUS_SESSION_TCP_PORT 55556 -# DBUS_SYSTEM_TCP_PORT 55557 -#################################################### - -## RESERVED TCP PORT 29782 for pulseaudio -## RESERVED TCP PORT 29785 for cupsd - -# VOLUME /home/$BUSER -# Set for compatibility 2.0 -WORKDIR /home/$BUSER -USER $BUSER - -EXPOSE 6081 29781 29784 29786 diff --git a/Dockerfile.debian.sudo b/Dockerfile.debian.sudo deleted file mode 100644 index 43f9352..0000000 --- a/Dockerfile.debian.sudo +++ /dev/null @@ -1,29 +0,0 @@ -ARG TARGETPLATFORM -ARG BUILDPLATFORM -# Default release is 22.04 -ARG TAG=latest -# Default base image -ARG BASE_IMAGE -ARG BASE_IMAGE_RELEASE - -# ABCDESKTOP_LOCALACCOUNT_DIR arg -# use in ENV ABCDESKTOP_LOCALACCOUNT_DIR=$ABCDESKTOP_LOCALACCOUNT_DIR -# release >= 3.1 set value to "/etc/localaccount" -# release < 3.1 set value to "/var/secrets/abcdesktop/localaccount" -ARG ABCDESKTOP_LOCALACCOUNT_DIR -# ="/etc/localaccount" - -# -# create package for openbox -# deb files will be located in /root/packages/$(uname -m) directory -# patched with openbox.title.patch for abcdesktop -FROM ${BASE_IMAGE}:${BASE_IMAGE_RELEASE} -ARG TARGET_MODE -USER 0 -# install sudo -# install qterminal xfonts-base -# allow all users to run sudo commands -# remove it if need -RUN if [ "${TARGET_MODE}" != "hardening" ]; then apt-get update && apt-get install -y --no-install-recommends sudo && apt-get clean && rm -rf /var/lib/apt/lists/* && echo "ALL ALL=(ALL:ALL) ALL" > /etc/sudoers.d/all; fi - -USER $BUSER diff --git a/Dockerfile.ubuntu.addons-nvidia b/Dockerfile.ubuntu.addons-nvidia deleted file mode 100644 index 55d8547..0000000 --- a/Dockerfile.ubuntu.addons-nvidia +++ /dev/null @@ -1,105 +0,0 @@ -ARG TARGETPLATFORM -ARG BUILDPLATFORM -# Default release is 22.04 -ARG TAG=latest -# Default base image -ARG BASE_IMAGE -ARG BASE_IMAGE_RELEASE -ARG DRIVER_VERSION -# -# The main oc.user start here -# -FROM ${BASE_IMAGE}:${BASE_IMAGE_RELEASE} - -USER 0 - -ARG DRIVER_VERSION - -# convert ARG to ENV with same name -ENV TARGET_MODE=$TARGET_MODE -ENV DRIVER_VERSION=$DRIVER_VERSION - -# Make all NVIDIA GPUs visible by default -ENV NVIDIA_VISIBLE_DEVICES all -# All NVIDIA driver capabilities should preferably be used, check `NVIDIA_DRIVER_CAPABILITIES` inside the container if things do not work -ENV NVIDIA_DRIVER_CAPABILITIES all -# Disable VSYNC for NVIDIA GPUs - - - -# install for nvidia -RUN apt-get update && \ - apt-get install -y --no-install-recommends \ - mesa-utils \ - drm-info \ - libglvnd0 \ - wget \ - && apt-get clean && \ - rm -rf /var/lib/apt/lists/* - -# -# Install Xorg and other important libraries or packages -RUN apt-get update && apt-get install --no-install-recommends -y \ - # Install essential Xorg and NVIDIA packages, packages above this line should be the same between docker-nvidia-glx-desktop and docker-nvidia-egl-desktop - libc6-dev \ - libpci3 \ - xcvt \ - vim \ - pkg-config \ - libelf-dev \ - libglvnd-dev \ - libglvnd0 && \ - rm -rf /var/lib/apt/lists/* - -RUN echo "/usr/local/nvidia/lib64" >> /etc/ld.so.conf.d/nvidia.conf && \ - ldconfig - -# Install operating system libraries or packages -RUN apt-get update && apt-get install --no-install-recommends -y \ - vulkan-tools \ - mesa-utils \ - kmod \ - drm-info && \ - rm -rf /var/lib/apt/lists/* - -ENV TERM=linux -# install nvidia modules -RUN cd /tmp && \ - echo DRIVER_VERSION=\"$DRIVER_VERSION\" && \ - curl -fsL -O "https://us.download.nvidia.com/XFree86/Linux-x86_64/$DRIVER_VERSION/NVIDIA-Linux-x86_64-$DRIVER_VERSION.run" || curl -fsL -O "https://us.download.nvidia.com/tesla/$DRIVER_VERSION/NVIDIA-Linux-x86_64-$DRIVER_VERSION.run" || { echo "Failed NVIDIA GPU driver download. Exiting."; exit 1; } && \ - chmod 755 "NVIDIA-Linux-x86_64-$DRIVER_VERSION.run" && \ - ./NVIDIA-Linux-x86_64-$DRIVER_VERSION.run -x && \ - ls -la && \ - cd "NVIDIA-Linux-x86_64-$DRIVER_VERSION" && \ - ./nvidia-installer --silent \ - --no-systemd \ - --no-kernel-module \ - --no-nouveau-check \ - --no-nvidia-modprobe \ - --no-rpms \ - --no-backup \ - --no-check-for-alternate-installs && \ - rm -rf /tmp/NVIDIA* - -# Configure EGL manually -RUN mkdir -p /usr/share/glvnd/egl_vendor.d/ && \ - echo "{\n\ - \"file_format_version\" : \"1.0.0\",\n\ - \"ICD\": {\n\"library_path\": \"libEGL_nvidia.so.0\"\n }\n \ - }" > /usr/share/glvnd/egl_vendor.d/10_nvidia.json - -ENV __GL_SYNC_TO_VBLANK 0 - -# NAME="Ubuntu" -# VERSION_ID="22.04" -#RUN wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-keyring_1.1-1_all.deb && \ -# apt-get update && apt-get install --no-install-recommends -y ./cuda-keyring_1.1-1_all.deb && \ -# rm -rf /var/lib/apt/lists/* - - -# set build date -RUN date > /etc/build.date - -# Set for compatibility 2.0 -WORKDIR /home/$BUSER -USER $BUSER diff --git a/Dockerfile.ubuntu.nvidia b/Dockerfile.ubuntu.nvidia deleted file mode 100644 index 9c164d9..0000000 --- a/Dockerfile.ubuntu.nvidia +++ /dev/null @@ -1,424 +0,0 @@ -ARG TARGETPLATFORM -ARG BUILDPLATFORM -# Default release is 22.04 -ARG TAG=latest -# Default base image -ARG BASE_IMAGE=ubuntu -# BASE_IMAGE_RELEASE deprecated -ARG BASE_IMAGE_RELEASE=22.04 - -ARG CUDA_VERSION=12.4.1 - - -# ABCDESKTOP_LOCALACCOUNT_DIR arg -# use in ENV ABCDESKTOP_LOCALACCOUNT_DIR=$ABCDESKTOP_LOCALACCOUNT_DIR -# release >= 3.1 set value to "/etc/localaccount" -# release < 3.1 set value to "/var/secrets/abcdesktop/localaccount" -ARG ABCDESKTOP_LOCALACCOUNT_DIR -# ="/etc/localaccount" - -# -# create package for openbox -# deb files will be located in /root/packages/$(uname -m) directory -# patched with openbox.title.patch for abcdesktop -FROM ${BASE_IMAGE}:${TAG} as openbox_ubuntu_builder -ENV DEBEMAIL nobody@abcdesktop.io -RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections -RUN sed -i '/deb-src/s/^# //' /etc/apt/sources.list -RUN apt-get update -RUN apt-get install -y --no-install-recommends devscripts wget ca-certificates -RUN apt-get build-dep -y openbox -RUN mkdir -p /openbox/src -WORKDIR /openbox -RUN apt-get source openbox -RUN wget https://raw.githubusercontent.com/abcdesktopio/openbox/main/openbox.title.patch -RUN cd openbox-3.6.1 && patch -p2 < ../openbox.title.patch -RUN cd openbox-3.6.1 && dch -n abcdesktop_sig_usr -RUN cd openbox-3.6.1 && EDITOR=/bin/true dpkg-source -q --commit . abcdesktop_sig_usr -RUN cd openbox-3.6.1 && debuild -us -uc -RUN ls *.deb - - -##### -# install all nodejs modules -# build nodejs module -# create /composer/node -# use FROM BASE_IMAGE -# define FROM before use ENV command -FROM ${BASE_IMAGE}:${TAG} as ubuntu_node_modules_builder - -# define arg -ARG TARGET_MODE -# convert ARG to ENV with same name -ENV TARGET_MODE=$TARGET_MODE -ENV NODE_MAJOR=18 - -RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections -RUN apt-get update && apt-get install -y --no-install-recommends \ - gcc \ - g++ \ - make - -# to make install wmctrljs nodejs components -# add build dev package -RUN apt-get update && apt-get install -y --no-install-recommends \ - ca-certificates \ - libx11-dev \ - libxmu-dev \ - libimlib2-dev \ - git \ - curl \ - gnupg \ - dpkg - -# install yarn npm nodejs -RUN mkdir -p /etc/apt/keyrings && \ - curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \ - echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list && apt-get update && apt-get install -y --no-install-recommends nodejs && npm -g install yarn - - -COPY composer /composer - -# add wait-port -WORKDIR /composer/node/wait-port -RUN yarn install --production=true && npm i --package-lock-only && npm audit fix - -# Add nodejs service -# yarn install --production[=true|false] -# yarn will not install any package listed in devDependencies if the NODE_ENV environment variable is set to production. -# Use this flag to instruct Yarn to ignore NODE_ENV and take its production-or-not status from this flag instead. -WORKDIR /composer/node/common-libraries -RUN yarn install --production=true && npm i --package-lock-only && npm audit fix - -WORKDIR /composer/node/broadcast-service -RUN yarn install --production=true && npm i --package-lock-only && npm audit fix - -WORKDIR /composer/node/ocrun -RUN yarn install --production=true && npm i --package-lock-only && npm audit fix - -WORKDIR /composer/node/ocdownload -RUN yarn install --production=true && npm i --package-lock-only && npm audit fix - -WORKDIR /composer/node/occall -RUN yarn install --production=true && npm i --package-lock-only && npm audit fix - -WORKDIR /composer/node/spawner-service/lib_spawner/colorflow -RUN yarn install --production=true - -WORKDIR /composer/node/spawner-service -# install node-gyp to build spawner-service -RUN yarn global add node-gyp -RUN yarn install --production=true -# && npm i --package-lock-only && npm audit fix - -# WORKDIR /composer/node/xterm.js -RUN if [ "$TARGET_MODE" = "hardening" ] ; then \ - rm -rf /composer/node/xterm.js; \ - ls -la /composer/node; \ - else \ - cd /composer/node/xterm.js; \ - yarn install --production=true; \ - npm i --package-lock-only; \ - npm audit fix; \ - ls -la /composer/node/xterm.js; \ - fi - -# version.json must be created by mkversion.sh bash script -COPY composer/version.json /composer/version.json - - - - - -# -# The main oc.user start here -# -FROM nvcr.io/nvidia/cuda:${CUDA_VERSION}-runtime-ubuntu${BASE_IMAGE_RELEASE} - - -# define arg -ARG ABCDESKTOP_LOCALACCOUNT_DIR -ARG TARGET_MODE -# convert ARG to ENV with same name -ENV ABCDESKTOP_LOCALACCOUNT_DIR=$ABCDESKTOP_LOCALACCOUNT_DIR -ENV TARGET_MODE=$TARGET_MODE -# set node release -ENV NODE_MAJOR=18 - -COPY etc /etc -RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections && \ - apt-get update && \ - apt-get upgrade -y --no-install-recommends && \ - apt-get install -y --no-install-recommends \ - ca-certificates \ - curl \ - gnupg \ - net-tools \ - bash && \ - apt-get clean && \ - rm -rf /var/lib/apt/lists/* - -# add languages -# locales for locale-gen command -RUN apt-get update && apt-get install -y --no-install-recommends \ - locales \ - language-pack-en \ - language-pack-fr \ - language-pack-de \ - && locale-gen \ - && apt-get clean \ - && rm -rf /var/lib/apt/lists/* - -# install -# Do not use -# COPY tigervncserver_1.13.1-1ubuntu1_amd64.deb /tmp to install -# tigervncserver_1.13.1-1ubuntu1_amd64.deb -# tigervncserver_1.13.1-1ubuntu1_arm64.deb -# but replace by curl command to support dpkg --print-architecture for amd64 and arm64 -RUN apt-get update && \ - tigervncdeburl="https://raw.githubusercontent.com/abcdesktopio/oc.user/main/tigervncserver_1.13.1-1ubuntu1_$(dpkg --print-architecture).deb" && \ - echo Downloading $tigervncdeburl && \ - curl -sL --output /tmp/tigervncserver.deb "$tigervncdeburl" && \ - apt-get install -y --no-install-recommends /tmp/tigervncserver.deb && \ - rm -f /tmp/*.deb && \ - apt-get clean && rm -rf /var/lib/apt/lists/* - -RUN apt-get update && \ - apt-get install -y --no-install-recommends \ - supervisor \ - wmctrl \ - cups-client \ - pulseaudio-utils \ - pavumeter \ - xauth \ - websockify \ - krb5-user \ - && apt-get clean && rm -rf /var/lib/apt/lists/* - - -RUN apt-get update && apt-get install -y --no-install-recommends \ - desktop-file-utils \ - xdg-user-dirs \ - x11-xserver-utils \ - adwaita-icon-theme \ - adwaita-qt \ - xclip \ - gsetroot \ - && apt-get clean && rm -rf /var/lib/apt/lists/* - - -# install openbox custome packages -RUN mkdir -p /tmp/packages -COPY --from=openbox_ubuntu_builder /openbox/libobt* /openbox/openbox_3.6.1* /openbox/libobrender* /tmp/packages/ -RUN apt-get update && \ - apt-get install -y --no-install-recommends -f /tmp/packages/*.deb && \ - apt-get clean && \ - rm -rf /var/lib/apt/lists/* - -# Uncommant lines to add picom compositor and watermarking support -# -# to add compositor ( this option takes more memory in user's pod ) -# picom need hsetroot -# xsetroot is not supported by picom -#RUN apt-get update && \ -# apt-get install -y --no-install-recommends \ -# picom \ -# hsetroot && \ -# apt-get clean && \ -# rm -rf /var/lib/apt/lists/* -# - -# install composer -COPY --from=ubuntu_node_modules_builder /composer /composer - -# install nodejs -RUN mkdir -p /etc/apt/keyrings && \ - curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \ - echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list && \ - apt-get update && \ - apt-get install -y --no-install-recommends nodejs && \ - apt-get clean && \ - rm -rf /var/lib/apt/lists/* && \ - node --version - -# -# themes section -# copy themes from abcdesktopio/oc.themes -# COPY themes /usr/share/themes -# COPY --from=abcdesktopio/oc.themes /usr/share/icons /usr/share/icons -# COPY --from=abcdesktopio/oc.themes /usr/share/themes /usr/share/themes -# COPY --from=theme_builder /usr/share/themes /usr/share/themes -ADD Arc_OSXbuttons.tar /usr/share/themes - - -# add sound files from ubuntu alsa package alsa-utils -ADD usr/share/sounds/alsa /usr/share/sounds/alsa - -# LOG AND PID SECTION -RUN mkdir -p /var/log/desktop /var/run/desktop && chmod 777 /var/log/desktop /var/run/desktop - -# remove /etc/supervisor/conf.d/xterm.conf in hardening -RUN if [ "${TARGET_MODE}" = "hardening" ] ; then rm -f /etc/supervisor/conf.d/xterm.conf; echo "supervisor xterm.conf has been removed"; fi - -# install qterminal xfonts-base -RUN if [ "${TARGET_MODE}" != "hardening" ]; then \ - apt-get update && \ - apt-get install -y --no-install-recommends qterminal xfonts-base && \ - apt-get clean && rm -rf /var/lib/apt/lists/*; \ - fi - - -########################################### -# nvidia xorg add ones -# -# -# - -# Expose NVIDIA libraries and paths -ENV PATH /usr/local/nvidia/bin${PATH:+:${PATH}} -ENV LD_LIBRARY_PATH ${LD_LIBRARY_PATH:+${LD_LIBRARY_PATH}:}/usr/local/nvidia/lib:/usr/local/nvidia/lib64 - -# Make all NVIDIA GPUs visible by default -ENV NVIDIA_VISIBLE_DEVICES all -# All NVIDIA driver capabilities should preferably be used, check `NVIDIA_DRIVER_CAPABILITIES` inside the container if things do not work -ENV NVIDIA_DRIVER_CAPABILITIES all -# Disable VSYNC for NVIDIA GPUs -ENV __GL_SYNC_TO_VBLANK 0 - -# Anything above this line should always be kept the same between docker-nvidia-glx-desktop and docker-nvidia-egl-desktop -ENV SIZEW 1920 -ENV SIZEH 1080 -ENV REFRESH 60 -ENV DPI 96 -ENV CDEPTH 24 -ENV VIDEO_PORT DFP -# -# Install Xorg and other important libraries or packages -RUN apt-get update && apt-get install --no-install-recommends -y \ - # Install essential Xorg and NVIDIA packages, packages above this line should be the same between docker-nvidia-glx-desktop and docker-nvidia-egl-desktop - kmod \ - libc6-dev \ - libpci3 \ - xcvt \ - vim \ - mesa-utils \ - pkg-config \ - libelf-dev && \ - rm -rf /var/lib/apt/lists/* - -RUN echo "/usr/local/nvidia/lib" >> /etc/ld.so.conf.d/nvidia.conf && \ - echo "/usr/local/nvidia/lib64" >> /etc/ld.so.conf.d/nvidia.conf && \ - ldconfig - -RUN apt-get update && apt-get install --no-install-recommends -y --force-yes -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" \ - xorg && \ - rm -rf /var/lib/apt/lists/* - -# Install operating system libraries or packages -RUN apt-get update && apt-get install --no-install-recommends -y \ - vulkan-tools && \ - rm -rf /var/lib/apt/lists/* - -# Configure EGL manually -RUN mkdir -p /usr/share/glvnd/egl_vendor.d/ && \ - echo "{\n\ - \"file_format_version\" : \"1.0.0\",\n\ - \"ICD\": {\n\"library_path\": \"libEGL_nvidia.so.0\"\n }\n \ - }" > /usr/share/glvnd/egl_vendor.d/10_nvidia.json - -# set DRIVER_VERSION -ENV DRIVER_VERSION=550.54.14 -ENV TERM=linux -# install nvidia modules -RUN cd /tmp && \ - curl -fsL -O "https://us.download.nvidia.com/XFree86/Linux-x86_64/$DRIVER_VERSION/NVIDIA-Linux-x86_64-$DRIVER_VERSION.run" || curl -fsL -O "https://us.download.nvidia.com/tesla/$DRIVER_VERSION/NVIDIA-Linux-x86_64-$DRIVER_VERSION.run" || { echo "Failed NVIDIA GPU driver download. Exiting."; exit 1; } && \ - chmod 755 "NVIDIA-Linux-x86_64-$DRIVER_VERSION.run" && \ - ./NVIDIA-Linux-x86_64-$DRIVER_VERSION.run -x && \ - ls -la && \ - cd "NVIDIA-Linux-x86_64-$DRIVER_VERSION" && \ - ./nvidia-installer --silent \ - --no-systemd \ - --no-kernel-module \ - --no-nouveau-check \ - --no-nvidia-modprobe \ - --no-rpms \ - --no-backup \ - --no-check-for-alternate-installs && \ - rm -rf /tmp/NVIDIA* - -# Allow starting Xorg from a pseudoterminal instead of strictly on a tty console -RUN echo -e "allowed_users=anybody\nneeds_root_rights=yes" | tee /etc/X11/Xwrapper.config > /dev/null -RUN sed -i "s/allowed_users=console/allowed_users=anybody/;$ a needs_root_rights=yes" /etc/X11/Xwrapper.config - -# install VIRTUALGL -#WORKDIR /tmp -#ARG VIRTUALGL_VERSION=3.1 -#ARG VIRTUALGL_URL="https://sourceforge.net/projects/virtualgl/files" -#RUN curl -fsSL -O "${VIRTUALGL_URL}/virtualgl_${VIRTUALGL_VERSION}_amd64.deb" && \ -# apt-get update && apt-get install -y --no-install-recommends ./virtualgl_${VIRTUALGL_VERSION}_amd64.deb && \ -# rm -f "virtualgl_${VIRTUALGL_VERSION}_amd64.deb" && \ -# rm -rf /var/lib/apt/lists/* && \ -# chmod u+s /usr/lib/libvglfaker.so && \ -# chmod u+s /usr/lib/libdlfaker.so -# - -############################################ - - -# -# add sudo -RUN apt-get update && \ - apt-get install -y --no-install-recommends sudo && \ - apt-get clean && \ - rm -rf /var/lib/apt/lists/* && \ - echo "ALL ALL=(ALL:ALL) ALL" >> /etc/sudoers.d/all && \ - echo "ALL ALL = NOPASSWD: /usr/bin/nvidia-xconfig" >> /etc/sudoers.d/all - - -# create a xorg.conf -# this file will be updated by /usr/bin/nvidia-xconfig as user -RUN touch /etc/X11/xorg.conf && chmod 666 /etc/X11/xorg.conf && chmod 777 /etc/X11 - -# -# create account balloon for compatility with 2.0 -# Next command use $BUSER context -# this is the default user if no user defined -# create group, user, set password -# fix home dir owner -ENV BUSER balloon -RUN groupadd --gid 4096 $BUSER && \ - useradd --create-home --shell /bin/bash --uid 4096 -g $BUSER $BUSER && \ - echo "balloon:lmdpocpetit" | chpasswd $BUSER &&\ - chown -R $BUSER:$BUSER /home/$BUSER - -# change passwd shadow group gshadow -RUN mkdir -p $ABCDESKTOP_LOCALACCOUNT_DIR && \ - for f in passwd shadow group gshadow ; do if [ -f /etc/$f ] ; then cp /etc/$f $ABCDESKTOP_LOCALACCOUNT_DIR ; rm -f /etc/$f; ln -s $ABCDESKTOP_LOCALACCOUNT_DIR/$f /etc/$f; fi; done - -# set build date -RUN date > /etc/build.date - - -# set command -CMD [ "/composer/docker-entrypoint.sh" ] - -#################################################### -# SERVICE # TCP PORT # -#################################################### -# XTERM_TCP_PORT 29781 -# BROADCAST_SERVICE_TCP_PORT 29784 -# SPAWNER_SERVICE_TCP_PORT 29786 -# WS_TCP_BRIDGE_SERVICE_TCP_PORT 6081 -# DBUS_SESSION_TCP_PORT 55556 -# DBUS_SYSTEM_TCP_PORT 55557 -#################################################### - -## RESERVED TCP PORT 29782 for pulseaudio -## RESERVED TCP PORT 29785 for cupsd - -# VOLUME /home/$BUSER -# Set for compatibility 2.0 -WORKDIR /home/$BUSER -USER $BUSER - -EXPOSE 6081 29781 29784 29786 From 53b5651aa895175b23ab457d867fab2050d89ebf Mon Sep 17 00:00:00 2001 From: alexandredevely <12896316+alexandredevely@users.noreply.github.com> Date: Mon, 16 Mar 2026 17:19:10 +0100 Subject: [PATCH 22/28] remove files --- .../ksplash/ksplashqml/splashapp.cpp | 149 ------------------ .../ksplash/ksplashqml/splashwindow.cpp | 116 -------------- 2 files changed, 265 deletions(-) delete mode 100644 plasma-workspace/plasma-workspace-5.27.12/ksplash/ksplashqml/splashapp.cpp delete mode 100644 plasma-workspace/plasma-workspace-5.27.12/ksplash/ksplashqml/splashwindow.cpp diff --git a/plasma-workspace/plasma-workspace-5.27.12/ksplash/ksplashqml/splashapp.cpp b/plasma-workspace/plasma-workspace-5.27.12/ksplash/ksplashqml/splashapp.cpp deleted file mode 100644 index 571d87f..0000000 --- a/plasma-workspace/plasma-workspace-5.27.12/ksplash/ksplashqml/splashapp.cpp +++ /dev/null @@ -1,149 +0,0 @@ -/* - SPDX-FileCopyrightText: 2010 Ivan Cukic - SPDX-FileCopyrightText: 2013 Martin Klapetek - - SPDX-License-Identifier: GPL-2.0-or-later -*/ - -#include "splashapp.h" -#include "splashwindow.h" - -#include -#include -#include -#include -#include -#include - -#include - -#include -#include - -#include - -Q_LOGGING_CATEGORY(ksplashqml, "org.kde.plasma.ksplashqml", QtWarningMsg) - -#define TEST_STEP_INTERVAL 2000 - -/** - * There are 7 stages in ksplash - * - initial (from this class) - * - startPlasma (from startplasma) - * - kcminit - * - ksmserver - * - wm (for X11 from KWin, for Wayland from this class) - * - ready (from plasma-session startup) - * - desktop (from shellcorona) - */ - -SplashApp::SplashApp(int &argc, char **argv) - : QGuiApplication(argc, argv) - , m_stage(0) - , m_testing(false) - , m_window(false) -{ - QCommandLineParser parser; - parser.addOption(QCommandLineOption(QStringLiteral("test"), QStringLiteral("Run in test mode"))); - parser.addOption(QCommandLineOption(QStringLiteral("window"), QStringLiteral("Run in windowed mode"))); - parser.addOption(QCommandLineOption(QStringLiteral("nofork"), QStringLiteral("Don't fork"))); - parser.addOption(QCommandLineOption(QStringLiteral("pid"), QStringLiteral("Print the pid of the child process"))); - parser.addPositionalArgument(QStringLiteral("theme"), QStringLiteral("Path to the theme to test")); - parser.addHelpOption(); - - parser.process(*this); - m_testing = parser.isSet(QStringLiteral("test")); - m_window = parser.isSet(QStringLiteral("window")); - m_theme = parser.positionalArguments().value(0); - if (m_theme.isEmpty()) { - KConfigGroup ksplashCfg = KSharedConfig::openConfig()->group("KSplash"); - if (ksplashCfg.readEntry("Engine", QStringLiteral("KSplashQML")) == QLatin1String("KSplashQML")) { - m_theme = ksplashCfg.readEntry("Theme", QStringLiteral("Breeze")); - } - } - - QDBusConnection dbus = QDBusConnection::sessionBus(); - dbus.registerObject(QStringLiteral("/KSplash"), this, QDBusConnection::ExportScriptableSlots); - dbus.registerService(QStringLiteral("org.kde.KSplash")); - - setupWaylandIntegration(); - - foreach (QScreen *screen, screens()) - adoptScreen(screen); - - setStage(QStringLiteral("initial")); - - if (KWindowSystem::isPlatformWayland()) { - setStage(QStringLiteral("wm")); - } - - if (m_testing) { - m_timer.start(TEST_STEP_INTERVAL, this); - } - - connect(this, &QGuiApplication::screenAdded, this, &SplashApp::adoptScreen); -} - -SplashApp::~SplashApp() -{ - qDeleteAll(m_windows); -} - -void SplashApp::timerEvent(QTimerEvent *event) -{ - if (event->timerId() == m_timer.timerId()) { - m_timer.stop(); - - setStage(m_stage + 1); - - m_timer.start(TEST_STEP_INTERVAL, this); - } -} - -void SplashApp::setStage(const QString &stage) -{ - qCDebug(ksplashqml) << "Loading stage " << stage << ", current count " << m_stages.count(); - - if (m_stages.contains(stage)) { - return; - } - m_stages.append(stage); - setStage(m_stages.count()); -} - -void SplashApp::setStage(int stage) -{ - m_stage = stage; - if (m_stage == 6) { - QGuiApplication::exit(EXIT_SUCCESS); - } - foreach (SplashWindow *w, m_windows) { - w->setStage(stage); - } -} - -void SplashApp::adoptScreen(QScreen *screen) -{ - if (screen->geometry().isNull()) { - return; - } - SplashWindow *w = new SplashWindow(m_testing, m_window, m_theme, screen); - w->setGeometry(screen->geometry()); - w->setStage(m_stage); - w->setVisible(true); - m_windows << w; - - connect(screen, &QScreen::geometryChanged, w, &SplashWindow::setGeometry); - connect(screen, &QObject::destroyed, w, [this, w]() { - m_windows.removeAll(w); - w->deleteLater(); - }); -} - -void SplashApp::setupWaylandIntegration() -{ - if (!KWindowSystem::isPlatformWayland()) { - return; - } - LayerShellQt::Shell::useLayerShell(); -} diff --git a/plasma-workspace/plasma-workspace-5.27.12/ksplash/ksplashqml/splashwindow.cpp b/plasma-workspace/plasma-workspace-5.27.12/ksplash/ksplashqml/splashwindow.cpp deleted file mode 100644 index c623385..0000000 --- a/plasma-workspace/plasma-workspace-5.27.12/ksplash/ksplashqml/splashwindow.cpp +++ /dev/null @@ -1,116 +0,0 @@ -/* - SPDX-FileCopyrightText: 2010 Ivan Cukic - - SPDX-License-Identifier: GPL-2.0-or-later -*/ - -#include "splashwindow.h" -#include "splashapp.h" - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -#include -#include - -#include - -SplashWindow::SplashWindow(bool testing, bool window, const QString &theme, QScreen *screen) - : KQuickAddons::QuickViewSharedEngine() - , m_stage(0) - , m_testing(testing) - , m_window(window) - , m_theme(theme) -{ - if (KWindowSystem::isPlatformWayland()) { - if (auto layerShellWindow = LayerShellQt::Window::get(this)) { - layerShellWindow->setScope(QStringLiteral("ksplashqml")); - layerShellWindow->setLayer(LayerShellQt::Window::LayerOverlay); - layerShellWindow->setExclusiveZone(-1); - layerShellWindow->setDesiredOutput(screen); - } - } - - setCursor(Qt::BlankCursor); - setScreen(screen); - setColor(Qt::transparent); - setDefaultAlphaBuffer(true); - setResizeMode(KQuickAddons::QuickViewSharedEngine::SizeRootObjectToView); - - if (!m_window) { - setFlags(Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint); - } - - if (!m_testing && !m_window) { - if (KWindowSystem::isPlatformX11()) { - // X11 specific hint only on X11 - setFlags(Qt::BypassWindowManagerHint); - } else if (!KWindowSystem::isPlatformWayland()) { - // on other platforms go fullscreen - // on Wayland we cannot go fullscreen due to QTBUG 54883 - setWindowState(Qt::WindowFullScreen); - } - } - - if (m_testing && !m_window && !KWindowSystem::isPlatformWayland()) { - setWindowState(Qt::WindowFullScreen); - } - - // be sure it will be eventually closed - // FIXME: should never be stuck - QTimer::singleShot(10000, this, &QWindow::close); -} - -void SplashWindow::setStage(int stage) -{ - m_stage = stage; - - rootObject()->setProperty("stage", stage); -} - -void SplashWindow::keyPressEvent(QKeyEvent *event) -{ - KQuickAddons::QuickViewSharedEngine::keyPressEvent(event); - if (event->key() == Qt::Key_Escape) { - close(); - } -} - -void SplashWindow::mousePressEvent(QMouseEvent *event) -{ - KQuickAddons::QuickViewSharedEngine::mousePressEvent(event); - if (m_testing && !event->isAccepted()) { - close(); - } -} - -void SplashWindow::setGeometry(const QRect &rect) -{ - bool oldGeometryEmpty = geometry().isNull(); - KQuickAddons::QuickViewSharedEngine::setGeometry(rect); - - if (oldGeometryEmpty) { - KPackage::Package package = KPackage::PackageLoader::self()->loadPackage(QStringLiteral("Plasma/LookAndFeel")); - KConfigGroup cg(KSharedConfig::openConfig(), "KDE"); - const QString packageName = cg.readEntry("LookAndFeelPackage", QString()); - if (!packageName.isEmpty()) { - package.setPath(packageName); - } - - if (!m_theme.isEmpty()) { - package.setPath(m_theme); - } - - Q_ASSERT(package.isValid()); - setSource(QUrl::fromLocalFile(package.filePath("splashmainscript"))); - } -} From bc4aeca6d9a7992dbef701785697cf388e19161f Mon Sep 17 00:00:00 2001 From: alexandredevely <12896316+alexandredevely@users.noreply.github.com> Date: Mon, 16 Mar 2026 17:20:30 +0100 Subject: [PATCH 23/28] remove files --- notes.nvidia.txt | 21 --------------------- 1 file changed, 21 deletions(-) delete mode 100644 notes.nvidia.txt diff --git a/notes.nvidia.txt b/notes.nvidia.txt deleted file mode 100644 index ed780f7..0000000 --- a/notes.nvidia.txt +++ /dev/null @@ -1,21 +0,0 @@ -apt remove tigervncserver -apt install tigervnc-xorg-extension - -file: /etc/X11/xorg.conf.d/10-vnc.conf -Section "Module" - Load "vnc" -EndSection - -Section "Screen" - Identifier "Screen0" - Option "UserPasswdVerifier" "VncAuth" - Option "PasswordFile" "/var/run/desktop/.vnc/passwd" -EndSection - -to start Xorg in xserver-nvidia.sh - -exec Xorg vt7 -verbose 5 -noreset -novtswitch -sharevts -dpi "${DPI}" -extension "XVideo-MotionCompensation" +extension "GLX" +extension "RANDR" +extension "RENDER" +extension "MIT-SHM" ${X11_PARAMS} "${DISPLAY}" - - -glxgears black screen - From 0286e523305240a227071d1fe1c8c2a3f23f75f7 Mon Sep 17 00:00:00 2001 From: alexandredevely <12896316+alexandredevely@users.noreply.github.com> Date: Mon, 16 Mar 2026 17:37:41 +0100 Subject: [PATCH 24/28] js script for plasma --- composer/set-backgroundcolor.js | 47 +++++++++++++++++++++++++++++++++ composer/set-wallpaper.js | 31 ++++++++++++++++++++++ 2 files changed, 78 insertions(+) create mode 100755 composer/set-backgroundcolor.js create mode 100755 composer/set-wallpaper.js diff --git a/composer/set-backgroundcolor.js b/composer/set-backgroundcolor.js new file mode 100755 index 0000000..76bfbbb --- /dev/null +++ b/composer/set-backgroundcolor.js @@ -0,0 +1,47 @@ +// ================================= +// You must defined hexacolor before running this js file +// like +// var hexacolor = "#CAFE75"; +// ================================= + +var ca = currentActivity(); +var desktopsArray = desktopsForActivity(currentActivity()); +let desktop=desktopsArray[0]; + +const hex2rgb = (hex) => { + const r = parseInt(hex.slice(1, 3), 16); + const g = parseInt(hex.slice(3, 5), 16); + const b = parseInt(hex.slice(5, 7), 16); + // return {r, g, b} + return { r, g, b }; +} + + +// debug log +print( "desktop=" + desktop + "\n" ); +print( "type=" + desktop.type + "\n" ); +print( "id=" + desktop.id + "\n" ); +print( "wallpaperPlugin=" + desktop.wallpaperPlugin + "\n" ); +print( "currentConfigGroup=" + desktop.currentConfigGroups + "\n" ); +print( "configGroups=" + desktop.configGroups + "\n" ); +print( "desktop.configGroups.length=" + desktop.configGroups.length + "\n" ); +print( "configKeys=" + desktop.configKeys+ "\n" ); +print( "desktop.configKeys.length=" + desktop.configKeys.length + "\n" ); + +// write color +desktop.wallpaperPlugin = "org.kde.color"; +desktop.currentConfigGroup = Array("Wallpaper", "org.kde.color", "General"); + +var rgbcolor=hex2rgb( hexacolor ); +var str_rgbcolor=rgbcolor.r + ',' + rgbcolor.g + ',' + rgbcolor.b; +print( "converted color is " + str_rgbcolor + '\n'); +let previouscolor = desktop.readConfig("Color"); +print( "previous color is " + previouscolor + '\n' ); +desktop.writeConfig("Color", str_rgbcolor); +desktop.writeConfig("Color", str_rgbcolor); // twice +desktopsArray[0].reloadConfig(); +let newcolor = desktop.readConfig("Color"); +print( "new color is " + newcolor + '\n'); +print( "again\n"); +desktop.writeConfig("Color", str_rgbcolor); +desktop.reloadConfig(); diff --git a/composer/set-wallpaper.js b/composer/set-wallpaper.js new file mode 100755 index 0000000..e9a6756 --- /dev/null +++ b/composer/set-wallpaper.js @@ -0,0 +1,31 @@ +// ================================= +// You must defined hexacolor before running this js file +// like +// var image = "/home/fry/.wallpapers/Photo by SpaceX.jpg"; +// ================================= + + +var ca = currentActivity(); +var desktopsArray = desktopsForActivity(currentActivity()); +let desktop=desktopsArray[0]; + +// debug log +print( "desktop=" + desktop + "\n" ); +print( "type=" + desktop.type + "\n" ); +print( "id=" + desktop.id + "\n" ); +print( "wallpaperPlugin=" + desktop.wallpaperPlugin + "\n" ); +print( "currentConfigGroup=" + desktop.currentConfigGroups + "\n" ); +print( "configGroups=" + desktop.configGroups + "\n" ); +print( "desktop.configGroups.length=" + desktop.configGroups.length + "\n" ); +print( "configKeys=" + desktop.configKeys+ "\n" ); +print( "desktop.configKeys.length=" + desktop.configKeys.length + "\n" ); + + +// var rgbcolor=hex2rgb( hexacolor ); +// var str_rgbcolor=rgbcolor.r + ',' + rgbcolor.g + ',' + rgbcolor.b; + +// write color +desktop.wallpaperPlugin = "org.kde.image"; +desktop.currentConfigGroup = Array("Wallpaper", "org.kde.image", "General"); +desktop.writeConfig("Image", image); +desktop.reloadConfig(); From 282d9892b1ce2ed6bde7e3a40fa997c7ef36abbc Mon Sep 17 00:00:00 2001 From: alexandredevely <12896316+alexandredevely@users.noreply.github.com> Date: Mon, 16 Mar 2026 17:46:31 +0100 Subject: [PATCH 25/28] rename update plasma launch --- composer/node/spawner-service/lib_spawner/desktop.js | 4 ++-- composer/{add-to-quicklaunch.js => set-quicklaunch.js} | 0 composer/{update-add-to-quicklaunch.sh => set-quicklaunch.sh} | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) rename composer/{add-to-quicklaunch.js => set-quicklaunch.js} (100%) rename composer/{update-add-to-quicklaunch.sh => set-quicklaunch.sh} (91%) diff --git a/composer/node/spawner-service/lib_spawner/desktop.js b/composer/node/spawner-service/lib_spawner/desktop.js index 3058cbe..543e436 100644 --- a/composer/node/spawner-service/lib_spawner/desktop.js +++ b/composer/node/spawner-service/lib_spawner/desktop.js @@ -148,9 +148,9 @@ async function update_plasmashell_add_to_quicklaunch_command(launchers) { console.log('update_plasmashell_add_to_quicklaunch_command is starting'); let env = process.env; env.LAUNCHERS=launchers; - // start /composer/update-add-to-quicklaunch.sh + // start /composer/set-quicklaunch.sh // put launchers as a env LAUNCHERS - const command = spawn( 'bash', [ '/composer/update-add-to-quicklaunch.sh'], {env: env} ); + const command = spawn( 'bash', [ '/composer/set-quicklaunch.sh'], {env: env} ); command.stderr.on('data', (data) => { console.log(`update_plasmashell_add_to_quicklaunch_command: stderr ${data}`); }); diff --git a/composer/add-to-quicklaunch.js b/composer/set-quicklaunch.js similarity index 100% rename from composer/add-to-quicklaunch.js rename to composer/set-quicklaunch.js diff --git a/composer/update-add-to-quicklaunch.sh b/composer/set-quicklaunch.sh similarity index 91% rename from composer/update-add-to-quicklaunch.sh rename to composer/set-quicklaunch.sh index 3d21a8e..691001a 100755 --- a/composer/update-add-to-quicklaunch.sh +++ b/composer/set-quicklaunch.sh @@ -25,4 +25,4 @@ do sleep 1 done -${qdbus} org.kde.plasmashell /PlasmaShell org.kde.PlasmaShell.evaluateScript "var launchers=\"${LAUNCHERS}\"; $(cat /composer/add-to-quicklaunch.js)" +${qdbus} org.kde.plasmashell /PlasmaShell org.kde.PlasmaShell.evaluateScript "var launchers=\"${LAUNCHERS}\"; $(cat /composer/set-quicklaunch.js)" From 9e2f38a9d706cf60c02baa4d6c069438c78e7b51 Mon Sep 17 00:00:00 2001 From: alexandredevely <12896316+alexandredevely@users.noreply.github.com> Date: Mon, 16 Mar 2026 17:49:01 +0100 Subject: [PATCH 26/28] rename update plasma launch --- composer/set-quicklaunch.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer/set-quicklaunch.sh b/composer/set-quicklaunch.sh index 691001a..acb84e1 100755 --- a/composer/set-quicklaunch.sh +++ b/composer/set-quicklaunch.sh @@ -1,7 +1,7 @@ #!/bin/bash # # this script add line "var launchers=\"${LAUNCHERS}\"; to add-to-quicklaunch.js and runs the javascript -# javascript add-to-quicklaunch update the launcher ison for plasmashell without restarting it +# javascript set-quicklaunch update the launcher for plasmashell without restarting it # # From 039f675b4c91af8e31474e26974041f5486d15cd Mon Sep 17 00:00:00 2001 From: alexandredevely <12896316+alexandredevely@users.noreply.github.com> Date: Thu, 19 Mar 2026 17:18:48 +0100 Subject: [PATCH 27/28] add ABCDESKTOP_FORCE_OVERWRITE_PLASMA_CONFIG --- composer/docker-entrypoint.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/composer/docker-entrypoint.sh b/composer/docker-entrypoint.sh index 39e9901..4b108d9 100755 --- a/composer/docker-entrypoint.sh +++ b/composer/docker-entrypoint.sh @@ -121,6 +121,10 @@ for file in "${files[@]}"; do fi done +if [ ! -d ~/.config/plasma-workspace ] || [ ! -z "$ABCDESKTOP_FORCE_OVERWRITE_PLASMA_CONFIG" ]; then + cp -r -f /composer/.config/plasma-workspace ~/.config +fi + if [ ! -z "$PULSEAUDIO_COOKIE" ]; then echo 'create PULSEAUDIO_COOKIE' # create ~/.config/pulse if not exist From 697564d06198be6147e69985565cafc4df6d06ad Mon Sep 17 00:00:00 2001 From: alexandredevely <12896316+alexandredevely@users.noreply.github.com> Date: Thu, 19 Mar 2026 18:20:03 +0100 Subject: [PATCH 28/28] add ssh --- Dockerfile.ubuntu.sudo | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile.ubuntu.sudo b/Dockerfile.ubuntu.sudo index f765b96..72b6ce5 100644 --- a/Dockerfile.ubuntu.sudo +++ b/Dockerfile.ubuntu.sudo @@ -15,5 +15,5 @@ ENV TARGET_MODE=$TARGET_MODE # allow all users to run sudo commands # remove it if need # RUN /composer/unaccount.sh -RUN if [ "${TARGET_MODE}" != "hardening" ]; then apt-get update && apt-get reinstall -y --no-install-recommends sudo vim && apt-get clean && rm -rf /var/lib/apt/lists/*; fi +RUN if [ "${TARGET_MODE}" != "hardening" ]; then apt-get update && apt-get reinstall -y --no-install-recommends sudo vim ssh && apt-get clean && rm -rf /var/lib/apt/lists/*; fi