Dominique Leuenberger
b451a7ac96
- Add runtime option to start X under root instead of regular user. Necessary if no DRI drivers are present. (bnc#1075805) * gdm-add-runtime-option-to-disable-starting-X-server-as-u.patch * Updated X11-displaymanager-gdm to set the GDM_DISABLE_USER_DISPLAY_SERVER variable when needed. GDM can currently start X server both ways - as regular user or as root, unfortunately the only way to switch it is using a compilation option. We need to run X as root in some cases, but want to keep the increased security of running it under regular user in most cases. This patch adds the ability to switch it using environmental variable. OBS-URL: https://build.opensuse.org/request/show/573608 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/gdm?expand=0&rev=378
23 lines
683 B
Plaintext
23 lines
683 B
Plaintext
gdm_vars() {
|
|
case "${DISPLAYMANAGER##*/}" in
|
|
gdm|GDM|Gnome|GNOME)
|
|
RELOADSIGNAL="-USR1"
|
|
DISPLAYMANAGER=/usr/sbin/gdm
|
|
PIDFILE=/run/gdm/gdm.pid
|
|
|
|
# let gdm run the Xserver as root if access to /dev/fb*
|
|
# is required (bsc#1075805)
|
|
# The GDM_DISABLE_USER_DISPLAY_SERVER variable is added by patch
|
|
# gdm-add-runtime-option-to-disable-starting-X-server-as-u.patch
|
|
if [ ! -c /dev/dri/card0 -a \
|
|
! -c /dev/nvidiactl ]; then
|
|
export GDM_DISABLE_USER_DISPLAY_SERVER=1
|
|
fi
|
|
|
|
return 0 ;;
|
|
*) return 1 ;;
|
|
esac
|
|
|
|
return 1
|
|
}
|