--- xinit.orig/files/xdm.confd-2 +++ xinit/files/xdm.confd-2 @@ -10,4 +10,15 @@ CHECKVT=7 # KDE-specific note: kdm is for the users of -kdeprefix and the kdm-4.3 is specified for # users of kdeprefix, where they can find possible versions by looking at the directories # in /usr/kde/. Users of KDE 3 should use kdm-3.5. +# NOTE (2): If you want to use your custom DISPLAYMANAGER, you can specify a +# full path to an executable. DISPLAYMANAGER="xdm" + +# If you specify a custom DISPLAYMANAGER value (one unsupported) +# you can also specify a custom pidfile that your application is +# supposed to use and that will be handled by start-stop-daemon +# to properly start/restart/stop it. +# If you don't specify any value and use an unsupported DISPLAYMANAGER +# CUSTOM_DISPLAYMANAGER_PIDFILE will be placed into +# /var/run/.pid +# CUSTOM_DISPLAYMANAGER_PIDFILE="" --- xinit.orig/files/xdm.initd-4 +++ xinit/files/xdm.initd-4 @@ -56,12 +56,18 @@ depend() { setup_dm() { local MY_XDM="$(echo "${DISPLAYMANAGER}" | tr '[:upper:]' '[:lower:]')" + local MY_CUSTOM_PIDFILE="$(echo "${CUSTOM_DISPLAYMANAGER_PIDFILE}" | tr '[:upper:]' '[:lower:]')" + MY_CUSTOM_PIDFILE="${MY_CUSTOM_PIDFILE:-/var/run/$(basename ${MY_XDM}).pid}" # Load our root path from profile.env # Needed for kdm PATH="${PATH}:$(. /etc/profile.env; echo "${ROOTPATH}")" case "${MY_XDM}" in + xdm) + EXE=/usr/bin/xdm + PIDFILE=/var/run/xdm.pid + ;; kdm|kde) EXE="$(which kdm)" PIDFILE=/var/run/kdm.pid @@ -88,14 +94,9 @@ setup_dm() { PIDFILE=/var/run/gpe-dm.pid ;; *) - EXE= - # Fix #65586, where MY_XDM is empty so EXE=somedir - [ -x "/usr/bin/${MY_XDM}" ] && [ -f "/usr/bin/${MY_XDM}" ] \ - && EXE="/usr/bin/${MY_XDM}" - if [ -z "${EXE}" ] ; then - EXE=/usr/bin/xdm - PIDFILE=/var/run/xdm.pid - fi + if [ -x "${MY_XDM}" ] && [ -f "${MY_XDM}" ]; then + EXE="${MY_XDM}" + PIDFILE="${MY_CUSTOM_PIDFILE}" ;; esac