Skip to content

xterm

circle_xterm.svg

inherite from

abcdesktopio/oc.template.alpine

Distribution

alpine alpine

NAME="Alpine Linux"
ID=alpine
VERSION_ID=3.17.1
PRETTY_NAME="Alpine Linux v3.17"
HOME_URL="https://alpinelinux.org/"
BUG_REPORT_URL="https://gitlab.alpinelinux.org/alpine/aports/-/issues"

Alpine packages

xterm sudo

Arguments

"-xrm 'XTerm*selectToClipboard:true'"

Displayname

Xterm (sudo)

Path

/usr/bin/xterm

ACL

{
    "permit": [
        "all"
    ]
}

WM_CLASS

xterm.XTerm

The WM_CLASS property (of type STRING without control characters) contains two consecutive null-terminated strings. These specify the Instance and Class names to be used by both the client and the window manager for looking up resources for the application or as identifying information. to get the WM_CLASS property of an application, use the command line wmctrl -lx

Desktopfile

/usr/share/applications/xterm.desktop

A .desktop file is a simple text file that holds information about a program. It is usually placed in “/usr/share/applications/”.

POST run command

POST run command are run after the package install comman

RUN echo "ALL ALL=(ALL:ALL) ALL">/etc/sudoers.d/all

JSON dump

json source file xterm.d.3.0.json

{
    "acl": {
        "permit": [
            "all"
        ]
    },
    "cat": "development",
    "icon": "circle_xterm.svg",
    "apkpackage": "xterm sudo",
    "keyword": "xterm,shell,cmd",
    "launch": "xterm.XTerm",
    "name": "xterm",
    "displayname": "Xterm (sudo)",
    "path": "/usr/bin/xterm",
    "rules": {
        "homedir": {
            "default": true
        }
    },
    "template": "abcdesktopio/oc.template.alpine",
    "desktopfile": "/usr/share/applications/xterm.desktop",
    "args": "-xrm 'XTerm*selectToClipboard:true'",
    "postruncommands": [
        "RUN echo \"ALL ALL=(ALL:ALL) ALL\">/etc/sudoers.d/all"
    ],
    "quick": true
}

Install the builded image

Replace the ABCHOST var set to localhost by default to your own server ip address

ABCHOST=localhost
curl --output xterm.d.3.0.json https://raw.githubusercontent.com/abcdesktopio/oc.apps/main/xterm.d.3.0.json
curl -X PUT -H 'Content-Type: text/javascript' http://$ABCHOST:30443/API/manager/image -d @xterm.d.3.0.json

Generated DockerFile source code

# Dynamic DockerFile application file for abcdesktopio generated by abcdesktopio/oc.apps/make.js
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
ARG TAG=dev
FROM abcdesktopio/oc.template.alpine:$TAG
USER root
RUN apk add --no-cache --update xterm sudo
LABEL oc.icon="circle_xterm.svg"
LABEL oc.icondata="PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyBpZD0iSXRlcm0iIHdpZHRoPSI2NCIgaGVpZ2h0PSI2NCIgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgMTAyNCAxMDI0IiBpbWFnZS1yZW5kZXJpbmc9Im9wdGltaXplU3BlZWQiIHZlcnNpb249IjEuMSIgdmlld0JveD0iMCAwIDY0IDY0IiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOmNjPSJodHRwOi8vY3JlYXRpdmVjb21tb25zLm9yZy9ucyMiIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyIgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+CiA8bWV0YWRhdGE+CiAgPHJkZjpSREY+CiAgIDxjYzpXb3JrIHJkZjphYm91dD0iIj4KICAgIDxkYzpmb3JtYXQ+aW1hZ2Uvc3ZnK3htbDwvZGM6Zm9ybWF0PgogICAgPGRjOnR5cGUgcmRmOnJlc291cmNlPSJodHRwOi8vcHVybC5vcmcvZGMvZGNtaXR5cGUvU3RpbGxJbWFnZSIvPgogICAgPGRjOnRpdGxlLz4KICAgPC9jYzpXb3JrPgogIDwvcmRmOlJERj4KIDwvbWV0YWRhdGE+CiA8ZGVmcz4KICA8ZmlsdGVyIGlkPSJlIiB4PSItLjA0MjY1MSIgeT0iLS4wMzEx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xNTk2IDAgMC41ODQwNy0wLjExMTcxIDAuODA3NDUtMC4zMzUxMWwzLjg2MTctMy44NjVjMC44MTA2NC0wLjgwNzQ1IDAuODEwNjQtMS42MTgyIDAtMi40Mjg4bC0zLjg2NS0zLjg2NDhjLTAuMjIxMjgtMC4yMjEyNy0wLjQ4ODIyLTAuMzMxOTktMC44MDEtMC4zMzE5OXoiIGZpbGw9InVybCgjbGluZWFyR3JhZGllbnQ4NjYpIi8+CiA8cmVjdCB0cmFuc2Zvcm09InJvdGF0ZSg5MCkiIHg9IjM5IiB5PSItNDUuMjU1IiB3aWR0aD0iMi41NTMyIiBoZWlnaHQ9IjI0LjI1NSIgcng9IjEuMjc2NiIgZmlsbD0idXJsKCNsaW5lYXJHcmFkaWVudDg2OCkiIHN0eWxlPSJwYWludC1vcmRlcjpzdHJva2UgbWFya2VycyBmaWxsIi8+Cjwvc3ZnPgo="
LABEL oc.keyword="xterm,xterm,shell,cmd"
LABEL oc.cat="development"
LABEL oc.desktopfile="xterm.desktop"
LABEL oc.launch="xterm.XTerm"
LABEL oc.template="abcdesktopio/oc.template.alpine"
ENV ARGS="-xrm 'XTerm*selectToClipboard:true'"
LABEL oc.name="xterm"
LABEL oc.displayname="Xterm (sudo)"
LABEL oc.path="/usr/bin/xterm"
LABEL oc.type=app
LABEL oc.rules="{\"homedir\":{\"default\":true}}"
LABEL oc.acl="{\"permit\":[\"all\"]}"
RUN for d in /usr/share/icons /usr/share/pixmaps ; do echo "testing link in $d"; if [ -d $d ] && [ -x /composer/safelinks.sh ] ; then echo "fixing link in $d"; cd $d ; /composer/safelinks.sh ; fi; done
ENV APPNAME "xterm"
ENV APPBIN "/usr/bin/xterm"
LABEL oc.args="-xrm 'XTerm*selectToClipboard:true'"
ENV APP "/usr/bin/xterm"
RUN echo "ALL ALL=(ALL:ALL) ALL">/etc/sudoers.d/all
USER root
RUN mkdir -p /var/secrets/abcdesktop/localaccount
RUN for f in passwd shadow group gshadow ; do if [ -f /etc/$f ] ; then  cp /etc/$f /var/secrets/abcdesktop/localaccount; rm -f /etc/$f; ln -s /var/secrets/abcdesktop/localaccount/$f /etc/$f; fi; done
USER balloon
CMD [ "/composer/appli-docker-entrypoint.sh" ]

Rebuild the image manually

Download the Dockerfile manually

Dockerfile for application xterm

wget https://raw.githubusercontent.com/abcdesktopio/oc.apps/main/xterm.d

build the Dockerfile to create a container image

docker build --build-arg TAG=3.0 -f xterm.d -t xterm .

Install the new image

If you are using containerd as container runtime, use the ctr command line

If you are not running this bash command on your abcdesktop node Replace the ABCHOST variable set to localhost by default to your own server ip address

ABCHOST=localhost
docker inspect xterm > xterm.json
docker image save xterm -o xterm.tar
ctr -n k8s.io images import xterm.tar
curl -X PUT -H 'Content-Type: text/javascript' http://$ABCHOST:30443/API/manager/image -d @xterm.json