As requested here is a summary of openSUSE's usage of scripting facilities offered by gdm and xdm. Available scripting facilities in xdm and gdm ============================================= xdm gdm -------------------------------------------------------------------------------- Xsetup Init runs after starting X server, before the greeter PostLogin runs after authentication, before session setup (including pam_open_session) Xstartup PreSession runs after session has been initialized Xsession Xsession wraps the session, runs as the user logging in Xreset PostSession runs after session and X server have been terminated xdm scripting use in openSUSE ============================= Xsetup ------ * expected environment: DISPLAY the associated display name PATH the value of DisplayManager.DISPLAY.systemPath SHELL the value of DisplayManager.DISPLAY.systemShell XAUTHORITY may be set to an authority file * configures external display in case of laptops with XRANDR 1.2 available * starts xvkbd in case of tablet pcs * sets root window background * sets numlock status with numlockx * reads in Xresources * enables screensaver * sets keymap using XKB or Xmodmap Xstartup -------- * expected environment: DISPLAY the associated display name HOME the initial working directory of the user LOGNAME the user name USER the user name PATH the value of DisplayManager.DISPLAY.systemPath SHELL the value of DisplayManager.DISPLAY.systemShell XAUTHORITY may be set to an authority file WINDOWPATH may be set to the "window path" leading to the X server * kill xvkbd in case of tablet * check for /etc/nologin, show error and exit if it exists * enforces /etc/sysconfig/displaymanager $DISPLAYMANAGER_ROOT_LOGIN_REMOTE * if DISPLAY is local execute /etc/X11/xdm/GiveDevices * kill preload * registers session in utmp by exec sessreg Xsession -------- * arguments: session name, language * expected environment: DISPLAY the associated display name HOME the initial working directory of the user LOGNAME the user name USER the user name PATH the value of DisplayManager.DISPLAY.userPath SHELL the user's default shell (from getpwnam) XAUTHORITY may be set to a non-standard authority file KRB5CCNAME may be set to a Kerberos credentials cache name WINDOWPATH may be set to the "window path" leading to the X server * if $SHELL not in /etc/shells disallow login * redirect errors to user logfile * handle login manager arguments (session, language) * session * if default/custom, do nothing * if failsafe, execute xterm * else set WINDOWMANAGER * language * if given, set LANG, otherwise fall back to /etc/profile.d/lang.sh * if WINDOWMANAGER not set above, get system default from /etc/profile.d/profile.sh * source /etc/X11/xinit/xinitrc.common * choose WINDOWMANAGER again if not specified yet * start xim server if installed * apply numlock settings * load nvidia settings * load xbkmap or xmodmmap * merge Xresources * if WINDOWMANAGER was passed through xdm and /etc/X11/xdm/sys.xsession exists, execute it with $SHELL * otherwise check for ~/.session, ~/.xinitrc, /etc/X11/xdm/sys.xsession, /etc/X11/xinit/xinitrc, and execute it with $SHELL * /etc/X11/xdm/sys.xsession * starts gnome-keyring if exists * starts ssh-agent if exists * starts seahorse-agent if exists and WINDOWMANAGER is gnome, else start gpg-agent if exists * checks for ~/.xinitrc, /etc/X11/xinit/xinitrc and executes with bash (see below), otherwise source /etc/X11/xinit/xinitrc.common * see above * execute WINDOWMANAGER * /etc/X11/xinit/xinitrc * executes scripts in /etc/X11/xinit/xinitrc.d/ * sources /etc/X11/xinit/xinitrc.common * if WINDOWMANAGER is twm set root window background * executes WINDOWMANAGER * othwise fall back to failsafe session Xreset ------ * if DISPLAY is local execute /etc/X11/xdm/TakeDevices * kill Xconsole * execute sessreg in order to remove utmp entry gdm scripting use in openSUSE ============================= Init ---- runs Xsetup PostLogin --------- empty PreSession ---------- runs Xstartup Xsession -------- runs Xsession $1 $GDM_LANG PostSession ----------- runs Xreset