Linux

Slackware修改默认启动gdm/kdm/xdm

LensNews

可能你的Slackware会同时装有gdm/kdm/xdm,如果想改变默认启动,要修改的文件是: /etc/rc.d/rc.4


原文件的写法:

#! /bin/sh
#
# rc.4  This file is executed by init(8) when the system is being
#  initialized for run level 4 (XDM)
#
# Version: @(#)/etc/rc.d/rc.4 2.00 02/17/93
#
# Author: Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org>
# At least 47% rewritten by:  Patrick J. Volkerding <volkerdi@slackware.com>
#

# Tell the viewers what's going to happen...
echo "Starting up X11 session manager..."

# Try to use GNOME's gdm session manager.  This comes first because if
# gdm is on the machine then the user probably installed it and wants
# to use it by default:
if [ -x /usr/sbin/gdm ]; then
  exec /usr/sbin/gdm -nodaemon
fi

# Someone thought that gdm looked prettier in /usr/sbin,
# so look there, too:
if [ -x /usr/sbin/gdm ]; then
  exec /usr/sbin/gdm -nodaemon
fi

# Not there?  OK, try to use KDE's kdm session manager:
if [ -x /opt/kde/bin/kdm ]; then
  exec /opt/kde/bin/kdm -nodaemon
elif [ -x /usr/bin/kdm ]; then
  exec /usr/bin/kdm -nodaemon
fi

# If all you have is XDM, I guess it will have to do:
if [ -x /usr/bin/xdm ]; then
  exec /usr/bin/xdm -nodaemon
elif [ -x /usr/X11R6/bin/xdm ]; then
  exec /usr/X11R6/bin/xdm -nodaemon
fi

# error
echo
echo "Hey, you don't have KDM, GDM, or XDM.  Can't use runlevel 4 without"
echo "one of those installed."
sleep 30

# All done.

这样一看就比较清楚了,只需要把相关代码调到最前就可以实现了。我使用的是Slackware13.37,下面看下三种桌面登陆:

xdm比较简陋,而且没有任何选项可以选择,只能默认进入某个桌面。

gdm可以选择需要登陆到哪个桌面GNOME或KDE。

gdm不仅可以选择登陆的桌面,还可以设置语言环境,主题。Slackware的DVD是不带gnome的,想装gnome可以参考:http://www.linuxsight.com/blog/1517

(0)

本文由 Linux视野 作者:fantlam 发表,转载请注明来源!

关键词:, , ,
LensNews

热评文章

发表评论

您的电子邮箱地址不会被公开。 必填项已用*标注