diff options
Diffstat (limited to 'kde-base/kdebase/files/3.2.0_beta1-r1/Xsetup')
-rw-r--r-- | kde-base/kdebase/files/3.2.0_beta1-r1/Xsetup | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/kde-base/kdebase/files/3.2.0_beta1-r1/Xsetup b/kde-base/kdebase/files/3.2.0_beta1-r1/Xsetup new file mode 100644 index 000000000000..427ed61d709b --- /dev/null +++ b/kde-base/kdebase/files/3.2.0_beta1-r1/Xsetup @@ -0,0 +1,36 @@ +#! /bin/sh +# Xsetup - run as root before the login dialog appears + +#xconsole -geometry 480x130-0-0 -notify -verbose -fn fixed -exitOnFail -file /dev/xconsole & + +SESSIONDIR="_PREFIX_/share/config/kdm/sessions" + +session_to_desktop_entry() +{ +SESSION=$1 +SESSIONFILE="/etc/X11/Sessions/${SESSION}" + +if [ ! -d ${SESSIONDIR} ]; then + echo "cannot create ${SESSION}.desktop:" + echo "directory ${SESSIONDIR} does not exist." + return; +fi + +if [ ! -e ${SESSIONDIR}/${SESSION}.desktop ]; then + +cat > "${SESSIONDIR}/${SESSION}.desktop" <<EOF +[Desktop Entry] +Type=XSession +Exec=${SESSIONFILE} +TryExec=${SESSIONFILE} +Name=${SESSION} +EOF + +fi +} + +echo "Creating menu entries for kdm in ${SESSIONDIR}..." + +for i in `ls /etc/X11/Sessions/`; do + session_to_desktop_entry $i +done |