Refactor startup to not require files in /etc/skel/

This commit is contained in:
Héctor Molinero Fernández
2023-03-01 22:47:33 +01:00
parent 9cf354ff56
commit 9ddf1cdec5
6 changed files with 22 additions and 40 deletions

View 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

View File

@@ -1,3 +0,0 @@
#!/bin/sh
exec xfce4-session

View File

@@ -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