Compare commits
10 Commits
f5bc5c507b
...
b11206ea40
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b11206ea40 | ||
|
|
208f30a208 | ||
|
|
933f557a3e | ||
|
|
4a45adaa58 | ||
|
|
558f1ec368 | ||
|
|
29799461a9 | ||
|
|
a0a0b44fdc | ||
|
|
cdbd8bdcec | ||
|
|
fad6c80479 | ||
|
|
bf90f2e2c9 |
66
.github/workflows/main.yml
vendored
66
.github/workflows/main.yml
vendored
@@ -19,7 +19,7 @@ jobs:
|
|||||||
contents: "read"
|
contents: "read"
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
arch: ["native", "amd64", "arm64v8"]
|
arch: ["arm64v8"]
|
||||||
steps:
|
steps:
|
||||||
- name: "Checkout project"
|
- name: "Checkout project"
|
||||||
uses: "actions/checkout@v4"
|
uses: "actions/checkout@v4"
|
||||||
@@ -47,7 +47,7 @@ jobs:
|
|||||||
contents: "read"
|
contents: "read"
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
arch: ["amd64", "arm64v8"]
|
arch: ["arm64v8"]
|
||||||
steps:
|
steps:
|
||||||
- name: "Checkout project"
|
- name: "Checkout project"
|
||||||
uses: "actions/checkout@v4"
|
uses: "actions/checkout@v4"
|
||||||
@@ -59,40 +59,38 @@ jobs:
|
|||||||
- name: "Login to Docker Hub"
|
- name: "Login to Docker Hub"
|
||||||
uses: "docker/login-action@v3"
|
uses: "docker/login-action@v3"
|
||||||
with:
|
with:
|
||||||
registry: "docker.io"
|
registry: "d.lilpenguins.com"
|
||||||
username: "${{ secrets.DOCKERHUB_USERNAME }}"
|
|
||||||
password: "${{ secrets.DOCKERHUB_TOKEN }}"
|
|
||||||
- name: "Load and push image"
|
- name: "Load and push image"
|
||||||
run: |
|
run: |
|
||||||
make "load-${{ matrix.arch }}-image" "push-${{ matrix.arch }}-image"
|
make "load-${{ matrix.arch }}-image" "push-${{ matrix.arch }}-image"
|
||||||
|
|
||||||
push-manifest:
|
# push-manifest:
|
||||||
name: "Push manifest"
|
# name: "Push manifest"
|
||||||
if: "startsWith(github.ref, 'refs/tags/v')"
|
# if: "startsWith(github.ref, 'refs/tags/v')"
|
||||||
needs: ["push"]
|
# needs: ["push"]
|
||||||
runs-on: "ubuntu-latest"
|
# runs-on: "ubuntu-latest"
|
||||||
permissions:
|
# permissions:
|
||||||
contents: "read"
|
# contents: "read"
|
||||||
steps:
|
# steps:
|
||||||
- name: "Checkout project"
|
# - name: "Checkout project"
|
||||||
uses: "actions/checkout@v4"
|
# uses: "actions/checkout@v4"
|
||||||
- name: "Login to Docker Hub"
|
# - name: "Login to Docker Hub"
|
||||||
uses: "docker/login-action@v3"
|
# uses: "docker/login-action@v3"
|
||||||
with:
|
# with:
|
||||||
registry: "docker.io"
|
# registry: "docker.io"
|
||||||
username: "${{ secrets.DOCKERHUB_USERNAME }}"
|
# username: "${{ secrets.DOCKERHUB_USERNAME }}"
|
||||||
password: "${{ secrets.DOCKERHUB_TOKEN }}"
|
# password: "${{ secrets.DOCKERHUB_TOKEN }}"
|
||||||
- name: "Push manifest"
|
# - name: "Push manifest"
|
||||||
run: |
|
# run: |
|
||||||
make push-cross-manifest
|
# make push-cross-manifest
|
||||||
|
|
||||||
publish-github-release:
|
# publish-github-release:
|
||||||
name: "Publish GitHub release"
|
# name: "Publish GitHub release"
|
||||||
if: "startsWith(github.ref, 'refs/tags/v')"
|
# if: "startsWith(github.ref, 'refs/tags/v')"
|
||||||
needs: ["push-manifest"]
|
# needs: ["push-manifest"]
|
||||||
runs-on: "ubuntu-latest"
|
# runs-on: "ubuntu-latest"
|
||||||
permissions:
|
# permissions:
|
||||||
contents: "write"
|
# contents: "write"
|
||||||
steps:
|
# steps:
|
||||||
- name: "Publish"
|
# - name: "Publish"
|
||||||
uses: "hectorm/ghaction-release@066200d04c3549852afa243d631ea3dc93390f68"
|
# uses: "hectorm/ghaction-release@066200d04c3549852afa243d631ea3dc93390f68"
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ m4_changequote([[, ]])
|
|||||||
## "build" stage
|
## "build" stage
|
||||||
##################################################
|
##################################################
|
||||||
|
|
||||||
m4_ifdef([[CROSS_ARCH]], [[FROM docker.io/CROSS_ARCH/ubuntu:24.04]], [[FROM docker.io/ubuntu:24.04]]) AS build
|
m4_ifdef([[CROSS_ARCH]], [[FROM dtcooper/raspberrypi-os:latest]], [[FROM dtcooper/raspberrypi-os:latest]]) AS build
|
||||||
|
|
||||||
SHELL ["/bin/sh", "-euc"]
|
SHELL ["/bin/sh", "-euc"]
|
||||||
|
|
||||||
@@ -31,6 +31,7 @@ RUN <<-EOF
|
|||||||
git \
|
git \
|
||||||
intltool \
|
intltool \
|
||||||
libbz2-dev \
|
libbz2-dev \
|
||||||
|
libdrm-dev \
|
||||||
libegl-dev \
|
libegl-dev \
|
||||||
libegl1-mesa-dev \
|
libegl1-mesa-dev \
|
||||||
libepoxy-dev \
|
libepoxy-dev \
|
||||||
@@ -73,6 +74,7 @@ RUN <<-EOF
|
|||||||
x11-xkb-utils \
|
x11-xkb-utils \
|
||||||
xauth \
|
xauth \
|
||||||
xkb-data \
|
xkb-data \
|
||||||
|
xserver-xorg-core \
|
||||||
xserver-xorg-dev \
|
xserver-xorg-dev \
|
||||||
xsltproc \
|
xsltproc \
|
||||||
xutils-dev \
|
xutils-dev \
|
||||||
@@ -154,7 +156,7 @@ RUN <<-EOF
|
|||||||
EOF
|
EOF
|
||||||
|
|
||||||
# Build xrdp
|
# Build xrdp
|
||||||
ARG XRDP_TREEISH=v0.10.2
|
ARG XRDP_TREEISH=v0.10.3
|
||||||
ARG XRDP_REMOTE=https://github.com/neutrinolabs/xrdp.git
|
ARG XRDP_REMOTE=https://github.com/neutrinolabs/xrdp.git
|
||||||
WORKDIR /tmp/xrdp/
|
WORKDIR /tmp/xrdp/
|
||||||
RUN <<-EOF
|
RUN <<-EOF
|
||||||
@@ -186,7 +188,7 @@ RUN <<-EOF
|
|||||||
EOF
|
EOF
|
||||||
|
|
||||||
# Build xorgxrdp
|
# Build xorgxrdp
|
||||||
ARG XORGXRDP_TREEISH=v0.10.3
|
ARG XORGXRDP_TREEISH=v0.10.4
|
||||||
ARG XORGXRDP_REMOTE=https://github.com/neutrinolabs/xorgxrdp.git
|
ARG XORGXRDP_REMOTE=https://github.com/neutrinolabs/xorgxrdp.git
|
||||||
WORKDIR /tmp/xorgxrdp/
|
WORKDIR /tmp/xorgxrdp/
|
||||||
RUN <<-EOF
|
RUN <<-EOF
|
||||||
@@ -205,7 +207,7 @@ RUN <<-EOF
|
|||||||
EOF
|
EOF
|
||||||
|
|
||||||
# Build xrdp PulseAudio module
|
# Build xrdp PulseAudio module
|
||||||
ARG XRDP_PULSEAUDIO_TREEISH=v0.7
|
ARG XRDP_PULSEAUDIO_TREEISH=v0.8
|
||||||
ARG XRDP_PULSEAUDIO_REMOTE=https://github.com/neutrinolabs/pulseaudio-module-xrdp.git
|
ARG XRDP_PULSEAUDIO_REMOTE=https://github.com/neutrinolabs/pulseaudio-module-xrdp.git
|
||||||
WORKDIR /tmp/
|
WORKDIR /tmp/
|
||||||
RUN <<-EOF
|
RUN <<-EOF
|
||||||
|
|||||||
@@ -1,20 +1,15 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
if [ -z "${VGL_DISPLAY-}" ]; then
|
if [ -z "${VGL_DISPLAY-}" ]; then
|
||||||
# Use the dummy X server if it is enabled
|
# Try to use the EGL backend
|
||||||
if [ "${SERVICE_XORG_HEADLESS_ENABLED:?}" = 'true' ]; then
|
for card in /dev/dri/card*; do
|
||||||
export VGL_DISPLAY=:0.0
|
if /opt/VirtualGL/bin/eglinfo -B "${card:?}" 2>/dev/null; then
|
||||||
else
|
export VGL_DISPLAY="${card:?}"
|
||||||
# Otherwise try to use the EGL backend
|
break
|
||||||
for card in /dev/dri/card*; do
|
|
||||||
if /opt/VirtualGL/bin/eglinfo -B "${card:?}" 2>/dev/null; then
|
|
||||||
export VGL_DISPLAY="${card:?}"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
# And fallback to DISPLAY if the EGL backend is not available
|
|
||||||
if [ -z "${VGL_DISPLAY-}" ] && [ -n "${DISPLAY-}" ]; then
|
|
||||||
export VGL_DISPLAY="${DISPLAY:?}"
|
|
||||||
fi
|
fi
|
||||||
|
done
|
||||||
|
# And fallback to DISPLAY if the EGL backend is not available
|
||||||
|
if [ -z "${VGL_DISPLAY-}" ] && [ -n "${DISPLAY-}" ]; then
|
||||||
|
export VGL_DISPLAY="${DISPLAY:?}"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -1,30 +1,20 @@
|
|||||||
Section "Module"
|
Section "Module"
|
||||||
Load "xorgxrdp"
|
Disable "glx"
|
||||||
EndSection
|
|
||||||
|
|
||||||
Section "ServerLayout"
|
|
||||||
Identifier "ServerLayout0"
|
|
||||||
Screen "Screen0"
|
|
||||||
EndSection
|
EndSection
|
||||||
|
|
||||||
Section "ServerFlags"
|
Section "ServerFlags"
|
||||||
Option "DefaultServerLayout" "ServerLayout0"
|
Option "DefaultServerLayout" "ServerLayout0"
|
||||||
Option "DontVTSwitch" "on"
|
Option "DontVTSwitch" "on"
|
||||||
|
Option "PciForceNone" "on"
|
||||||
Option "AutoAddDevices" "off"
|
Option "AutoAddDevices" "off"
|
||||||
Option "AutoAddGPU" "off"
|
Option "AutoAddGPU" "off"
|
||||||
EndSection
|
EndSection
|
||||||
|
|
||||||
Section "Monitor"
|
Section "ServerLayout"
|
||||||
Identifier "Monitor0"
|
Identifier "ServerLayout0"
|
||||||
VendorName "Unknown"
|
Screen "Screen0"
|
||||||
ModelName "Unknown"
|
InputDevice "Keyboard0"
|
||||||
EndSection
|
InputDevice "Mouse0"
|
||||||
|
|
||||||
Section "Device"
|
|
||||||
Identifier "Device0"
|
|
||||||
Driver "xrdpdev"
|
|
||||||
Option "DRMDevice" "/dev/dri/renderD128"
|
|
||||||
Option "DRI3" "1"
|
|
||||||
EndSection
|
EndSection
|
||||||
|
|
||||||
Section "Screen"
|
Section "Screen"
|
||||||
@@ -35,3 +25,26 @@ Section "Screen"
|
|||||||
Modes "800x600"
|
Modes "800x600"
|
||||||
EndSubSection
|
EndSubSection
|
||||||
EndSection
|
EndSection
|
||||||
|
|
||||||
|
Section "Monitor"
|
||||||
|
Identifier "Monitor0"
|
||||||
|
VendorName "Unknown"
|
||||||
|
ModelName "Unknown"
|
||||||
|
EndSection
|
||||||
|
|
||||||
|
Section "Device"
|
||||||
|
Identifier "Device0"
|
||||||
|
Driver "dummy"
|
||||||
|
EndSection
|
||||||
|
|
||||||
|
Section "InputDevice"
|
||||||
|
Identifier "Keyboard0"
|
||||||
|
Driver "void"
|
||||||
|
Option "CoreKeyboard" "true"
|
||||||
|
EndSection
|
||||||
|
|
||||||
|
Section "InputDevice"
|
||||||
|
Identifier "Mouse0"
|
||||||
|
Driver "void"
|
||||||
|
Option "CorePointer" "true"
|
||||||
|
EndSection
|
||||||
|
|||||||
@@ -67,13 +67,19 @@ if [ ! -d /run/user/"${UNPRIVILEGED_USER_UID:?}"/ ]; then
|
|||||||
chown "${UNPRIVILEGED_USER_NAME:?}:" /run/user/"${UNPRIVILEGED_USER_UID:?}"/
|
chown "${UNPRIVILEGED_USER_NAME:?}:" /run/user/"${UNPRIVILEGED_USER_UID:?}"/
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Disable glx module if /dev/dri/ does not exist
|
||||||
|
if [ ! -d /dev/dri/ ]; then
|
||||||
|
printf '%s\n' '"/dev/dri/" does not exist, glx module will be disabled' 1>&2
|
||||||
|
sed -i 's|Load \("glx"\)|Disable \1|g' /opt/xrdp/etc/X11/xrdp/xorg.conf
|
||||||
|
fi
|
||||||
|
|
||||||
# Enable xrdp bootstrap service
|
# Enable xrdp bootstrap service
|
||||||
if [ "${SERVICE_XRDP_BOOTSTRAP_ENABLED:?}" = 'true' ]; then
|
if [ "${SERVICE_XRDP_BOOTSTRAP_ENABLED:?}" = 'true' ] && [ ! -L "${SVDIR:?}"/xrdp-bootstrap ]; then
|
||||||
ln -s /etc/sv/xrdp-bootstrap "${SVDIR:?}"
|
ln -s /etc/sv/xrdp-bootstrap "${SVDIR:?}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Enable headless X server service
|
# Enable headless X server service
|
||||||
if [ "${SERVICE_XORG_HEADLESS_ENABLED:?}" = 'true' ]; then
|
if [ "${SERVICE_XORG_HEADLESS_ENABLED:?}" = 'true' ] && [ ! -L "${SVDIR:?}"/xorg-headless ]; then
|
||||||
ln -s /etc/sv/xorg-headless "${SVDIR:?}"
|
ln -s /etc/sv/xorg-headless "${SVDIR:?}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
20
wlfreerdp.sh
Executable file
20
wlfreerdp.sh
Executable file
@@ -0,0 +1,20 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
set -eu
|
||||||
|
export LC_ALL=C
|
||||||
|
|
||||||
|
RDP_HOST=127.0.0.1
|
||||||
|
RDP_PORT=3389
|
||||||
|
RDP_DOMAIN=Xorg
|
||||||
|
RDP_USER=user
|
||||||
|
RDP_PASSWORD=password
|
||||||
|
|
||||||
|
exec wlfreerdp3 \
|
||||||
|
/v:"${RDP_HOST:?}":"${RDP_PORT:?}" \
|
||||||
|
/u:"${RDP_DOMAIN:?}"\\"${RDP_USER:?}" /p:"${RDP_PASSWORD:?}" \
|
||||||
|
/log-level:INFO /cert:ignore \
|
||||||
|
/gfx:AVC444v2 /bpp:32 /dynamic-resolution \
|
||||||
|
/audio-mode:0 /sound:sys:pulse,rate:44100 \
|
||||||
|
/microphone:sys:pulse,rate:44100 \
|
||||||
|
+clipboard +home-drive \
|
||||||
|
-compression -encryption
|
||||||
Reference in New Issue
Block a user