介紹Fedora switchdesk Gnome如何切換到KDE桌面和桌面的互相切換
Fedora有很多值得學(xué)習(xí)的地方,這里我們主要介紹Fedora switchdesk Gnome和KDE桌面切換,等方面。
1.在XWindows環(huán)境中,使用Desktop switch tools來切換。
2.如果是在字符環(huán)境下,用命令switchdesk KDE 或Fedora switchdesk Gnome可以將桌面切換成 KDE 或 Fedora Gnome的。我看了一下,這兩種方式其實(shí)都是在修改$HOME下面的.Xclients-default文件。如果是Gnome, 則文件內(nèi)容為 exec gnome-session 如果是KDE, 則文件內(nèi)容為 exec startkde
小技巧:利用此腳本,你還可以同時(shí)在一臺(tái)機(jī)子的七號(hào)及八號(hào)虛擬控制臺(tái)上運(yùn)行兩個(gè)完全不同的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 ﹥ ◆ 你想使用哪一個(gè)窗口管理器? #'
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 ﹥ 請(qǐng)選擇:'
}
# 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
【編輯推薦】