blob: 427ed61d709b10c9add674292619d7db162f0e14 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
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
|