LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 805|回复: 2

etch升级到lenny后不能自动进入X

[复制链接]
发表于 2008-11-28 01:42:42 | 显示全部楼层 |阅读模式
晚上刚刚升级etch到lenny,之后启动就发现每次启动,都是只能进入字符term,查看了一下/etc/rc2.d/~/etc/rc5.d/,这些目录下都有/etc/init.d/gdm这个脚本的link文件S21gdm。

我手动执行/etc/init.d/gdm start也没有反应,但是在term下执行startx一样能够进入X,请大家帮忙看一下

/etc/inittab文件

  1. # /etc/inittab: init(8) configuration.
  2. # $Id: inittab,v 1.91 2002/01/25 13:35:21 miquels Exp $

  3. # The default runlevel.
  4. id:2:initdefault:

  5. # Boot-time system configuration/initialization script.
  6. # This is run first except when booting in emergency (-b) mode.
  7. si::sysinit:/etc/init.d/rcS

  8. # What to do in single-user mode.
  9. ~~:S:wait:/sbin/sulogin

  10. # /etc/init.d executes the S and K scripts upon change
  11. # of runlevel.
  12. #
  13. # Runlevel 0 is halt.
  14. # Runlevel 1 is single-user.
  15. # Runlevels 2-5 are multi-user.
  16. # Runlevel 6 is reboot.

  17. l0:0:wait:/etc/init.d/rc 0
  18. l1:1:wait:/etc/init.d/rc 1
  19. l2:2:wait:/etc/init.d/rc 2
  20. l3:3:wait:/etc/init.d/rc 3
  21. l4:4:wait:/etc/init.d/rc 4
  22. l5:5:wait:/etc/init.d/rc 5
  23. l6:6:wait:/etc/init.d/rc 6
  24. # Normally not reached, but fallthrough in case of emergency.
  25. z6:6:respawn:/sbin/sulogin

  26. # What to do when CTRL-ALT-DEL is pressed.
  27. ca:12345:ctrlaltdel:/sbin/shutdown -t1 -a -r now

  28. # Action on special keypress (ALT-UpArrow).
  29. #kb::kbrequest:/bin/echo "Keyboard Request--edit /etc/inittab to let this work."

  30. # What to do when the power fails/returns.
  31. pf::powerwait:/etc/init.d/powerfail start
  32. pn::powerfailnow:/etc/init.d/powerfail now
  33. po::powerokwait:/etc/init.d/powerfail stop

  34. # /sbin/getty invocations for the runlevels.
  35. #
  36. # The "id" field MUST be the same as the last
  37. # characters of the device (after "tty").
  38. #
  39. # Format:
  40. #  <id>:<runlevels>:<action>:<process>
  41. #
  42. # Note that on most Debian systems tty7 is used by the X Window System,
  43. # so if you want to add more getty's go ahead but skip tty7 if you run X.
  44. #
  45. 1:2345:respawn:/sbin/getty 38400 tty1
  46. 2:23:respawn:/sbin/getty 38400 tty2
  47. 3:23:respawn:/sbin/getty 38400 tty3
  48. 4:23:respawn:/sbin/getty 38400 tty4
  49. 5:23:respawn:/sbin/getty 38400 tty5
  50. 6:23:respawn:/sbin/getty 38400 tty6

  51. # Example how to put a getty on a serial line (for a terminal)
  52. #
  53. #T0:23:respawn:/sbin/getty -L ttyS0 9600 vt100
  54. #T1:23:respawn:/sbin/getty -L ttyS1 9600 vt100

  55. # Example how to put a getty on a modem line.
  56. #
  57. #T3:23:respawn:/sbin/mgetty -x0 -s 57600 ttyS3
复制代码


/etc/init.d/gdm文件

  1. #! /bin/sh
  2. ### BEGIN INIT INFO
  3. # Provides:          x-display-manager gdm
  4. # Should-Start:      console-screen acpid
  5. # Required-Start:    $local_fs $remote_fs
  6. # Required-Stop:     $local_fs $remote_fs
  7. # Default-Start:     2 3 4 5
  8. # Default-Stop:      S 0 1 6
  9. # Short-Description: GNOME Display Manager
  10. # Description:       Debian init script for the GNOME Display Manager
  11. ### END INIT INFO
  12. #
  13. # Author:        Ryan Murray <rmurray@debian.org>
  14. #
  15. set -e

  16. PATH=/sbin:/bin:/usr/sbin:/usr/bin
  17. DAEMON=/usr/sbin/gdm
  18. DEBCONF_DAEMON=/usr/bin/gdm

  19. test -x $DAEMON || exit 0

  20. if [ -r /etc/default/locale ]; then
  21.   . /etc/default/locale
  22.   export LANG LANGUAGE
  23. fi

  24. . /lib/lsb/init-functions

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

  29. case "$1" in
  30.   start)
  31.           if [ -e "$DEFAULT_DISPLAY_MANAGER_FILE" -a "$HEED_DEFAULT_DISPLAY_MANAGER" = "true" -a "$(cat $DEFAULT_DISPLAY_MANAGER_FILE 2> /dev/null)" != "$DEBCONF_DAEMON" ]; then
  32.                 log_action_msg "Not starting GNOME Display Manager; it is not the default display manager"
  33.         else
  34.                 log_daemon_msg "Starting GNOME Display Manager" "gdm"
  35.                 start_daemon $DAEMON
  36.                 log_end_msg $?
  37.         fi
  38.   ;;
  39.   stop)
  40.         log_daemon_msg "Stopping GNOME Display Manager" "gdm"
  41.         set +e
  42.         start-stop-daemon --stop --quiet --pidfile /var/run/gdm.pid \
  43.                 --name gdm --retry 5
  44.         set -e
  45.         log_end_msg $?
  46.   ;;
  47.   reload)
  48.           log_daemon_msg "Scheduling reload of GNOME Display Manager configuration" "gdm"
  49.         set +e
  50.         start-stop-daemon --stop --signal USR1 --quiet --pidfile \
  51.                 /var/run/gdm.pid --name gdm
  52.         set -e
  53.         log_end_msg $?
  54.   ;;
  55.   restart|force-reload)
  56.         $0 stop
  57.         $0 start
  58.   ;;
  59.   *)
  60.         echo "Usage: /etc/init.d/gdm {start|stop|restart|reload|force-reload}"
  61.         exit 1
  62.   ;;
  63. esac

  64. exit 0
复制代码
 楼主| 发表于 2008-11-28 10:19:05 | 显示全部楼层
折腾了好久,发现问题其实很白痴。

升级lenny的时候居然把gdm删除了,没有重新安装。查看xorg的配置文件,发现没有找到/usr/bin/gdm。自己安装上就好了。
回复 支持 反对

使用道具 举报

发表于 2008-11-28 10:38:41 | 显示全部楼层
有时候会提示XX不再被使用而 让你 autoremove 掉,
但是那个东西却是必须的。。。
比如我曾经被提示 gnome-core 不再被使用。。。寒
不知道什么问题。
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表