全部文章 | 论坛文集

作者: sniff007   发表日期: 2007-01-10 14:24   复制链接




默认的窗口管理器是metacity
现在我将把它换为enlightenment

由于gnome-wm脚本使得切换窗口管理器很不方便,故发此文

#apt-get install enligntenment

编辑/usr/bin/gnome-wm,修改

if ! which "$WINDOW_MANAGER" > /dev/null; then
# Get --default-wm
if which "$DEFWM" > /dev/null; then
  WINDOW_MANAGER=$DEFWM
  if [ "$WINDOW_MANAGER" = x-window-manager ]; then
    WINDOW_MANAGER=`readlink /etc/alternatives/x-window-manager 2>/dev/null`
  fi
# if nothing is found, first use metacity
elif [ -x /usr/bin/metacity ]; then
  WINDOW_MANAGER=/usr/bin/metacity
elif [ -x /usr/bin/sawfish ]; then
  WINDOW_MANAGER=/usr/bin/sawfish
else
  WINDOW_MANAGER=`readlink /etc/alternatives/x-window-manager 2>/dev/null`
fi
fi



if ! which "$WINDOW_MANAGER" > /dev/null; then
# Get --default-wm
if which "$DEFWM" > /dev/null; then
  WINDOW_MANAGER=$DEFWM
  if [ "$WINDOW_MANAGER" = x-window-manager ]; then
    WINDOW_MANAGER=`readlink /etc/alternatives/x-window-manager 2>/dev/null`
  fi
# if nothing is found, first use metacity
# elif [ -x /usr/bin/metacity ]; then
#   WINDOW_MANAGER=/usr/bin/metacity
# elif [ -x /usr/bin/sawfish ]; then
#   WINDOW_MANAGER=/usr/bin/sawfish
else
  WINDOW_MANAGER=`readlink /etc/alternatives/x-window-manager 2>/dev/null`
fi
fi

回到命令行执行
#update-alternatives --config x-window-manager

There are 2 alternatives which provide `x-window-manager'.

Selection   Alternative
-----------------------------------------------
*       1   /usr/bin/metacity
+     2   /usr/bin/enlightenment

Press enter to keep the default
  • , or type selection number:

    选择你想用的窗口管理器,注销重新登陆看看效果


  • 阅读全文(2003) 回复(1) 推送返回 sniff007 的主页



     
        文章评论 共1条回复
          skywind
    2007-01-10 16:59

    不错!最好能把/usr/bin/gnome-wm修改前后做一个diff,这样看的清楚,或者把变化的地方用不同的颜色标识出来。

    返回