-
-
Notifications
You must be signed in to change notification settings - Fork 318
Open
Description
Problem
On Oracle Linux and older kernels lacking the close_range syscall, XFCE session components (xfdesktop, xfwm4, xfce4-panel, xfsettingsd) fail to start. X server and Chromium work but desktop environment does not appear.
Root cause
- close_range syscall returns EPERM on older kernels
- XFCE components require D-Bus session bus
- LD_PRELOAD shim not inherited by XFCE session processes
Fix prompt
Fix XFCE startup on kernels without close_range syscall:
1. Create shim_close_range.c:
#define _GNU_SOURCE
#include <errno.h>
int close_range(unsigned int first, unsigned int last, int flags) {
errno = 38;
return -1;
}
2. In Dockerfile, compile shim and set system-wide:
RUN gcc -fPIC -shared shim_close_range.c -o /usr/local/lib/libshim_close_range.so
RUN echo 'LD_PRELOAD=/usr/local/lib/libshim_close_range.so' >> /etc/environment
3. In startup script, restart XFCE session with D-Bus:
pkill -u $USER xfce4-session || true
sudo -u $USER bash -c 'export LD_PRELOAD=/usr/local/lib/libshim_close_range.so; export DISPLAY=:1; eval $(dbus-launch --sh-syntax); xfce4-session &'
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
Issues