LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   KDM no longer automatically starts on bootup (https://www.linuxquestions.org/questions/linux-software-2/kdm-no-longer-automatically-starts-on-bootup-586192/)

lebabyg 09-20-2007 06:20 PM

KDM no longer automatically starts on bootup
 
Hey,

I thought that i'd have a change and use GDM instead of KDM on my Kubuntu 7.04 install. However, this proved to be a bit problematic and led to session problems using Xgl (don't ask me why), and i decided it was too much trouble for what essentially is a bit of eyecandy. However, now that i have reverted back to KDM it no longer automatically starts on bootup, it just gives me the text login. I can login then sudo kdm, but this is
a) annoying and
b) means that there is always an extra session running that is not needed.

Anybody have any ideas about how to fix this, as i really don't know much about how to configure KDM and google isn't wealding much....

Cheers

pljvaldez 09-20-2007 06:55 PM

Not sure if it works on (K)Ubuntu, but on Debian I use sudo dpkg-reconfigure kdm.

lebabyg 09-21-2007 05:59 AM

Hi,

Yer i'd already tried that, and it doesn't help unfortunately. Anybody got any other ideas??

zamuro 09-21-2007 07:24 AM

You should try using xdm... lighter, more effective than (g)kdm... imho, of course...

almatic 09-21-2007 07:52 AM

- check the file /etc/X11/default-display-manager, it should contain '/usr/bin/kdm'. This is also what the dpkg-reconfigure command is supposed to do.

- check the runlevel links in /etc/rcX.d, they should contain links to the startscript. rc2 is for the multiuser runlevel and should contain something like S99kdm, rc0 (for halt) and rc6 (for reboot) should contain K01kdm. If this is not the case you can manually correct it like this:

update-rc.d -f remove kdm
update-rc.d kdm start 99 2 . stop 01 0 6 .

lebabyg 09-21-2007 10:11 AM

Thanks for the replies

Quote:

You should try using xdm... lighter, more effective than (g)kdm... imho, of course...
The issue is not with the effectiveness. I already tried changing to GDM and for whatever reason (probably due to the Kubuntu install), it doesn't like my XGL sessions (logout locks fglrx driver etc). I fiddled with it for a couple of hours and couldn't get it to work so i'm not particularly interested in getting Xdm to work....

Quote:

Originally Posted by almatic (Post 2899091)
- check the file /etc/X11/default-display-manager, it should contain '/usr/bin/kdm'. This is also what the dpkg-reconfigure command is supposed to do.

I'd already checked this, and it was already there.

Quote:

- check the runlevel links in /etc/rcX.d, they should contain links to the startscript. rc2 is for the multiuser runlevel and should contain something like S99kdm, rc0 (for halt) and rc6 (for reboot) should contain K01kdm. If this is not the case you can manually correct it like this:

update-rc.d -f remove kdm
update-rc.d kdm start 99 2 . stop 01 0 6 .
rc2 contains S99kdm
rc0 and rc6 contain K01kdm

However, the when i run update-rc.d -f remove kdm i get

update-rc.d: /etc/init.d/remove: file does not exist

so the file /etc/init.d/kdm does not exit.... How do i create it??

sudo update-rc.d kdm start 99 2 . stop 01 0 6 tells me that the file does not exist...

Oh and i've already tried a reinstall of KDM...;)

Thanks in advance...

almatic 09-21-2007 10:42 AM

Quote:

Originally Posted by lebabyg (Post 2899217)
However, the when i run update-rc.d -f remove kdm i get

update-rc.d: /etc/init.d/remove: file does not exist

sorry, that was a typo, the correct command to remove the symlinks is 'update-rc.d -f kdm remove'.
However, if the symlinks are there but the startscript is not, then you don't need to use those commands.
Check manually if /etc/init.d/kdm exists or not. It is part of the kdm package, so reinstalling should solve the problem. You could also download the package (aptitude install -d kdm) and then extract the file.

pljvaldez 09-21-2007 10:44 AM

Quote:

Originally Posted by lebabyg (Post 2899217)
However, the when i run update-rc.d -f remove kdm i get

update-rc.d: /etc/init.d/remove: file does not exist

I think that means you need to use
Code:

update-rc.d -f kdm remove
instead. It says it's looking for /etc/init.d/remove, you want it to look for /etc/init.d/kdm...

lebabyg 09-21-2007 11:08 AM

Quote:

Originally Posted by pljvaldez (Post 2899245)
It says it's looking for /etc/init.d/remove, you want it to look for /etc/init.d/kdm...

DOE!!! That would be the command.... however, after an uninstall, and then reinstall, there is still no kdm file in /etc/init.d/

What file needs to be in here? Do i just symlink to /usr/bin??

pljvaldez 09-21-2007 11:21 AM

Why don't you try aptitude reinstall kdm and it should give you back the startup script.

lebabyg 09-21-2007 11:30 AM

Quote:

Originally Posted by pljvaldez (Post 2899301)
Why don't you try aptitude reinstall kdm and it should give you back the startup script.

I have done... It still hasn't given back the startup script.....Any ideas???

pljvaldez 09-21-2007 12:12 PM

Maybe someone can post their /etc/init.d/kdm file for you to create it.

What is the output of ls -l |grep kdm when you're in the /etc/init.d directory? Is the file not there at all, or maybe the execute bit is just unset?

lebabyg 09-21-2007 12:31 PM

Quote:

Originally Posted by pljvaldez (Post 2899349)
What is the output of ls -l |grep kdm when you're in the /etc/init.d directory? Is the file not there at all, or maybe the execute bit is just unset?

It outputs nothing, so i guess that the file is just not there. If somebody could post there file so i could create one, that would be brilliant...

pljvaldez 09-21-2007 01:40 PM

I still feel like sudo aptitude -f reinstall kdm should work... But I dug this out of the package file from the repository, but I'm not sure if it's correct (since I don't have Kubuntu)
Code:

#!/bin/sh
### BEGIN INIT INFO
# Provides:          x-display-manager kdm
# Required-Start:    $local_fs $remote_fs
# Required-Stop:    $local_fs $remote_fs
# Should-Start:      console-screen
# Should-Stop:      console-screen
# Default-Start:    2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: X display manager for KDE
# Description:      KDM manages a collection of X servers, which may be on the local host or remote machines.
### END INIT INFO
# /etc/init.d/kdm: start or stop the X display manager
# Script originally stolen from the xdm package
#
# description: K Display Manager
#
set -e

# To start kdm even if it is not the default display manager, change
# HEED_DEFAULT_DISPLAY_MANAGER to "false."
HEED_DEFAULT_DISPLAY_MANAGER=true
DEFAULT_DISPLAY_MANAGER_FILE=/etc/X11/default-display-manager

PATH=/bin:/usr/bin:/sbin:/usr/sbin
DAEMON=/usr/bin/kdm
PIDFILE=/var/run/kdm.pid
UPGRADEFILE=/var/run/kdm.upgrade

test -x $DAEMON || exit 0

# uncomment, if you want auto-logon to be runlevel-dependant
#test "$runlevel" || { runlevel=`runlevel`; runlevel=${runlevel#* }; }
#test "$runlevel" = 4 && ARG=-autolog || ARG=-noautolog

# uncomment, if you want tons of debug info in your syslog
#ARG="$ARG -debug 255"

# If we upgraded the daemon, we can't use the --exec argument to
# start-stop-daemon since the inode will have changed.  The risk here is that
# in a situation where the daemon died, its pidfile was not cleaned up, and
# some other process is now running under that pid, start-stop-daemon will send
# signals to an innocent process.  However, this seems like a corner case.
# C'est la vie!
if [ -e $UPGRADEFILE ]; then
  SSD_ARGS="--pidfile $PIDFILE --startas $DAEMON"
else
  SSD_ARGS="--pidfile $PIDFILE --exec $DAEMON"
fi

stillrunning () {
  if expr "$(cat /proc/$DAEMONPID/cmdline 2> /dev/null)" : "$DAEMON" > /dev/null 2>&1; then
    true
  else
    # if the daemon does not remove its own pidfile, we will
    rm -f $PIDFILE $UPGRADEFILE
    false
  fi;
}

case "$1" in
  start)
    if [ -e $DEFAULT_DISPLAY_MANAGER_FILE ] &&
      [ "$HEED_DEFAULT_DISPLAY_MANAGER" = "true" ] &&
      [ "$(cat $DEFAULT_DISPLAY_MANAGER_FILE)" != "$DAEMON" ]; then
      echo "Not starting K Display Manager (kdm); it is not the default display manager."
    else
      # if usplash is runing, make sure to stop it now, yes "start" kills it.
      if pidof usplash > /dev/null; then
        DO_NOT_SWITCH_VT=yes /etc/init.d/usplash start
      fi

      echo -n "Starting K Display Manager: kdm"
      start-stop-daemon --start --quiet $SSD_ARGS -- $ARG || echo -n " already running"
      echo "."
    fi
  ;;

  restart)
    /etc/init.d/kdm stop
    if [ -f $PIDFILE ]; then
      if stillrunning; then
        exit 1
      fi
    fi
    /etc/init.d/kdm start
  ;;

  reload)
    echo -n "Reloading K Display Manager configuration..."
    if start-stop-daemon --stop --signal 1 --quiet $SSD_ARGS; then
      echo "done."
    else
      echo "kdm not running."
    fi
  ;;

  force-reload)
    /etc/init.d/kdm reload
  ;;

  stop)
    echo -n "Stopping K Display Manager: kdm"
    if [ ! -f $PIDFILE ]; then
      echo " not running ($PIDFILE not found)."
      exit 0
    else
      DAEMONPID=$(cat $PIDFILE | tr -d '[:blank:]')
      KILLCOUNT=1
      if [ ! -e $UPGRADEFILE ]; then
        if start-stop-daemon --stop --quiet $SSD_ARGS; then
          # give kdm's signal handler a second to catch its breath
          sleep 1
        else
          echo -n " not running"
        fi
      fi
      while [ $KILLCOUNT -le 5 ]; do
        if stillrunning; then
          kill $DAEMONPID
        else
          break
        fi
        sleep 1
        KILLCOUNT=$(( $KILLCOUNT + 1 ))
      done
      if stillrunning; then
        echo -n " not responding to TERM signal (pid $DAEMONPID)"
      else
        rm -f $UPGRADEFILE
      fi
    fi
    echo "."
  ;;

  *)
    echo "Usage: /etc/init.d/kdm {start|stop|restart|reload|force-reload}"
    exit 1
    ;;
esac

exit 0

Create the file in /etc/init.d and paste the contents into the file. Then you probably have to make it executable sudo chmod a+x /etc/init.d/kdm.

lebabyg 09-22-2007 03:40 PM

Created the file, and then tried a reboot... However nothing doing!!! I might just leave it to be fair, it's not that much of a problem and i don't think that i'm going to get to the bottom of it!! Thanks for all your help.


All times are GMT -5. The time now is 01:21 PM.