Fedora notes

Friday, February 11, 2005

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
if [ -f /etc/sysconfig/desktop ]; then
. /etc/sysconfig/desktop
if [ "$DESKTOP" = "GNOME" ]; then
elif [ "$DESKTOP" = "KDE" ]; then
elif [ "$DESKTOP" = "XFCE" ]; then

2. /etc/sysconfig/desktop: if you are careful enough, you will find out this file that needs modification too.

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 :))


Post a Comment

<< Home