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!
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!