Make Xfce4.2 Default
My installation of xfce4.2 (rpm/fc3) does not make itself a defaultable desktop session in gdm. That is, I can choose Xfce to login but it never becomes default. I don't know how to activate gdm to change the default session, but just find out a little modification over two files to change the default session manually, though my hands get a little dirty :p and hope it's not messing around.
1. /etc/X11/xinit/Xclients : this file is invoked in /etc/X11/xinit/xinitrc, which handles the default action on session selection. to add xfce4 as default session options, modify the file as follows:
# check to see if the user has a preferred desktop
PREFERRED=
if [ -f /etc/sysconfig/desktop ]; then
. /etc/sysconfig/desktop
if [ "$DESKTOP" = "GNOME" ]; then
PREFERRED=gnome-session
elif [ "$DESKTOP" = "KDE" ]; then
PREFERRED=startkde
elif [ "$DESKTOP" = "XFCE" ]; then
PREFERRED=startxfce4
fi
fi
2. /etc/sysconfig/desktop: if you are careful enough, you will find out this file that needs modification too.
DESKTOP="XFCE"
Concluding remarks: it's also quite easy to switch to other desktop later. only modifying the /etc/sysconfig/desktop will do. but i wonder if any one-time change can activate gdm to be aware of saving default sessions when user explicity switches ...
(Update: there is a command for this "switchdesk [KDE/GNOME/XFce/...]". It simply creates two files ~/.Xclients and ~/.Xclients-default that will take over the control of /etc/X11/xinit/.Xclients :))
1. /etc/X11/xinit/Xclients : this file is invoked in /etc/X11/xinit/xinitrc, which handles the default action on session selection. to add xfce4 as default session options, modify the file as follows:
# check to see if the user has a preferred desktop
PREFERRED=
if [ -f /etc/sysconfig/desktop ]; then
. /etc/sysconfig/desktop
if [ "$DESKTOP" = "GNOME" ]; then
PREFERRED=gnome-session
elif [ "$DESKTOP" = "KDE" ]; then
PREFERRED=startkde
elif [ "$DESKTOP" = "XFCE" ]; then
PREFERRED=startxfce4
fi
fi
2. /etc/sysconfig/desktop: if you are careful enough, you will find out this file that needs modification too.
DESKTOP="XFCE"
Concluding remarks: it's also quite easy to switch to other desktop later. only modifying the /etc/sysconfig/desktop will do. but i wonder if any one-time change can activate gdm to be aware of saving default sessions when user explicity switches ...
(Update: there is a command for this "switchdesk [KDE/GNOME/XFce/...]". It simply creates two files ~/.Xclients and ~/.Xclients-default that will take over the control of /etc/X11/xinit/.Xclients :))
0 Comments:
Post a Comment
<< Home