All you have to do is make sure you have a proper xinitrc.gnome file.
There's no need to change anything in /usr/sbin/xmconfig, that has been for ages and still is able to pick it if available:
Code:
# Add KDE as the first and default entry:
if [ -r $T_PX/etc/X11/xinit/xinitrc.kde ]; then
echo "\"xinitrc.kde\" \"`gettext "KDE: K Desktop Environment"`\" \\" >> $TMP/tmpscript.sh
fi
# Then, we add GNOME:
if [ -r $T_PX/etc/X11/xinit/xinitrc.gnome ]; then
echo "\"xinitrc.gnome\" \"`gettext "GNU Network Object Model Environment"`\" \\" >> $TMP/tmpscript.sh
fi
# Add XFce:
if [ -r $T_PX/etc/X11/xinit/xinitrc.xfce ]; then
echo "\"xinitrc.xfce\" \"`gettext "The Cholesterol Free Desktop Environment"`\" \\" >> $TMP/tmpscript.sh
fi
# Add Enlightenment:
if [ -r $T_PX/etc/X11/xinit/xinitrc.e ]; then
echo "\"xinitrc.e\" \"`gettext "Enlightenment"`\" \\" >> $TMP/tmpscript.sh
fi
# Add Fluxbox:
if [ -r $T_PX/etc/X11/xinit/xinitrc.fluxbox ]; then
echo "\"xinitrc.fluxbox\" \"`gettext "The fluxbox window manager"`\" \\" >> $TMP/tmpscript.sh
fi
# Add Blackbox:
if [ -r $T_PX/etc/X11/xinit/xinitrc.blackbox ]; then
echo "\"xinitrc.blackbox\" \"`gettext "The blackbox window manager"`\" \\" >> $TMP/tmpscript.sh
fi
# Add WindowMaker:
if [ -r $T_PX/etc/X11/xinit/xinitrc.wmaker ]; then
echo "\"xinitrc.wmaker\" \"`gettext "WindowMaker"`\" \\" >> $TMP/tmpscript.sh
fi
# Add FVWM2:
if [ -r $T_PX/etc/X11/xinit/xinitrc.fvwm2 ]; then
echo "\"xinitrc.fvwm2\" \"`gettext "F(?) Virtual Window Manager (version 2.xx)"`\" \\" >> $TMP/tmpscript.sh
fi
# Add FVWM95:
if [ -r $T_PX/etc/X11/xinit/xinitrc.fvwm95 ]; then
echo "\"xinitrc.fvwm95\" \"`gettext "FVWM2 with a Windows look and feel"`\" \\" >> $TMP/tmpscript.sh
fi
# Add icewm:
if [ -r $T_PX/etc/X11/xinit/xinitrc.icewm ]; then
echo "\"xinitrc.icewm\" \"`gettext "ICE Window Manager"`\" \\" >> $TMP/tmpscript.sh
fi
# Add sawfish:
if [ -r $T_PX/etc/X11/xinit/xinitrc.sawfish ]; then
echo "\"xinitrc.sawfish\" \"`gettext "Sawfish without GNOME"`\" \\" >> $TMP/tmpscript.sh
fi
# Add twm:
if [ -r $T_PX/etc/X11/xinit/xinitrc.twm ]; then
echo "\"xinitrc.twm\" \"`gettext "Tab Window Manager (very basic)"`\" \\" >> $TMP/tmpscript.sh
fi
# Add mwm:
if [ -r $T_PX/etc/X11/xinit/xinitrc.mwm ]; then
echo "\"xinitrc.mwm\" \"`gettext "Motif WM"`\" \\" >> $TMP/tmpscript.sh
fi
As you see, xwmconfig is ready to host no less than 13 "registered" windows managers (and it's not difficult to edit that script to add more)
Also, you can add as many "non registered" WMs as you want to xwmconfig's menu if your provide relevant xinit.* files. You'll just miss the description then:
Code:
# Now, add support for the other window managers:
( cd $T_PX/etc/X11/xinit
for file in xinitrc.* ; do
if [ ! "$file" = "xinitrc.kde" -a ! "$file" = "xinitrc.gnome" \
-a ! "$file" = "xinitrc.e" -a ! "$file" = "xinitrc.wmaker" \
-a ! "$file" = "xinitrc.fvwm2" -a ! "$file" = "xinitrc.fvwm95" \
-a ! "$file" = "xinitrc.icewm" -a ! "$file" = "xinitrc.twm" \
-a ! "$file" = "xinitrc.mwm" -a ! "$file" = "xinitrc.xfce" \
-a ! "$file" = "xinitrc.blackbox" -a ! "$file" = "xinitrc.fluxbox" \
-a ! "$file" = "xinitrc.sawfish" ]; then
echo "\"$file\" \"$file\" \\" >> $TMP/tmpscript.sh
fi
done
)
PS Sorry I mistakenly copied the code from Slint's internationalized xwmconfig. That doesn't change the logic at all though.
PPS xwmconfig is a sample of KISS design, applying the equation:
Less work for the maintainer + Easy adaptation by the user = Slackware