LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 09-20-2007, 06:20 PM   #1
lebabyg
Member
 
Registered: Mar 2006
Location: UK
Distribution: Ubuntu Feisty
Posts: 272

Rep: Reputation: 30
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
 
Old 09-20-2007, 06:55 PM   #2
pljvaldez
LQ Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Wheezy (x86)
Posts: 6,094

Rep: Reputation: 281Reputation: 281Reputation: 281
Not sure if it works on (K)Ubuntu, but on Debian I use sudo dpkg-reconfigure kdm.
 
Old 09-21-2007, 05:59 AM   #3
lebabyg
Member
 
Registered: Mar 2006
Location: UK
Distribution: Ubuntu Feisty
Posts: 272

Original Poster
Rep: Reputation: 30
Hi,

Yer i'd already tried that, and it doesn't help unfortunately. Anybody got any other ideas??
 
Old 09-21-2007, 07:24 AM   #4
zamuro
LQ Newbie
 
Registered: Sep 2007
Posts: 9

Rep: Reputation: 0
You should try using xdm... lighter, more effective than (g)kdm... imho, of course...
 
Old 09-21-2007, 07:52 AM   #5
almatic
Member
 
Registered: Mar 2007
Distribution: Debian
Posts: 547

Rep: Reputation: 67
- 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 .
 
Old 09-21-2007, 10:11 AM   #6
lebabyg
Member
 
Registered: Mar 2006
Location: UK
Distribution: Ubuntu Feisty
Posts: 272

Original Poster
Rep: Reputation: 30
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 View Post
- 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...

Last edited by lebabyg; 09-21-2007 at 10:16 AM.
 
Old 09-21-2007, 10:42 AM   #7
almatic
Member
 
Registered: Mar 2007
Distribution: Debian
Posts: 547

Rep: Reputation: 67
Quote:
Originally Posted by lebabyg View Post
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.
 
Old 09-21-2007, 10:44 AM   #8
pljvaldez
LQ Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Wheezy (x86)
Posts: 6,094

Rep: Reputation: 281Reputation: 281Reputation: 281
Quote:
Originally Posted by lebabyg View Post
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...
 
Old 09-21-2007, 11:08 AM   #9
lebabyg
Member
 
Registered: Mar 2006
Location: UK
Distribution: Ubuntu Feisty
Posts: 272

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by pljvaldez View Post
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??
 
Old 09-21-2007, 11:21 AM   #10
pljvaldez
LQ Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Wheezy (x86)
Posts: 6,094

Rep: Reputation: 281Reputation: 281Reputation: 281
Why don't you try aptitude reinstall kdm and it should give you back the startup script.
 
Old 09-21-2007, 11:30 AM   #11
lebabyg
Member
 
Registered: Mar 2006
Location: UK
Distribution: Ubuntu Feisty
Posts: 272

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by pljvaldez View Post
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???
 
Old 09-21-2007, 12:12 PM   #12
pljvaldez
LQ Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Wheezy (x86)
Posts: 6,094

Rep: Reputation: 281Reputation: 281Reputation: 281
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?
 
Old 09-21-2007, 12:31 PM   #13
lebabyg
Member
 
Registered: Mar 2006
Location: UK
Distribution: Ubuntu Feisty
Posts: 272

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by pljvaldez View Post
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...
 
Old 09-21-2007, 01:40 PM   #14
pljvaldez
LQ Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Wheezy (x86)
Posts: 6,094

Rep: Reputation: 281Reputation: 281Reputation: 281
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.

Last edited by pljvaldez; 09-21-2007 at 01:41 PM.
 
Old 09-22-2007, 03:40 PM   #15
lebabyg
Member
 
Registered: Mar 2006
Location: UK
Distribution: Ubuntu Feisty
Posts: 272

Original Poster
Rep: Reputation: 30
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Mozilla starts automatically when X starts zadox Linux - Desktop 2 09-03-2006 11:55 AM
FireFox no longer starts Wakim Linux - Software 11 01-31-2005 10:35 PM
KDM starts automatically from user console? Oh Cisco Debian 3 08-14-2004 07:52 PM
Help! My SuSe no longer starts! J_Szucs Linux - General 4 05-18-2003 04:27 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration