Refactor startup to not require files in /etc/skel/
This commit is contained in:
@@ -426,6 +426,8 @@ ENV UNPRIVILEGED_USER_SHELL=/bin/bash
|
|||||||
ENV XRDP_TLS_KEY_PATH=/etc/xrdp/key.pem
|
ENV XRDP_TLS_KEY_PATH=/etc/xrdp/key.pem
|
||||||
ENV XRDP_TLS_CRT_PATH=/etc/xrdp/cert.pem
|
ENV XRDP_TLS_CRT_PATH=/etc/xrdp/cert.pem
|
||||||
ENV ENABLE_XDUMMY=false
|
ENV ENABLE_XDUMMY=false
|
||||||
|
ENV STARTUP=xfce4-session
|
||||||
|
ENV DESKTOP_SESSION=xubuntu
|
||||||
## Use Adwaita theme in QT applications
|
## Use Adwaita theme in QT applications
|
||||||
ENV QT_STYLE_OVERRIDE=Adwaita
|
ENV QT_STYLE_OVERRIDE=Adwaita
|
||||||
|
|
||||||
@@ -491,11 +493,6 @@ COPY --chown=root:root ./config/pulse/ /etc/pulse/
|
|||||||
RUN find /etc/pulse/ -type d -not -perm 0755 -exec chmod 0755 '{}' ';'
|
RUN find /etc/pulse/ -type d -not -perm 0755 -exec chmod 0755 '{}' ';'
|
||||||
RUN find /etc/pulse/ -type f -not -perm 0644 -exec chmod 0644 '{}' ';'
|
RUN find /etc/pulse/ -type f -not -perm 0644 -exec chmod 0644 '{}' ';'
|
||||||
|
|
||||||
# Copy skeleton files
|
|
||||||
COPY --chown=root:root ./config/skel/ /etc/skel/
|
|
||||||
RUN find /etc/skel/ -type d -not -perm 0755 -exec chmod 0755 '{}' ';'
|
|
||||||
RUN find /etc/skel/ -type f -not -perm 0644 -exec chmod 0644 '{}' ';'
|
|
||||||
|
|
||||||
# Copy scripts
|
# Copy scripts
|
||||||
COPY --chown=root:root ./scripts/bin/ /usr/local/bin/
|
COPY --chown=root:root ./scripts/bin/ /usr/local/bin/
|
||||||
RUN find /usr/local/bin/ -type d -not -perm 0755 -exec chmod 0755 '{}' ';'
|
RUN find /usr/local/bin/ -type d -not -perm 0755 -exec chmod 0755 '{}' ';'
|
||||||
|
|||||||
20
config/X11/Xsession.d/60virtualgl
Normal file
20
config/X11/Xsession.d/60virtualgl
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
if [ -z "${VGL_DISPLAY-}" ]; then
|
||||||
|
# Use the dummy X server if it is enabled
|
||||||
|
if [ "${ENABLE_XDUMMY:?}" = 'true' ]; then
|
||||||
|
export VGL_DISPLAY=:0.0
|
||||||
|
else
|
||||||
|
# Otherwise try to use the EGL backend
|
||||||
|
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
|
||||||
|
fi
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
exec xfce4-session
|
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
export XDG_CACHE_HOME="${HOME:?}"/.cache
|
|
||||||
export XDG_CONFIG_DIRS=/etc/xdg/xdg-xubuntu:/etc/xdg
|
|
||||||
export XDG_CONFIG_HOME="${HOME:?}"/.config
|
|
||||||
export XDG_CURRENT_DESKTOP=XFCE
|
|
||||||
export XDG_DATA_DIRS=/usr/share/xubuntu:/usr/share/xfce4:/usr/local/share:/usr/share
|
|
||||||
export XDG_DATA_HOME="${HOME:?}"/.local/share
|
|
||||||
export XDG_MENU_PREFIX=xfce-
|
|
||||||
export XDG_RUNTIME_DIR=/run/user/"${UNPRIVILEGED_USER_UID:?}"
|
|
||||||
export XDG_SESSION_DESKTOP=xubuntu
|
|
||||||
export XDG_SESSION_TYPE=x11
|
|
||||||
|
|
||||||
if [ -z "${VGL_DISPLAY-}" ] && [ -n "${DISPLAY-}" ]; then
|
|
||||||
export VGL_DISPLAY="${DISPLAY:?}"
|
|
||||||
fi
|
|
||||||
@@ -81,22 +81,6 @@ if [ "${ENABLE_XDUMMY:?}" = 'true' ]; then
|
|||||||
ln -s /etc/sv/xdummy /etc/service/
|
ln -s /etc/sv/xdummy /etc/service/
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Define VGL_DISPLAY variable if it is not set
|
|
||||||
if [ -z "${VGL_DISPLAY-}" ]; then
|
|
||||||
# Use the dummy X server if it is enabled
|
|
||||||
if [ "${ENABLE_XDUMMY:?}" = 'true' ]; then
|
|
||||||
export VGL_DISPLAY=:0.0
|
|
||||||
# Otherwise try to use the EGL backend
|
|
||||||
else
|
|
||||||
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
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Generate SSH keys if they do not exist
|
# Generate SSH keys if they do not exist
|
||||||
if [ ! -f /etc/ssh/ssh_host_ed25519_key ]; then
|
if [ ! -f /etc/ssh/ssh_host_ed25519_key ]; then
|
||||||
ssh-keygen -t ed25519 -f /etc/ssh/ssh_host_ed25519_key -N '' >/dev/null
|
ssh-keygen -t ed25519 -f /etc/ssh/ssh_host_ed25519_key -N '' >/dev/null
|
||||||
|
|||||||
Reference in New Issue
Block a user