diff --git a/config/X11/Xsession.d/60virtualgl b/config/X11/Xsession.d/60virtualgl index 4d57e1e..32e674c 100644 --- a/config/X11/Xsession.d/60virtualgl +++ b/config/X11/Xsession.d/60virtualgl @@ -1,20 +1,15 @@ #!/bin/sh if [ -z "${VGL_DISPLAY-}" ]; then - # Use the dummy X server if it is enabled - if [ "${SERVICE_XORG_HEADLESS_ENABLED:?}" = '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:?}" + # 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 diff --git a/config/X11/xorg.conf.d/10-headless.conf b/config/X11/xorg.conf.d/10-headless.conf index f3172e1..bb80b2c 100644 --- a/config/X11/xorg.conf.d/10-headless.conf +++ b/config/X11/xorg.conf.d/10-headless.conf @@ -1,30 +1,20 @@ Section "Module" - Load "xorgxrdp" -EndSection - -Section "ServerLayout" - Identifier "ServerLayout0" - Screen "Screen0" + Disable "glx" EndSection Section "ServerFlags" Option "DefaultServerLayout" "ServerLayout0" Option "DontVTSwitch" "on" + Option "PciForceNone" "on" Option "AutoAddDevices" "off" Option "AutoAddGPU" "off" EndSection -Section "Monitor" - Identifier "Monitor0" - VendorName "Unknown" - ModelName "Unknown" -EndSection - -Section "Device" - Identifier "Device0" - Driver "xrdpdev" - Option "DRMDevice" "/dev/dri/renderD128" - Option "DRI3" "1" +Section "ServerLayout" + Identifier "ServerLayout0" + Screen "Screen0" + InputDevice "Keyboard0" + InputDevice "Mouse0" EndSection Section "Screen" @@ -35,3 +25,26 @@ Section "Screen" Modes "800x600" EndSubSection 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