TITLE: How to login into a WM using KDM LFS VERSION: any KDE VERSION: 2.2(.2) AUTHORS: Remy Bosch SYNOPSIS: How to successfully login into a WM using KDM HINT: If we want to tell kdm what to start, we choose our favorite WM and klik on [Go!]. The problem is that you might get a standard WM from XFree86. Also the chosen background for kdm does not apear with some people (like me). Let's fix it. First we go to /opt/kde/share/config/kdm/kdmrc (if kde was installed in /opt/kde just look at the prefix during installation). There we change /usr/X11R6/lib/X11/xdm/ into /etc/X11/xdm/ . This way we control kdm in looking at the right files... Next we change the files used by kdm... Xsession, Xsetup_0, XSESSION We can have the following in /etc/X11/xdm/Xsession -----begin-snip----- # Begin /etc/X11/xdm/Xsession #!/bin/sh # First get all options... source /etc/profile # redirect errors to a file in user's home directory if we can... for errfile in "$HOME/.xsession-errors" "${TMPDIR-/tmp}/xses-$USER" "/tmp/xses-$USER" do if ( cp /dev/null "$errfile" 2> /dev/null ) then chmod 600 "$errfile" exec > "$errfile" 2>&1 break fi done # This is for the options. Feel free to add/change ;-) case $# in 1) case $1 in kde) exec startkde ;; wmaker) exec wmaker ;; failsafe) exec xterm -geometry 80x24-0-0 ;; esac esac # End /etc/X11/xdm/Xsession -----end-snip----- XSETUP_0 Because kdmdesktop is not automagicaly started by kdm, we help it an hand with /etc/X11/xdm/Xsetup_0 This is what I got... -----begin-snip----- # Begin /etc/X11/xdm/Xsetup_0 # First the background :-P /opt/kde/bin/kdmdesktop # Then the console for occasional errors... xconsole -geometry 480x130-0-0 -daemon -notify \ -verbose -fn fixed -exitOnFail # End /etc/X11/xdm/Xsetup_0 -----end-snip----- XACCESS If you want to log in from an other computer (Remote X), you can add a IP number or hostname that is allowed to use remote X in /etc/X11/xdm/Xaccess. If someone can say how to get a nice root-image like the local login, please tell!! IF ALL IS WELL... When everything works as it should, you can started automaticly. This can be done by a script from /etc/init.d or we add a line in /etc/inittab. IMHO I don't care much about what runlevel should(not) be used. Though people say it should be runlevel "5". So the line to be added would be like: ----------- x:5:respawn:/where/kdm/is/kdm -nodaemon ----------- This way you won't get the annoying line like; "respawning too fast" ;-) REMOTE CLIENT To get the wanted loginscreen just run : X -query 192.168.99.2 &> /dev/null & This way X is started and files one request for a loginscreen. And presto! There is your server-power on a small PC ;-) REQUESTS If someone can say how to get a nice root-image like the local login, please tell!!! HAVE FUN !!! This should do the trick. Have fun!