Click to See Complete Forum and Search --> : FC3 GDM annoyance.
Fenster
12-06-2004, 07:32 PM
This is more of an annoyance problem-Fluxbox works perfectly, but everything I've tried so far to set it as my default WM after I log in has failed-it simply logs in Gnome.
I've covered all of the obvious methods so far:
I create .xsession and .xinitrc files for the root and regular user:
exec /usr/bin/fluxbox
This doesn't work, although normally it does.
Next I try the /etc/sysconfig/desktop file:
DESKTOP="FLUXBOX"
DISPLAYMANAGER="FLUXBOX"
That also fails.
Lastly, I try /etc/X11/dm/Sessions/default.desktop
However, this gives me a message that its logging me into the failsafe Gnome WM.
I can pick Fluxbox from the list everytime I log on, but as you'd imagine, I find this incredibly annoying.
Anyone have any idea what I'm missing? :confused:
bsm2001
12-06-2004, 07:55 PM
check /etc/X11/prefdm
#!/bin/sh
PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin
HOME=/root
export HOME
# We need to source this so that the login screens get translated
[ -f /etc/profile.d/10lang.sh ] && . /etc/profile.d/10lang.sh
# trap SIGTERM to be able to kill autologin
killed () {
kill -15 $!
exit
}
trap killed 15
# Run preferred X display manager
# Try autologin first, if wanted...
if [ -f /etc/sysconfig/autologin -a -x /usr/sbin/autologin ]; then
. /etc/sysconfig/autologin
if [ -n "$USER" -a "$AUTOLOGIN" = yes ]; then
/usr/sbin/autologin &
echo -n $$ > /var/lock/subsys/dm
wait $!
fi
fi
# we have to assume that /etc/sysconfig/desktop has two variables, DESKTOP
# and DISPLAYMANAGER because administors may prefer a specific DM regardless
# of desktops.
# DISPLAYMANAGER is referenced by this script, and DESKTOP is referenced
# as system-wide default by /etc/X11/Xsession script only when X-session
# is opened by "startx" command.
# when DMs open an X-session, they send DESKTOP, which is in this case
# directly selected by users, as a commandline argument of /etc/X11/Xsession.
# actually Xsession script is only able to know by existance of its first
# argument whether it is called by DM or "startx". see the logic
# in /etc/X11/Xsession.
# If DISPLAYMANAGER is not defined, then assume that it is the same as DESKTOP
preferred=kdm
if [ -f /etc/sysconfig/desktop ]; then
. /etc/sysconfig/desktop >/dev/null 2>&1
[ -z "$DISPLAYMANAGER" ] && DISPLAYMANAGER=$DESKTOP
if [ "$DISPLAYMANAGER" = "GDM" -o "$DISPLAYMANAGER" = "gdm" -o "$DISPLAYMANAGER" = "GNOME" -o "$DISPLAYMANAGER" = "gnome" -o "$DISPLAYMANAGER" = "Gnome" ]; then
preferred=gdm
elif [ "$DISPLAYMANAGER" = "KDE" -o "$DISPLAYMANAGER" = "kde" ]; then
preferred=mdkkdm
elif [ "$DISPLAYMANAGER" = "KDM" -o "$DISPLAYMANAGER" = "kdm" ]; then
preferred=kdm
elif [ "$DISPLAYMANAGER" = "XDM" -o "$DISPLAYMANAGER" = "xdm" ] ; then
preferred=xdm
fi
fi
# xdm-like program are launched from the console, however, the locale-setting
# can be done in a way that console is not localize, while X11 is.
# That is handled by the lang.sh script, depending on the existance of
# $DISPLAY or $DESKTOP variable. Now that $DESKTOP is defined resource lang.sh
[ -z "$DESKTOP" ] && DESKTOP=dummy_DESKTOP_variable
. /etc/profile.d/10lang.sh
[ "$DESKTOP" = "dummy_DESKTOP_variable" ] && unset DESKTOP
if [ -z "$preferred" ] || ! which $preferred >/dev/null 2>&1; then
if which mdkkdm >/dev/null 2>&1; then
preferred=mdkkdm
elif which kdm >/dev/null 2>&1; then
preferred=kdm
elif which gdm >/dev/null 2>&1; then
preferred=gdm
elif which xdm >/dev/null 2>&1; then
preferred=xdm
fi
fi
if [ -n "$preferred" ]; then
`which $preferred` -nodaemon $* >/dev/null 2>&1 &
echo -n $! > /var/lock/subsys/dm
fi
exit 0
cant stand MDKKDM
Fenster
12-06-2004, 08:37 PM
Well here's mine verbatim, I'm not sure what I need to change.
#!/bin/sh
PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin
# shut down any graphical boot that might exist
if [ -x /usr/bin/rhgb-client ]; then
/usr/bin/rhgb-client -quit
fi
# We need to source this so gthat the login screens get translated
[ -f /etc/profile.d/lang.sh ] && . /etc/profile.d/lang.sh
# Run preferred X display manager
preferred=
if [ -f /etc/sysconfig/desktop ]; then
. /etc/sysconfig/desktop
if [ "$DISPLAYMANAGER" = GNOME ]; then
preferred=gdm
elif [ "$DISPLAYMANAGER" = KDE ]; then
preferred=kdm
elif [ "$DISPLAYMANAGER" = XDM ]; then
preferred=xdm
fi
fi
shopt -s execfail
[ -n "$preferred" ] && exec $preferred $* >/dev/null 2>&1
# Fallbacks, in order
exec gdm $* >/dev/null 2>&1
exec kdm $* >/dev/null 2>&1
exec xdm $* >/dev/null 2>&1
# catch all exit error
exit 1