Fedora有很多值得学习的地方,这里我们主要介绍Fedora switchdesk Gnome和KDE桌面切换,等方面。
1.在XWindows环境中,使用Desktop switch tools来切换。
2.如果是在字符环境下,用命令switchdesk KDE 或Fedora switchdesk Gnome可以将桌面切换成 KDE 或 Fedora Gnome的。我看了一下,这两种方式其实都是在修改$HOME下面的.Xclients-default文件。如果是Gnome, 则文件内容为 exec gnome-session 如果是KDE, 则文件内容为 exec startkde
小技巧:利用此脚本,你还可以同时在一台机子的七号及八号虚拟控制台上运行两个完全不同的X-Window Manager。
xwin脚本清单:
#!/bin/sh
#
# xwin This script display a text menu and allow you to select
# which X-Window Manager you want to use
# Author: Lanche , < lanche@163.com >
#
# Backcup your $HOME/.xinirtc file while run this
# script first time
#
if [ -f $HOME/.xinitrc~ ];then
echo
else
cp $HOME/.xinitrc $HOME/.xinitrc~
fi
#
# Functions
#
writerc( ) {
tee $HOME/.xinitrc << RCFILE
#!/bin/sh
#
# This file writed by the xwin script
#
# Start-up items from ~/Desktop/Autostart
#
for i in \$(ls \$HOME/Desktop/Autostart/); do
if test -x \$HOME/Desktop/Autostart/\$i; then
\$HOME/Desktop/Autostart/\$i &
fi
done
#
# And launch window manager
#
RCFILE
}
#
getchose( ) {
clear
echo
echo
echo
echo
echo
echo
echo ﹥ ◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆
echo ﹥ ◆ ◆'
echo ﹥ ◆ 你想使用哪一个窗口管理器? #'
echo ﹥ ◆ #'
echo ﹥ ◆ #'
echo ﹥ ◆ 1 --- kde #'
echo ﹥ ◆ 2 --- xfce #'
echo ﹥ ◆ 3 --- icewm #'
echo ﹥ ◆ 4 --- mlvwm #'
echo ﹥ ◆ 5 --- Fvwm95 #'
echo ﹥ ◆ 6 --- AfterStep #'
echo ﹥ ◆ #'
echo ﹥ ◆ #'
echo ﹥ ◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆
echo
echo -n ﹥ 请选择:'
}
# End of Functions
#
getchose
read CHOSE
#
#Start the selected X-window manager
#
case $CHOSE in
1) echo 'You chosed kde'
if [ -f `which kde` ];then
writerc
echo 'startkde' >> $HOME/.xinitrc
echo 'Starting kde...'
startx
else
echo 'KDE is not installed on your system!'
fi
;;
2) echo 'You chosed xfce'
if [ -f `which xfce` ];then
writerc
echo 'exec xfwm' >> $HOME/.xinitrc
echo 'Starting xfce...'
startx
else
echo 'XFCE is not installed on your system!'
fi
;;
3) echo 'You chosed icewm'
if [ -f `which icewm` ];then
writerc
echo 'xsetbg -onroot /root/wall.jpg &' >> $HOME/.xinitrc
echo 'exec icewm' >> $HOME/.xinitrc
echo 'Starting icewm...'
startx
else
echo 'Icewm is not installed on your system!'
fi
;;
4) echo 'You chosed mlvwm'
if [ -f `which mlvwm` ];then
writerc
echo 'cd /usr/X11R6/lib/X11/mlvwm' >> $HOME/.xinitrc
echo 'xsetbg -onroot /usr/X11R6/lib/X11/mlvwm/mac.jpg &'>> $HOME/.xinitrc
echo 'exec mlvwm' >> $HOME/.xinitrc
echo 'Starting mlvwm...'
startx
else
echo 'Mlvwm is not installed on your system!'
fi
;;
5) echo 'You chosed fvwm95'
if [ -f `which fvwm95` ];then
writerc
echo 'exec fvwm95' >> $HOME/.xinitrc
echo 'Starting fvwm95...'
startx
else
echo 'fvwm95 is not installed on your system!'
fi
;;
6) echo 'You chosed AfterStep'
if [ -f `which afterstep` ];then
writerc
echo 'exec afterstep' >> $HOME/.xinitrc
echo 'Starting AfterStep...'
startx
else
echo 'AfterStep is not installed on your system!'
fi
;;
*)
echo 'No one was chosed.'
esac
#
exit 0
#
# End of the script
Fedora switchdesk Gnome
【编辑推荐】