Kernel_Killer
January 29th, 2003, 21:10
Here's how to make to where you can choose DEs from KDM in FreeBSD.

Start out by going into the KDE control panel, and go into System > Login Manager > Sessions, and add the names of the DEs you want to show on the list in KDM. (i.e. fluxbox, Ion, KDE, enlightenment, etc.)

After adding the environments, go into /usr/X11R6/lib/X11/xdm/ , and open the 'Xsession' file. You will most likely see:

[code:1:8a84c66ee9]
#!/bin/sh
#
# $Xorg: Xsession,v 1.4 2000/08/17 19:54:17 cpqbld Exp $
#
#
#
#
# $XFree86: xc/programs/xdm/config/Xsession,v 1.3 2001/01/17 23:45:24 dawes Exp $

# 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

case $# in
1)
case $1 in
failsafe)
exec xterm -geometry 80x24-0-0
;;

# The startup script is not intended to have arguments.
[/code:1:8a84c66ee9]

The rest behind is not needed, and there will be spaces that will be needed, but cannot be shown.

After the ";;" in the "failsafe" section, add the name of your first DE you want to add, and then the executable like so:

[code:1:8a84c66ee9]

failsafe)
exec xterm -geometry 80x24-0-0
;;
enlightenment)
exec enlightenment
;;

[/code:1:8a84c66ee9]

Piece of cake. Make sure that the name of the section matches the entry in the KDE control center EXACTLY.

You can also point to a script instead of using an executable.

[code:1:8a84c66ee9]

Ion)
exec /usr/X11R6/lib/X11/xdm/sessions/Ion.session
;;

[/code:1:8a84c66ee9]

Use this if you want more than one thing to start when you start your DE. Just to give an example, here's a full portion of the Xsession file.

[code:1:8a84c66ee9]

case $# in
1)
case $1 in
failsafe)
exec xterm -geometry 80x24-0-0
;;
enlightenment)
exec enlightenment
;;
fluxbox)
exec /usr/X11R6/lib/X11/xdm/fluxbox.session
;;
Ion)
exec ion
;;
esac
esac

[/code:1:8a84c66ee9]

For a breakdown of how the Xsession file is working, I'll point out the parts you need to know.

[code:1:8a84c66ee9]
fluxbox)
[/code:1:8a84c66ee9]

This is the name of the session. This name NEEDS to match the session name you made in the KDE Control Panel exactly.

[code:1:8a84c66ee9]

exec start-kde
;;

[/code:1:8a84c66ee9]

Here is your execution. Here it shows that the session that it's below is going to execute 'start-kde'.

[code:1:8a84c66ee9]

esac
esac

[/code:1:8a84c66ee9]

This is the ending of your code. This is only showing the end of the session section. This will already be there by default. Make sure that no sessions are after these 2 lines.

Hope this helps. :D

Enjoy!

soup4you2
January 30th, 2003, 11:27
verry nice.......

elmore
January 30th, 2003, 11:47
awesome KK thanks for your effort.

Strog
January 30th, 2003, 13:21
Where's the exec twm option?

Bah, you with your fancy window managers. 8)

I see that you are mostly a minimalist there. Some might argue about Enlightenment being minimal but it is compared to the likes of KDE and Gnome. Ion is not much bigger than twm and it is nicer. Need to spend more time with it.

I know that setting up sessions in kdm/gdm was a pain when I first started messing with it in FreeBSD. Good job at posting some good info for people, Kernel_Killer

Can you feel this?

Kernel_Killer
January 31st, 2003, 10:03
heh. When I do the gdm HOW-TO, I'll add twm for ya Strog. :wink:

PPCLuke
February 18th, 2003, 00:13
looks like it'd be helpful, but I'm having trouble distinguishing the code from the instructions... I really can't make any sense of it at all...

Kernel_Killer
February 18th, 2003, 01:38
Go into KDE from your prompt first, like it says, and add the session. Then you have to edit the file /usr/X11R6/etc/xdm/Xsession . Don't let the code overwhelm you. You just need to add a new session with the same name as the name you gave the session you made in the KDE Control Panel. Lemme update the original post in hopes that it will help.

PPCLuke
February 18th, 2003, 09:22
thanks A LOT, now I know how to do it, I'll have to check that out after work, ...if only I could get more than 8bbp...

schotty
February 18th, 2003, 14:40
thanks A LOT, now I know how to do it, I'll have to check that out after work, ...if only I could get more than 8bbp...

Ouch!!

8 bpp --- damn, its been a while since I had to deal with that!

elmore
February 18th, 2003, 15:02
Scotty, you're alive! Damn it's been a while.... How are you?