Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
sshd start error message about xdm-setup
View unanswered posts
View posts from last 24 hours

Goto page 1, 2  Next  
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
figueroa
Advocate
Advocate


Joined: 14 Aug 2005
Posts: 2964
Location: Edge of marsh USA

PostPosted: Tue Mar 30, 2021 8:55 pm    Post subject: sshd start error message about xdm-setup Reply with quote

Upon upgrading openssh today to version 8.5_p1-r1 and restarting sshd for the first time, I got the following very interesting error message:
Code:
Service `xdm' needs non existent service `xdm-setup'

Restarting sshd a second time shows no errors.

My up-to-date amd64 desktop system is already using the new display-manager-init system. /etc/init.d/xdm still exists but is not in my startup. /etc/init.d/xdm-setup does not exist (The file does exist on my x86 system, though it does not use a display manager.).

On the amd64 system in question, xdm belongs to display-manager-init (head scratcher)
Code:
$ equery b /etc/init.d/xdm
 * Searching for /etc/init.d/xdm ...
gui-libs/display-manager-init-1.0-r3 (/etc/init.d/xdm)


On my x86 system that is not using any display manager, both of those files belong to xorg-server:
Code:
jeremiah /var/log/portage # equery b /etc/init.d/xdm-setup
 * Searching for /etc/init.d/xdm-setup ...
x11-base/xorg-server-1.20.10-r2 (/etc/init.d/xdm-setup)
jeremiah /var/log/portage # equery b /etc/init.d/xdm     
 * Searching for /etc/init.d/xdm ...
x11-base/xorg-server-1.20.10-r2 (/etc/init.d/xdm)


Maybe this reinforces why display-manager-init isn't yet stable.
_________________
Andy Figueroa
hp pavilion hpe h8-1260t/2AB5; spinning rust x3
i7-2600 @ 3.40GHz; 16 gb; Radeon HD 7570
amd64/23.0/split-usr/desktop (stable), OpenRC, -systemd -pulseaudio -uefi
Back to top
View user's profile Send private message
alamahant
Advocate
Advocate


Joined: 23 Mar 2019
Posts: 3879

PostPosted: Tue Mar 30, 2021 9:05 pm    Post subject: Reply with quote

I have the same error when starting libvirtd.
It is more of a warning I think rather than an error.
This is where xdm is referred to in /etc/init.d
Code:

grep -r xdm /etc/init.d
/etc/init.d/elogind:   # Make sure elogind is up before xdm starts any dm
/etc/init.d/elogind:   before xdm
/etc/init.d/display-manager:# Any Display manager (gdm,kdm,xdm) has the following problem:  if
/etc/init.d/display-manager:      lxdm)
/etc/init.d/display-manager:         EXE=/usr/sbin/lxdm-binary
/etc/init.d/display-manager:         PIDFILE=/run/lxdm.pid
/etc/init.d/display-manager:      EXE=/usr/bin/xdm
/etc/init.d/display-manager:      PIDFILE=/run/xdm.pid
/etc/init.d/display-manager:      if ! [ -x "/usr/bin/xdm" ]; then
/etc/init.d/display-manager:         echo "ERROR: Please set your DISPLAYMANAGER variable in /etc/conf.d/xdm,"
/etc/init.d/display-manager:         echo "   or install x11-apps/xdm package"
/etc/init.d/xdm:# Any Display manager (gdm,kdm,xdm) has the following problem:  if
/etc/init.d/xdm:# startDM.sh when "xdm" is not added to the default runlevel, as was
/etc/init.d/xdm:   need localmount xdm-setup
/etc/init.d/xdm:      lxdm)
/etc/init.d/xdm:         EXE=/usr/sbin/lxdm-binary
/etc/init.d/xdm:         PIDFILE=/run/lxdm.pid
/etc/init.d/xdm:      EXE=/usr/bin/xdm
/etc/init.d/xdm:      PIDFILE=/run/xdm.pid
/etc/init.d/xdm:      if ! [ -x "/usr/bin/xdm" ]; then
/etc/init.d/xdm:         echo "ERROR: Please set your DISPLAYMANAGER variable in /etc/conf.d/xdm,"
/etc/init.d/xdm:         echo "   or install x11-apps/xdm package"
/etc/init.d/xdm:   if [ -f /etc/.noxdm ]; then
/etc/init.d/xdm:      einfo "Skipping ${EXE##*/}, /etc/.noxdm found or \"nox\" bootparam passed."
/etc/init.d/xdm:      rm /etc/.noxdm


and for "display"
Code:

grep -r display /etc/init.d
/etc/init.d/udev-trigger:display_hotplugged_services() {
/etc/init.d/udev-trigger:   display_hotplugged_services
/etc/init.d/keymaps:      # Fix some fonts displaying the Euro, #173528.
/etc/init.d/display-manager:# startDM when "display-manager" is not added to the default
/etc/init.d/display-manager:   need localmount display-manager-setup
/etc/init.d/display-manager:   # (#70689 comment #92) Start after consolefont to avoid display corruption
/etc/init.d/xdm:   # (#70689 comment #92) Start after consolefont to avoid display corruption


_________________
:)


Last edited by alamahant on Tue Mar 30, 2021 9:22 pm; edited 1 time in total
Back to top
View user's profile Send private message
asturm
Developer
Developer


Joined: 05 Apr 2007
Posts: 8936

PostPosted: Tue Mar 30, 2021 9:16 pm    Post subject: Re: sshd start error message about xdm-setup Reply with quote

figueroa wrote:
Upon upgrading openssh today to version 8.5_p1-r1 and restarting sshd for the first time, I got the following very interesting error message:
Code:
Service `xdm' needs non existent service `xdm-setup'

Show the content of your /etc/init.d/xdm.

If it does not look like the following, then you did not let etc-update run its course:
Code:
#!/sbin/openrc-run
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License, v2

depend() {
        need display-manager
}

start() {
        return
}

# vim: set ts=4 :
Back to top
View user's profile Send private message
figueroa
Advocate
Advocate


Joined: 14 Aug 2005
Posts: 2964
Location: Edge of marsh USA

PostPosted: Tue Mar 30, 2021 11:50 pm    Post subject: Re: sshd start error message about xdm-setup Reply with quote

asturm wrote:
figueroa wrote:
Upon upgrading openssh today to version 8.5_p1-r1 and restarting sshd for the first time, I got the following very interesting error message:
Code:
Service `xdm' needs non existent service `xdm-setup'

Show the content of your /etc/init.d/xdm.

If it does not look like the following, then you did not let etc-update run its course:
Code:
#!/sbin/openrc-run
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License, v2

depend() {
        need display-manager
}

start() {
        return
}

# vim: set ts=4 :


It looks like:
Code:
$ cat /etc/init.d/xdm
#!/sbin/openrc-run
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License, v2

# This is here to serve as a note to myself, and future developers.
#
# Any Display manager (gdm,kdm,xdm) has the following problem:  if
# it is started before any getty, and no vt is specified, it will
# usually run on vt2.  When the getty on vt2 then starts, and the
# DM is already started, the getty will take control of the keyboard,
# leaving us with a "dead" keyboard.
#
# Resolution: add the following line to /etc/inittab
#
#  x:a:once:/etc/X11/startDM.sh
#
# and have /etc/X11/startDM.sh start the DM in daemon mode if
# a lock is present (with the info of what DM should be started),
# else just fall through.
#
# How this basically works, is the "a" runlevel is a additional
# runlevel that you can use to fork processes with init, but the
# runlevel never gets changed to this runlevel.  Along with the "a"
# runlevel, the "once" key word means that startDM.sh will only be
# run when we specify it to run, thus eliminating respawning
# startDM.sh when "xdm" is not added to the default runlevel, as was
# done previously.
#
# This script then just calls "telinit a", and init will run
# /etc/X11/startDM.sh after the current runlevel completes (this
# script should only be added to the actual runlevel the user is
# using).
#
# Martin Schlemmer
# aka Azarah
# 04 March 2002

depend() {
   need localmount xdm-setup

   # this should start as early as possible
   # we can't do 'before *' as that breaks it
   # (#139824) Start after ypbind and autofs for network authentication
   # (#145219 #180163) Could use lirc mouse as input device
   # (#70689 comment #92) Start after consolefont to avoid display corruption
   # (#291269) Start after quota, since some dm need readable home
   # (#390609) gdm-3 will fail when dbus is not running
   # (#366753) starting keymaps after X causes problems
   after bootmisc consolefont modules netmount
   after readahead-list ypbind autofs openvpn gpm lircmd
   after quota keymaps
   before alsasound

   # Start before X
   use consolekit dbus xfs
}

setup_dm() {
   local MY_XDM
   
   MY_XDM=$(echo "${DISPLAYMANAGER}" | tr '[:upper:]' '[:lower:]')

   # Load our root path from profile.env
   # Needed for kdm
   PATH=${PATH}:$(. /etc/profile.env; echo "${ROOTPATH}")

   NAME=
   case "${MY_XDM}" in
      kdm|kde)
         EXE=/usr/bin/kdm
         PIDFILE=/run/kdm.pid
         ;;
      entrance*)
         EXE=/usr/sbin/entrance
         PIDFILE=/run/entrance.pid
         ;;
      gdm|gnome)
         # gdm-3 and above has different paths
         if [ -f /usr/sbin/gdm ]; then
            EXE=/usr/sbin/gdm
            PIDFILE=/run/gdm/gdm.pid
            START_STOP_ARGS="--background"
            AUTOCLEAN_CGROUP="yes"
         else
            EXE=/usr/bin/gdm
            PIDFILE=/run/gdm.pid
         fi
         [ "${RC_UNAME}" != "Linux" ] && NAME=gdm-binary
         ;;
      wdm)
         EXE=/usr/bin/wdm
         PIDFILE=
         ;;
      gpe)
         EXE=/usr/bin/gpe-dm
         PIDFILE=/run/gpe-dm.pid
         ;;
      lxdm)
         EXE=/usr/sbin/lxdm-binary
         PIDFILE=/run/lxdm.pid
         START_STOP_ARGS="--background"
         ;;
      lightdm)
         EXE=/usr/sbin/lightdm
         PIDFILE=/run/lightdm.pid
         START_STOP_ARGS="--background"
         ;;
      sddm)
         EXE="/usr/bin/sddm"
         START_STOP_ARGS="-m --background"
         PIDFILE=/run/sddm.pid
         ;;
      *)
         # first find out if there is such executable
         EXE="$(command -v ${MY_XDM} 2>/dev/null)"
         PIDFILE="/run/${MY_XDM}.pid"

         # warn user that he is doing sick things if the exe was not found
         if [ -z "${EXE}" ]; then
            echo "ERROR: Your XDM value is invalid."
            echo "  No ${MY_XDM} executable could be found on your system."
         fi
         ;;
   esac

   if ! [ -x "${EXE}" ]; then
      EXE=/usr/bin/xdm
      PIDFILE=/run/xdm.pid
      if ! [ -x "/usr/bin/xdm" ]; then
         echo "ERROR: Please set your DISPLAYMANAGER variable in /etc/conf.d/xdm,"
         echo "   or install x11-apps/xdm package"
         eend 255
      fi
   fi
}

# Check to see if something is defined on our VT
vtstatic() {
   if [ -e /etc/inittab ] ; then
      grep -Eq "^[^#]+.*\<tty$1\>" /etc/inittab
   elif [ -e /etc/ttys ] ; then
      grep -q "^ttyv$(($1 - 1))" /etc/ttys
   else
      return 1
   fi
}

start() {
   local EXE NAME PIDFILE AUTOCLEAN_CGROUP
   setup_dm

   if [ -f /etc/.noxdm ]; then
      einfo "Skipping ${EXE##*/}, /etc/.noxdm found or \"nox\" bootparam passed."
      rm /etc/.noxdm
      return 0
   fi

   ebegin "Setting up ${EXE##*/}"

   # save the prefered DM
   save_options "service" "${EXE}"
   save_options "name"    "${NAME}"
   save_options "pidfile" "${PIDFILE}"
   save_options "start_stop_args" "${START_STOP_ARGS}"
   save_options "autoclean_cgroup" "${AUTOCLEAN_CGROUP:-no}"

   if [ -n "${CHECKVT-y}" ] ; then
      if vtstatic "${CHECKVT:-7}" ; then
         if [ -x /sbin/telinit ] && [ "${SOFTLEVEL}" != "BOOT" ] && [ "${RC_SOFTLEVEL}" != "BOOT" ]; then
            ewarn "Something is already defined on VT ${CHECKVT:-7}, will start X later"
            telinit a >/dev/null 2>&1
            return 0
         else
            eerror "Something is already defined on VT ${CHECKVT:-7}, not starting"
            return 1
         fi
      fi
   fi

   /etc/X11/startDM.sh
   eend 0
}

stop() {
   local curvt retval

   retval=0
   if [ -t 0 ]; then
      if type fgconsole >/dev/null 2>&1; then
         curvt=$(fgconsole 2>/dev/null)
      else
         curvt=$(tty)
         case "${curvt}" in
            /dev/ttyv[0-9]*) curvt=${curvt#/dev/ttyv} ;;
            *) curvt= ;;
         esac
      fi
   fi
   local myexe myname mypidfile myservice
   myexe=$(get_options "service")
   myname=$(get_options "name")
   mypidfile=$(get_options "pidfile")
   myservice=${myexe##*/}
   yesno "${rc_cgroup_cleanup:-no}" || rc_cgroup_cleanup=$(get_options "autoclean_cgroup")

   [ -z "${myexe}" ] && return 0

   ebegin "Stopping ${myservice}"

   if start-stop-daemon --quiet --test --stop --exec "${myexe}" 2>/dev/null; then
      start-stop-daemon --stop --exec "${myexe}" --retry TERM/5/TERM/5 \
         ${mypidfile:+--pidfile} ${mypidfile} \
         ${myname:+--name} ${myname}
      retval=${?}
   fi

   # switch back to original vt
   if [ -n "${curvt}" ]; then
      if type chvt >/dev/null 2>&1; then
         chvt "${curvt}"
      else
         vidcontrol -s "$((curvt + 1))"
      fi
   fi

   eend ${retval} "Error stopping ${myservice}"
   return ${retval}
}

# vim: set ts=4 :


In practice, I don't run etc-update, but dispatch-conf. Everything is up to date:
Code:
$ sudo etc-update
Password:
Scanning Configuration files...
Exiting: Nothing left to do; exiting. :)

_________________
Andy Figueroa
hp pavilion hpe h8-1260t/2AB5; spinning rust x3
i7-2600 @ 3.40GHz; 16 gb; Radeon HD 7570
amd64/23.0/split-usr/desktop (stable), OpenRC, -systemd -pulseaudio -uefi
Back to top
View user's profile Send private message
asturm
Developer
Developer


Joined: 05 Apr 2007
Posts: 8936

PostPosted: Wed Mar 31, 2021 8:23 am    Post subject: Reply with quote

What if you re-emerge display-manager-init? I'm curious because you also reported (iirc) that it did not migrate your DISPLAYMANAGER setting, which indicates that you had dismissed the updates (or something else went wrong with dispatch-conf).
Back to top
View user's profile Send private message
figueroa
Advocate
Advocate


Joined: 14 Aug 2005
Posts: 2964
Location: Edge of marsh USA

PostPosted: Wed Mar 31, 2021 3:52 pm    Post subject: Reply with quote

asturm wrote:
What if you re-emerge display-manager-init? I'm curious because you also reported (iirc) that it did not migrate your DISPLAYMANAGER setting, which indicates that you had dismissed the updates (or something else went wrong with dispatch-conf).

As suggested, I re-emerged display-manager-init. Doing so did not touch /etc/init.d/xdm. There wasn't anything for dispatch-conf or etc-update to do.

Restarting sshd again this morning does complain as follows:
Code:
# /etc/init.d/sshd restart
 * Caching service dependencies ...
Service `xdm' needs non existent service `xdm-setup'                      [ ok ]
 * Stopping sshd ...                                                      [ ok ]
 * Starting sshd ...                                                      [ ok ]

_________________
Andy Figueroa
hp pavilion hpe h8-1260t/2AB5; spinning rust x3
i7-2600 @ 3.40GHz; 16 gb; Radeon HD 7570
amd64/23.0/split-usr/desktop (stable), OpenRC, -systemd -pulseaudio -uefi
Back to top
View user's profile Send private message
asturm
Developer
Developer


Joined: 05 Apr 2007
Posts: 8936

PostPosted: Thu Apr 01, 2021 5:39 pm    Post subject: Reply with quote

Sorry, but I don't see how that is possible.

I simulated the existence of an outdated xdm initd:
Code:
# cp x11-base/xorg-server/files/xdm.initd-11 /etc/init.d/xdm
# cat /etc/init.d/xdm
#!/sbin/openrc-run
# Copyright 1999-2019 Gentoo Authors

...

Then re-emerged display-manager-init:
Code:
# emerge -1v display-manager-init

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R    ] gui-libs/display-manager-init-1.0-r3::gentoo  0 KiB

...
 * IMPORTANT: config file '/etc/init.d/xdm' needs updating.
 * See the CONFIGURATION FILES and CONFIGURATION FILES UPDATE TOOLS
 * sections of the emerge man page to learn how to update config files.

^ there it is again.

display-manager-init installs its own xdm initd replacement, unconditionally, every time.
Back to top
View user's profile Send private message
figueroa
Advocate
Advocate


Joined: 14 Aug 2005
Posts: 2964
Location: Edge of marsh USA

PostPosted: Thu Apr 01, 2021 7:30 pm    Post subject: Reply with quote

It's possible. I repeated the process just now:
Code:
# emerge -1pv display-manager-init

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R   ~] gui-libs/display-manager-init-1.0-r3::gentoo  0 KiB

Total: 1 package (1 reinstall), Size of downloads: 0 KiB


Then pull the trigger on it removing the -p from the command line.

Code:
# emerge -1v display-manager-init

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R   ~] gui-libs/display-manager-init-1.0-r3::gentoo  0 KiB

Total: 1 package (1 reinstall), Size of downloads: 0 KiB


>>> Verifying ebuild manifests

>>> Emerging (1 of 1) gui-libs/display-manager-init-1.0-r3::gentoo
>>> Unpacking source...
>>> Source unpacked in /var/tmp/portage/gui-libs/display-manager-init-1.0-r3/work
>>> Preparing source in /var/tmp/portage/gui-libs/display-manager-init-1.0-r3/work ...
>>> Source prepared.
>>> Configuring source in /var/tmp/portage/gui-libs/display-manager-init-1.0-r3/work ...
>>> Source configured.
>>> Compiling source in /var/tmp/portage/gui-libs/display-manager-init-1.0-r3/work ...
>>> Source compiled.
>>> Test phase [not enabled]: gui-libs/display-manager-init-1.0-r3

>>> Install gui-libs/display-manager-init-1.0-r3 into /var/tmp/portage/gui-libs/display-manager-init-1.0-r3/image
>>> Completed installing gui-libs/display-manager-init-1.0-r3 into /var/tmp/portage/gui-libs/display-manager-init-1.0-r3/image

 * Final size of build directory:  4 KiB
 * Final size of installed tree:  52 KiB


>>> Installing (1 of 1) gui-libs/display-manager-init-1.0-r3::gentoo
 * checking 6 files for package collisions
>>> Merging gui-libs/display-manager-init-1.0-r3 to /
--- /usr/
--- /usr/bin/
>>> /usr/bin/startDM
--- /etc/
--- /etc/X11/
>>> /etc/X11/startDM.sh -> /usr/bin/startDM
--- /etc/conf.d/
--- /etc/conf.d/display-manager
--- /etc/init.d/
--- /etc/init.d/xdm
>>> /etc/init.d/display-manager
>>> /etc/init.d/display-manager-setup
>>> Safely unmerging already-installed instance...
No package files given... Grabbing a set.
--- replaced obj /usr/bin/startDM
--- replaced dir /usr/bin
--- replaced dir /usr
--- replaced obj /etc/init.d/xdm
--- replaced obj /etc/init.d/display-manager-setup
--- replaced obj /etc/init.d/display-manager
--- replaced dir /etc/init.d
--- replaced obj /etc/conf.d/display-manager
--- replaced dir /etc/conf.d
--- replaced sym /etc/X11/startDM.sh
--- replaced dir /etc/X11
--- replaced dir /etc
>>> Regenerating /etc/ld.so.cache...
>>> Original instance of package unmerged safely.
>>> gui-libs/display-manager-init-1.0-r3 merged.
>>> Auto-cleaning packages...

>>> No outdated packages were found on your system.


No change to /etc/init.d/xdm -- still dated Feb 9.

Code:
# cat /etc/init.d/xdm
#!/sbin/openrc-run
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License, v2

# This is here to serve as a note to myself, and future developers.
#
# Any Display manager (gdm,kdm,xdm) has the following problem:  if
# it is started before any getty, and no vt is specified, it will
# usually run on vt2.  When the getty on vt2 then starts, and the
# DM is already started, the getty will take control of the keyboard,
# leaving us with a "dead" keyboard.
#
# Resolution: add the following line to /etc/inittab
#
#  x:a:once:/etc/X11/startDM.sh
#
# and have /etc/X11/startDM.sh start the DM in daemon mode if
# a lock is present (with the info of what DM should be started),
# else just fall through.
#
# How this basically works, is the "a" runlevel is a additional
# runlevel that you can use to fork processes with init, but the
# runlevel never gets changed to this runlevel.  Along with the "a"
# runlevel, the "once" key word means that startDM.sh will only be
# run when we specify it to run, thus eliminating respawning
# startDM.sh when "xdm" is not added to the default runlevel, as was
# done previously.
#
# This script then just calls "telinit a", and init will run
# /etc/X11/startDM.sh after the current runlevel completes (this
# script should only be added to the actual runlevel the user is
# using).
#
# Martin Schlemmer
# aka Azarah
# 04 March 2002

depend() {
   need localmount xdm-setup

   # this should start as early as possible
   # we can't do 'before *' as that breaks it
   # (#139824) Start after ypbind and autofs for network authentication
   # (#145219 #180163) Could use lirc mouse as input device
   # (#70689 comment #92) Start after consolefont to avoid display corruption
   # (#291269) Start after quota, since some dm need readable home
   # (#390609) gdm-3 will fail when dbus is not running
   # (#366753) starting keymaps after X causes problems
   after bootmisc consolefont modules netmount
   after readahead-list ypbind autofs openvpn gpm lircmd
   after quota keymaps
   before alsasound

   # Start before X
   use consolekit dbus xfs
}

setup_dm() {
   local MY_XDM
   
   MY_XDM=$(echo "${DISPLAYMANAGER}" | tr '[:upper:]' '[:lower:]')

   # Load our root path from profile.env
   # Needed for kdm
   PATH=${PATH}:$(. /etc/profile.env; echo "${ROOTPATH}")

   NAME=
   case "${MY_XDM}" in
      kdm|kde)
         EXE=/usr/bin/kdm
         PIDFILE=/run/kdm.pid
         ;;
      entrance*)
         EXE=/usr/sbin/entrance
         PIDFILE=/run/entrance.pid
         ;;
      gdm|gnome)
         # gdm-3 and above has different paths
         if [ -f /usr/sbin/gdm ]; then
            EXE=/usr/sbin/gdm
            PIDFILE=/run/gdm/gdm.pid
            START_STOP_ARGS="--background"
            AUTOCLEAN_CGROUP="yes"
         else
            EXE=/usr/bin/gdm
            PIDFILE=/run/gdm.pid
         fi
         [ "${RC_UNAME}" != "Linux" ] && NAME=gdm-binary
         ;;
      wdm)
         EXE=/usr/bin/wdm
         PIDFILE=
         ;;
      gpe)
         EXE=/usr/bin/gpe-dm
         PIDFILE=/run/gpe-dm.pid
         ;;
      lxdm)
         EXE=/usr/sbin/lxdm-binary
         PIDFILE=/run/lxdm.pid
         START_STOP_ARGS="--background"
         ;;
      lightdm)
         EXE=/usr/sbin/lightdm
         PIDFILE=/run/lightdm.pid
         START_STOP_ARGS="--background"
         ;;
      sddm)
         EXE="/usr/bin/sddm"
         START_STOP_ARGS="-m --background"
         PIDFILE=/run/sddm.pid
         ;;
      *)
         # first find out if there is such executable
         EXE="$(command -v ${MY_XDM} 2>/dev/null)"
         PIDFILE="/run/${MY_XDM}.pid"

         # warn user that he is doing sick things if the exe was not found
         if [ -z "${EXE}" ]; then
            echo "ERROR: Your XDM value is invalid."
            echo "  No ${MY_XDM} executable could be found on your system."
         fi
         ;;
   esac

   if ! [ -x "${EXE}" ]; then
      EXE=/usr/bin/xdm
      PIDFILE=/run/xdm.pid
      if ! [ -x "/usr/bin/xdm" ]; then
         echo "ERROR: Please set your DISPLAYMANAGER variable in /etc/conf.d/xdm,"
         echo "   or install x11-apps/xdm package"
         eend 255
      fi
   fi
}

# Check to see if something is defined on our VT
vtstatic() {
   if [ -e /etc/inittab ] ; then
      grep -Eq "^[^#]+.*\<tty$1\>" /etc/inittab
   elif [ -e /etc/ttys ] ; then
      grep -q "^ttyv$(($1 - 1))" /etc/ttys
   else
      return 1
   fi
}

start() {
   local EXE NAME PIDFILE AUTOCLEAN_CGROUP
   setup_dm

   if [ -f /etc/.noxdm ]; then
      einfo "Skipping ${EXE##*/}, /etc/.noxdm found or \"nox\" bootparam passed."
      rm /etc/.noxdm
      return 0
   fi

   ebegin "Setting up ${EXE##*/}"

   # save the prefered DM
   save_options "service" "${EXE}"
   save_options "name"    "${NAME}"
   save_options "pidfile" "${PIDFILE}"
   save_options "start_stop_args" "${START_STOP_ARGS}"
   save_options "autoclean_cgroup" "${AUTOCLEAN_CGROUP:-no}"

   if [ -n "${CHECKVT-y}" ] ; then
      if vtstatic "${CHECKVT:-7}" ; then
         if [ -x /sbin/telinit ] && [ "${SOFTLEVEL}" != "BOOT" ] && [ "${RC_SOFTLEVEL}" != "BOOT" ]; then
            ewarn "Something is already defined on VT ${CHECKVT:-7}, will start X later"
            telinit a >/dev/null 2>&1
            return 0
         else
            eerror "Something is already defined on VT ${CHECKVT:-7}, not starting"
            return 1
         fi
      fi
   fi

   /etc/X11/startDM.sh
   eend 0
}

stop() {
   local curvt retval

   retval=0
   if [ -t 0 ]; then
      if type fgconsole >/dev/null 2>&1; then
         curvt=$(fgconsole 2>/dev/null)
      else
         curvt=$(tty)
         case "${curvt}" in
            /dev/ttyv[0-9]*) curvt=${curvt#/dev/ttyv} ;;
            *) curvt= ;;
         esac
      fi
   fi
   local myexe myname mypidfile myservice
   myexe=$(get_options "service")
   myname=$(get_options "name")
   mypidfile=$(get_options "pidfile")
   myservice=${myexe##*/}
   yesno "${rc_cgroup_cleanup:-no}" || rc_cgroup_cleanup=$(get_options "autoclean_cgroup")

   [ -z "${myexe}" ] && return 0

   ebegin "Stopping ${myservice}"

   if start-stop-daemon --quiet --test --stop --exec "${myexe}" 2>/dev/null; then
      start-stop-daemon --stop --exec "${myexe}" --retry TERM/5/TERM/5 \
         ${mypidfile:+--pidfile} ${mypidfile} \
         ${myname:+--name} ${myname}
      retval=${?}
   fi

   # switch back to original vt
   if [ -n "${curvt}" ]; then
      if type chvt >/dev/null 2>&1; then
         chvt "${curvt}"
      else
         vidcontrol -s "$((curvt + 1))"
      fi
   fi

   eend ${retval} "Error stopping ${myservice}"
   return ${retval}
}

# vim: set ts=4 :


Thanks for reading.

I moved /etc/init.d/xdm to a safe place and replaced it with an empty file "touch /etc/init.d/xdm" rinse and repeat.

The empty file wasn't changed and there was no prompt to update configuration files.

Finally, I deleted /etc/init.d/xdm, rinse and repeat.

This time:
Code:

 * IMPORTANT: config file '/etc/init.d/xdm' needs updating.
 * See the CONFIGURATION FILES and CONFIGURATION FILES UPDATE TOOLS
 * sections of the emerge man page to learn how to update config files.
bethel /home/figueroa # dispatch-conf
... etc.


After accepting the changes "suggested" by dispatch-conf, a proper /etc/init.d/xdm is in place. Restarting sshd produces no error message.

Something isn't right, but I think my system is now OK.
_________________
Andy Figueroa
hp pavilion hpe h8-1260t/2AB5; spinning rust x3
i7-2600 @ 3.40GHz; 16 gb; Radeon HD 7570
amd64/23.0/split-usr/desktop (stable), OpenRC, -systemd -pulseaudio -uefi
Back to top
View user's profile Send private message
flysideways
Guru
Guru


Joined: 29 Jan 2005
Posts: 437

PostPosted: Sun Apr 11, 2021 8:33 pm    Post subject: Reply with quote

I too needed to rm /etc/init.d/xdm to get it to update on a ~amd64 install.
Back to top
View user's profile Send private message
alamahant
Advocate
Advocate


Joined: 23 Mar 2019
Posts: 3879

PostPosted: Sun Apr 11, 2021 8:43 pm    Post subject: Reply with quote

Same here
_________________
:)
Back to top
View user's profile Send private message
SlashBeast
Retired Dev
Retired Dev


Joined: 23 May 2006
Posts: 2922

PostPosted: Sun Apr 11, 2021 9:11 pm    Post subject: Reply with quote

flysideways wrote:
I too needed to rm /etc/init.d/xdm to get it to update on a ~amd64 install.


This can happen when you are prompted to update the files in /etc and decide to keep old version, thus you already made your choice and since file was not changed since last package update, you won't get prompted again.

You can compare checksum of /etc/init.d/xdm in /var/db/pkg/gui-libs/display-manager-init-1.0-r3/CONTENTS with the /etc/init.d/xdm on affected systems. If the CONTENTS file has new checksum but you have different/old file in /etc/init.d/xdm, it sound like etc-update/dispatch-conf was told to discard new version, and now on every reinstallation of package, if the CONTENTS has the checksume of updated file, you will not be prompted to update your config file.

I do not see any indication of something going wrong here really, works as expected.

Since I was unable to reproduce this problem and I do run fair amouint of Gentoo boxes which I do not upgrade that regularly

The solution: accept changes in /etc/init.d and do not discard them, otherwise you need to do manual steps to be prompted again to get them updated.
Back to top
View user's profile Send private message
figueroa
Advocate
Advocate


Joined: 14 Aug 2005
Posts: 2964
Location: Edge of marsh USA

PostPosted: Mon Apr 12, 2021 3:02 am    Post subject: Reply with quote

SlashBeast wrote:
This can happen when you are prompted to update the files in /etc and decide to keep old version, thus you already made your choice and since file was not changed since last package update, you won't get prompted again.

Yes, it can happen, but that's NOT what happened. I did not ignore or blow-off configuration file change prompts.
_________________
Andy Figueroa
hp pavilion hpe h8-1260t/2AB5; spinning rust x3
i7-2600 @ 3.40GHz; 16 gb; Radeon HD 7570
amd64/23.0/split-usr/desktop (stable), OpenRC, -systemd -pulseaudio -uefi
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21631

PostPosted: Mon Apr 12, 2021 3:13 pm    Post subject: Reply with quote

etc-update makes it quite easy to reject all pending changes. If you have a way to reproduce the system state where an update should fix your files, you are not prompted to do so, and manual intervention (such as deleting the old init script) is required, then that state would be worth investigating. Otherwise, I don't see that there is much to be done here. You are no longer in the bad state, so you cannot now gather more information about how you got there. The developers have described a plausible way you could have gotten there. We do not have any debug output suggesting that explanation is wrong, and by extension, we do not have any debug output hinting at a problem that could be fixed by a code change.
Back to top
View user's profile Send private message
figueroa
Advocate
Advocate


Joined: 14 Aug 2005
Posts: 2964
Location: Edge of marsh USA

PostPosted: Tue Apr 13, 2021 3:56 pm    Post subject: Reply with quote

display-manager-init became stable on x86 since yesterday. Only the needed xorg-server-1.20.10-r3 still needed keywording. So, I did, and let it rip.

At the end it prompted me for configuration file changes. Here is what I noted.

1. The /etc/conf.d/display-manager did not pick up the prefered display manager from /etc/conf.d/xdm. I had to edit it to input the correct display manager as part of the process.

2. I was prompted with /etc/init.d/xdm changes. Those changes seemed to be obviously wrong. So maybe on my amd64 system I did discard those changes. Because the "suggested changes" seem obviously wrong, there should be some NEWS about the need to accept those changes. Now that I'm experienced, I accepted proposed changes and all seems well.

Why is /etc/init.d/xdm still needed? At this point, it seems like cruft. Is it for compatibility? Does it do anything? Maybe if new xdm file contained some embedded comments it would make sense.
_________________
Andy Figueroa
hp pavilion hpe h8-1260t/2AB5; spinning rust x3
i7-2600 @ 3.40GHz; 16 gb; Radeon HD 7570
amd64/23.0/split-usr/desktop (stable), OpenRC, -systemd -pulseaudio -uefi
Back to top
View user's profile Send private message
Tony0945
Watchman
Watchman


Joined: 25 Jul 2006
Posts: 5127
Location: Illinois, USA

PostPosted: Tue Apr 13, 2021 4:32 pm    Post subject: Reply with quote

Not familiar with the design, but it appears that there are two xdm's. One is the overall display manager and can call gdm, kdm, perhaps more. The second xdm is a default manager supplied. Unfortunately it has the same name instead of say 'xdm-default". I found this a few months ago investigating why I had two processes called xdm.

Does the new display manager replace one or both? Is is a modification or a totally new design/codebase? I have no idea, but since I don't want either elogind or syst3ed or any other RH ---d, I froze the existing code in overlay. For now.

Thanks for trying this experimental system. Be sure to file bugs.

EDIT:
Twenty years ago FOSS had design documents, even if they were only a few sentences about the general design and major components. Now packages are as silent as Windoze. "Here. Take it and like it. Shut up!"
Back to top
View user's profile Send private message
mv
Watchman
Watchman


Joined: 20 Apr 2005
Posts: 6747

PostPosted: Tue Apr 13, 2021 4:57 pm    Post subject: Reply with quote

figueroa wrote:
Why is /etc/init.d/xdm still needed? At this point, it seems like cruft. Is it for compatibility? Does it do anything?

It is rather cleaer: It just depends on displaymanager, that is it only makes sure that you do not need to change your runlevels or other files which depend on xdm: They will implicitly depend on displaymanager instead.
Back to top
View user's profile Send private message
mv
Watchman
Watchman


Joined: 20 Apr 2005
Posts: 6747

PostPosted: Tue Apr 13, 2021 5:14 pm    Post subject: Reply with quote

Tony0945 wrote:
Not familiar with the design, but it appears that there are two xdm's. One is the overall display manager and can call gdm, kdm, perhaps more. The second xdm is a default manager supplied. Unfortunately it has the same name instead of say 'xdm-default". I found this a few months ago investigating why I had two processes called xdm.

Does the new display manager replace one or both?

The second one you mean is x11-apps/xdm. It is a full display manager. The other thing is just a tiny init-script which starts a displaymanager (I suppose that originally it only started xdm and was then extended later on). It is only this tiny init-script which was extended again a little bit more and was renamed to the more appropriate name displaymanager.
Back to top
View user's profile Send private message
figueroa
Advocate
Advocate


Joined: 14 Aug 2005
Posts: 2964
Location: Edge of marsh USA

PostPosted: Tue Apr 13, 2021 7:16 pm    Post subject: Reply with quote

Code:

$ equery b /etc/init.d/xdm
 * Searching for /etc/init.d/xdm ...
gui-libs/display-manager-init-1.0-r3 (/etc/init.d/xdm)


No relationship to the display manager x11-apps/xdm which I don't have installed.

The new /etc/init.d/xdm does start /etc/init.d/display-manager if run with "/etc/init.d/xdm start". Doing "/etc/init.d/xdm stop" nothing happens. If display-manager was run by invoking /etc/init.d/xdm one would then have to enter "/etc/init.d/display-manager stop" to exit the running display-manager.

I know this by experimenting. Apparently it was a problem for /etc/init.d/xdm to not exist.
_________________
Andy Figueroa
hp pavilion hpe h8-1260t/2AB5; spinning rust x3
i7-2600 @ 3.40GHz; 16 gb; Radeon HD 7570
amd64/23.0/split-usr/desktop (stable), OpenRC, -systemd -pulseaudio -uefi
Back to top
View user's profile Send private message
asturm
Developer
Developer


Joined: 05 Apr 2007
Posts: 8936

PostPosted: Tue Apr 13, 2021 7:39 pm    Post subject: Reply with quote

You don't do anything with /etc/init.d/xdm anymore. As the news told you, display-manager is the new thing.

figueroa wrote:
Why is /etc/init.d/xdm still needed? At this point, it seems like cruft. Is it for compatibility? Does it do anything?

Yes, for people who neither read news nor run etc-update it is needed. Even if like in your case you make the wrong call and discard /etc/init.d/xdm changes at least it is still there for you in case you did not update runlevels. At some point in the future it will be removed.
Back to top
View user's profile Send private message
figueroa
Advocate
Advocate


Joined: 14 Aug 2005
Posts: 2964
Location: Edge of marsh USA

PostPosted: Tue Apr 13, 2021 8:24 pm    Post subject: Reply with quote

asturm wrote:
...
Yes, for people who neither read news nor run etc-update it is needed.

Good answer. For my tastes, more news and/or more details in portage logs would be better. Something straight forward like, "You NEED to let this configuration file replace your current /etc/init.d/xdm or you'll BREAK your display manager startup."

Is etc-update better than dispatch-conf? I've been using dispatch-conf from the beginning, and I'm used to it, but I never see it mentioned in the forums to the point of believing everybody else is using etc-update.
_________________
Andy Figueroa
hp pavilion hpe h8-1260t/2AB5; spinning rust x3
i7-2600 @ 3.40GHz; 16 gb; Radeon HD 7570
amd64/23.0/split-usr/desktop (stable), OpenRC, -systemd -pulseaudio -uefi
Back to top
View user's profile Send private message
asturm
Developer
Developer


Joined: 05 Apr 2007
Posts: 8936

PostPosted: Tue Apr 13, 2021 8:27 pm    Post subject: Reply with quote

figueroa wrote:
"You NEED to let this configuration file replace your current /etc/init.d/xdm or you'll BREAK your display manager startup."

But that's not true. If you read the news, you switched to display-manager and do not care about any of this. More correct would be sth like "oh btw, if you discard that /etc/init.d/xdm fallback also contained in the display-manager update, you might get some warnings". I don't think that's worth having. News was already rather big.

And just in case, display-manager-init ebuild is also throwing a warning message - with instructions - at you if xdm is in your runlevels.

For people who don't read news, logs and ignore etc-update, no kind of straightforward message will reach them.
Back to top
View user's profile Send private message
figueroa
Advocate
Advocate


Joined: 14 Aug 2005
Posts: 2964
Location: Edge of marsh USA

PostPosted: Tue Apr 13, 2021 9:15 pm    Post subject: Reply with quote

asturm wrote:
...
I don't think that's worth having. News was already rather big. ...

Thank you for the continuing explanation -- really. We just don't agree on the level of details that would benefit this user. Better, even if longer, news items and more elog content help those users who read those things. I'm not sure there is a way to help those who don't read news or logs unless a change-over process is so totally automated as to take control away from users who are trying to do these things smartly.

Usually, running dispatch-conf on a file in /etc/init.d/ I just accept it; but I do read the output. My reaction to the changes for /etc/init.d/xdm was "That can't be right! It's taking out all the 'good stuff'." That would have been a good case for the change to /etc/init.d/xdm should have just been automatic. The only right answer was to accept the changes in full. So, we're discussing it now, which may help others who are also paying attention.

This was easy compared to the recent python transitions.
_________________
Andy Figueroa
hp pavilion hpe h8-1260t/2AB5; spinning rust x3
i7-2600 @ 3.40GHz; 16 gb; Radeon HD 7570
amd64/23.0/split-usr/desktop (stable), OpenRC, -systemd -pulseaudio -uefi
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 4148
Location: Bavaria

PostPosted: Tue Apr 13, 2021 10:15 pm    Post subject: Reply with quote

figueroa wrote:
[...] We just don't agree on the level of details that would benefit this user. Better, even if longer, [...]


IMHO for a new user the ONLY missing information was: * Please edit your /etc/conf.d/display-manager and set your previous manger.

(For me this was not a problem, because I had remembered the same needed setting in /etc/conf.d/xdm and therefore this was my first check after deleting xdm from runlevel and adding display-manager to RL).
Back to top
View user's profile Send private message
asturm
Developer
Developer


Joined: 05 Apr 2007
Posts: 8936

PostPosted: Wed Apr 14, 2021 3:43 pm    Post subject: Reply with quote

pietinger wrote:
IMHO for a new user the ONLY missing information was: * Please edit your /etc/conf.d/display-manager and set your previous manger.


But it says that:
Code:
Existing settings from /etc/conf.d/xdm will be migrated to new
/etc/conf.d/display-manager config, however after installation it is
vital not to forget to run either `etc-update` or `dispatch-conf`.
Afterwards check that /etc/conf.d/display-manager contains the
desired value for DISPLAYMANAGER.
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 4148
Location: Bavaria

PostPosted: Wed Apr 14, 2021 6:01 pm    Post subject: Reply with quote

asturm wrote:
But it says that: [...]

Yes, this is true for the news in "eselect news"; maybe there are some new users who forgot that. I answered @figueroa because I thought he is talking (only) about the information from the emerge itself.

(Maybe - I dont know - there was a plan to transfer the settings from conf/xdm to conf/display-manager and therefore there was no additional hint in the emerge information; so maybe the error was not the missing hint - it was the missing transfer; BUT.: I dont know (and I dont care)).
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum