Slackware Linux GUI ログイン
作成 : 2002/12/16
Slackware ログイン
インストール直後、Slackware を起動すると、テキストベースのログインプロンプトが表示される。 Redhat などのように、GUIベースでログインしたい場合は、次のようにする。
/etc/inittab の編集
テキストベースのログインプロンプトが表示されるのは、inittab でデフォルトランレベルが"3"に設定されているため。
# Default runlevel. (Do not set to 0 or 6) id:3:initdefault:
GUI ベースでログインするには、デフォルトランレベルを"4"に変更する。
# Default runlevel. (Do not set to 0 or 6)
id:4:initdefault:
下のエントリをコメントアウトしないほうがよい。 ランレベル 3 でコンソールログインできなくなる。
# These are the standard console login getties in multiuser mode: c1:1235:respawn:/sbin/agetty 38400 tty1 linux ...
/etc/rc.d/rc.4
ランレベル 4 で起動するとき、/etc/rc.d/rc.4 が実行される。 /etc/rc.d/rc.4 には、どのセッションマネージャを起動するか書かれている。 rc.4 を編集することで、KDM(KDE セッションマネージャ) / GDM(GNOME セッションマネージャ) / XDM のいずれかでログインすることができるようになる。 (デフォルトは KDM)
# Tell the viewers what's going to happen... echo "Starting up X11 session manager..." # KDE's kdm is the default session manager. If you've got this, it's the # one to use. if [ -x /opt/kde/bin/kdm ]; then exec /opt/kde/bin/kdm -nodaemon # GNOME's session manager is another choice: elif [ -x /usr/bin/gdm ]; then exec /usr/bin/gdm -nodaemon # If all you have is XDM, I guess it will have to do: 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.
たとえば、GDMをデフォルトのセッションマネージャにしたい場合は、次のように編集する。
# KDE's kdm is the default session manager. If you've got this, it's the # one to use. #if [ -x /opt/kde/bin/kdm ]; then # exec /opt/kde/bin/kdm -nodaemon # GNOME's session manager is another choice: #elif [ -x /usr/bin/gdm ]; then if [ -x /usr/bin/gdm ]; then exec /usr/bin/gdm -nodaemon # If all you have is XDM, I guess it will have to do: 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.