Sunday 3 June 2007

redhat Display Management

Okay, all important system-wide settings in RH and RH-derived boxen are found in /etc/sysconfig, and possibly some stuff in /etc/X11/ or the /etc/init.d tree. So here we go.

Code:
[root@goldfedora sysconfig]# grep GNOME *
desktop:DESKTOP="GNOME"


A quick edit later:

Code:
[root@goldfedora sysconfig]# grep GNOME *
desktop:DESKTOP="KDE"


Now to go after KDM

Code:
[root@goldfedora sysconfig]# cd /etc/X11
[root@goldfedora X11]# find . -type f -exec grep -H gdm {} \;
./prefdm: preferred=gdm
. . .


Okay, so /etc/X11/prefdm looks like a good starting point. Here's the key section in prefdm:

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


It appears that the change in /etc/sysconfig/desktop may effect both changes for us... not quite: That sets $DESKTOP, but not $DISPLAYMANAGER, so let's go back and edit that...

Code:
[root@goldfedora X11]# cd /etc/sysconfig/
[root@goldfedora sysconfig]# vim desktop
. . .
[root@goldfedora sysconfig]# cat desktop
DESKTOP="KDE"
DISPLAYMANAGER="KDE"


Now to test this theory...

1 comment:

Ka_Ka said...

The year's at the spring,
And day's at the morn;
Morning's at seven;
The hill-side's dew-pearl'd;
The lark's on the wing;
The snail's on the thorn;
God's in His heaven-
All's right with the world!

My photo
London, United Kingdom
twitter.com/zhengxin

Facebook & Twitter