|
已经参考了下贴做了设置:
http://www.linuxfans.org/nuke/mo ... 5&highlight=gdm
但是在gdm管理器中还是不能看见新的选项,始终只有gnome,默认两项。
/etc/X11/gdm/Sessions 的目录中有如下文件和内容:fvwm gnome xfce
fvwm:
...........................................................
#!/bin/bash
exec /etc/X11/xdm/Xsession fvwm2
............................................................
xfce:
#!/bin/sh
exec /etc/X11/xdm/Xession xfce4
............................................................
gnome:
#!/bin/bash
exec /etc/X11/xdm/Xsession gnome
另/etc/X11/xdm/Xsession的内容如下:
#!/bin/bash
# Copyright (c) 1999-2002 Red Hat, Inc.
# redirect errors to a file in user's home directory if we can
if [ -z "$GDMSESSION" ]; then
# GDM redirect output itself in a smarter fashion
errfile="$HOME/.xsession-errors"
if cp /dev/null "$errfile" 2> /dev/null ; then
chmod 600 "$errfile"
exec > "$errfile" 2>&1
else
errfile=`mktemp -q /tmp/xses-$USER.XXXXXX`
if [ $? -eq 0 ]; then
exec > "$errfile" 2>&1
fi
fi
fi
if ! printenv PATH | grep -q /usr/X11R6/bin
then
PATH="${PATH}":/usr/X11R6/bin
fi
xsetroot -solid '#20305A'
userresources=$HOME/.Xresources
usermodmap=$HOME/.Xmodmap
userxkbmap=$HOME/.Xkbmap
sysresources=/etc/X11/Xresources
sysmodmap=/etc/X11/Xmodmap
sysxkbmap=/etc/X11/Xkbmap
# merge in defaults
if [ -f "$sysresources" ]; then
xrdb -merge "$sysresources"
fi
if [ -f "$userresources" ]; then
xrdb -merge "$userresources"
fi
# merge in keymaps
if [ -f "$sysxkbmap" ]; then
setxkbmap $(cat "$sysxkbmap")
XKB_IN_USE=yes
fi
if [ -f "$userxkbmap" ]; then
setxkbmap $(cat "$userxkbmap")
XKB_IN_USE=yes
fi
if [ -z "$XKB_IN_USE" -a ! -L /etc/X11/X ]; then
if grep '^exec.*/Xsun' /etc/X11/X > /dev/null 2>&1 && [ -f /etc/X11/XF86Config ]; then
xkbsymbols=`sed -n -e 's/^[ ]*XkbSymbols[ ]*"\(.*\)".*$/\1/p' /etc/X11/XF86Config`
if [ -n "$xkbsymbols" ]; then
setxkbmap -symbols "$xkbsymbols"
XKB_IN_USE=yes
fi
fi
fi
# xkb and xmodmap don't play nice together
if [ -z "$XKB_IN_USE" ]; then
if [ -f "$sysmodmap" ]; then
xmodmap "$sysmodmap"
fi
if [ -f "$usermodmap" ]; then
xmodmap "$usermodmap"
fi
fi
unset XKB_IN_USE
# run all system xinitrc shell scripts.
for i in /etc/X11/xinit/xinitrc.d/* ; do
if [ -x "$i" ]; then
. "$i"
fi
done
# is ssh-agent available?
SSHAGENT=
[ -x /usr/bin/ssh-agent ] && SSHAGENT="/usr/bin/ssh-agent"
# now, we see if xdm/gdm/kdm has asked for a specific environment
case $# in
1)
if [ -x "/usr/share/apps/switchdesk/Xclients.$1" ]; then
exec -l $SHELL -c "$SSHAGENT /usr/share/apps/switchdesk/Xclients.$1";
fi;
case "$1" in
failsafe)
exec -l $SHELL -c "xterm -geometry 80x24-0-0"
;;
gnome)
exec -l $SHELL -c "$SSHAGENT gnome-session"
;;
fvwm2)
exec -l $SHELL -c "$SSHAGENT /usr/share/apps/switchdesk/Xclients.fvwm"
;;
xfce4)
exec -l $SHELL -c "$SSHAGENT /usr/share/apps/switchdesk/Xclients.xfce"
;;
kde|kde1|kde2)
exec -l $SHELL -c "$SSHAGENT /usr/share/apps/switchdesk/Xclients.kde"
;;
twm)
# fall back to twm
exec -l $SHELL -c "$SSHAGENT /usr/share/apps/switchdesk/Xclients.twm"
;;
*)
# GDM provies either a command line as the first argument or
# provides 'failsafe', 'default' or 'custom'. KDM will do the
# same at some point
if [ -n "$GDMSESSION" -a "$1" != "default" -a "$1" != "custom" ]; then
exec -l $SHELL -c "$SSHAGENT $1"
fi
;;
esac
esac
# otherwise, take default action
if [ -x "$HOME/.xsession" ]; then
exec -l $SHELL -c "$SSHAGENT $HOME/.xsession"
elif [ -x "$HOME/.Xclients" ]; then
exec -l $SHELL -c "$SSHAGENT $HOME/.Xclients"
elif [ -x /etc/X11/xinit/Xclients ]; then
exec -l $SHELL -c "$SSHAGENT /etc/X11/xinit/Xclients"
else
# should never get here; failsafe fallback
exec -l $SHELL -c "xsm"
fi
红色部分为自己增加,不知对不对.. |
|