Operating Systems > Linux and UNIX
Debian windowmanager/display manager question
Faust:
Cool thanks copperhead I'll fix it all up tonight.
Calum:
well, too late to be of any use as usual but here's what i did to achieve the effect of changing from the default gdm to kdm on my ststem.
As i suspected, this is specific to a BSD style init, so those of you with SysV inits will find it slightly different. Edit: just noticed this is for Debian, i think they use SysV style init so this info is not applicable. I run slack 9 though, so a BSD init it is:
find the file /etc/rc.d/rc.4 (if not using BSD init then this is probably a directory containing individual files for each program to be started, if i remember rightly how SysV init works, and a lot of systems use runlevel 5 instead of runlevel 4 for the GUI interface so your mileage will vary) and open it with a text editor such as vi:
quote:#! /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, <[email protected]>
# At least 47% rewritten by: Patrick J. Volkerding <[email protected]>
#
# Tell the viewers what's going to happen...
echo "Starting up X11 session manager..."
# Try to use GNOME's gdm session manager:
#if [ -x /usr/bin/gdm ]; then
# exec /usr/bin/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
fi
# If all you have is XDM, I guess it will have to do:
if [ -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.
--- End quote ---
as you can see all i have done is commented out the lines that look for and start gdm, so the script skips them and goes straight over to using kdm instead. A better (perhaps) solution would have been to put the gdm lines beneath the kdm lines. it all depends on whether you want xdm or gdm to run in the unlikely event that your system suddenly can't find kdm anymore. his has never happened to me so it is moot.
[ May 14, 2003: Message edited by: Calum: hopelessly outnumbered ]
[ May 14, 2003: Message edited by: Calum: hopelessly outnumbered ]
Copperhead:
That is more applicable to BSD style systems. On Debian, what you would want to edit is the directory of symlinks (eg /etc/rc*.d). Since Debian's runlevels differentiate from other Linux distros, what you would want to do is to just symlink a program/script in its respective directory, which is what the update-rc.d utility takes care of.
The only time you would want to physically create symlinks in a run-level directory (this is on Debian) would be if you are running a self-made script that doesn't "exit(0);", or if you have a two-part script that you wrote, or some jerkoff that doesn't know what he is doing wrote (a launcher and a closer.) The /etc/rc*.d directories all point to an executable file in /etc/init.d, so if you are symlinking, make sure you have the script/program in that directory, or a symlink in that directory (/etc/init.d) to where your executable is.
This is all good and dandy, but if you are a noob, save yourself the headache and just use update-rc.d, especially if you are adding daemons, or other compiled binaries.
Calum:
is there any further reading i can do to find out the distinctions between SysV and the Debian method of init you just described? I know a little bit about the BSD style init but would like to gain enough knowledge to be confident in the other two styles too...
Copperhead:
I guess you can search around on Debian's website. The information I posted here just comes from personal experience tinkering with the run-levels, and from reading a few archives on the Debian mailing list.
If you are running Debian, you can look at this file here: /usr/share/doc/debian/FAQ/ch-customizing.html#s-booting
It basically gives you the difference between Debian's boot process than that of another distro's (like Red Hat.) It also explains how Debian's run-levels are different and how you adjust to them.
As far as actual BSD vs Debian information, I guess I will have to look around. I just started messing with FreeBSD a few weeks ago, but I have been so busy I haven't had a whole lot of time to play with it. From what you posted, I gather that the process seems to differ in that BSD uses some hard coded scripts in its run-level directories where Debian has a collection of symlinks that point to binaries in the /etc/init.d directory. If you read that file, it will give you enough information where you will know the difference, since you are already somewhat familiar in the way BSD works.
If you don't have Debian installed, I can post the contents of that file up here for you if you want.
Navigation
[0] Message Index
[*] Previous page
Go to full version