(本来是贴在linuxsir的,现在挪过来)
--------------------------------------------------------------------------------
如题。原来在hiweed1.0上装了imagemagic以后不能用xgl了,装上beryl也不能用,最近发现原来是xfce4根本就启动不起来(因为我平时用fvwm,所以没有发现这一点)。看了一下错误报告,总说是在~/.config/.xfce4/下缺一个文件。原以为是高本版的xfce4和以前版本的有区别,可是没有见到大家有类似的错误报告,于是确定是hiwwed的问题。在fvwm中启动xfce4-session可以运行,说明是gdm启动xfce4时有问题。找了找,发现/usr/bin/startxfce4和/usr/bin/startxfce4xgl.sh这两个脚本是gdm启动xfce4和带xgl的xfce4所用的脚本,而且,这两个脚本作者是花花同学~~~
把两个脚本里的内容换成
代码:
exec xfce4-session
就可以正常起动xfce4了,beryl也可以正常运行
请有类似问题的同学参考一下,
另外,这两个脚本是做什么用的??请懂shell的人帮着看看。
还有一个问题,我怎么才能让beryl自动运行呢??每回我都是进入xfce4后又输入的beryl和beryl-manager启动。。。
两个脚本代码如下:
代码: 全选
#/usr/bin/startxfce4:
#!/bin/sh
#
# xfce4
#
# Copyright (C) 1996-2003 Olivier Fourdan (fourdan@xfce.org)
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
if test x"$XDG_CONFIG_HOME" = x""
then
BASEDIR=$HOME/.config/xfce4/
else
BASEDIR=$XDG_CONFIG_HOME/xfce4
fi
if test x"$XDG_DATA_DIRS" = x""
then
XDG_DATA_DIRS="/etc/xdg/xubuntu:/usr/share:/usr/local/share:/usr/share"
else
XDG_DATA_DIRS="$XDG_DATA_DIRS:/usr/share"
fi
export XDG_DATA_DIRS
if test x"$DISPLAY" = x""
then
echo "$0: Starting X server"
prog=xinit
else
echo "$0: X server already running on display $DISPLAY"
prog=/bin/sh
fi
if [ -f $BASEDIR/xinitrc ]; then
exec $prog $BASEDIR/xinitrc $*
elif [ -f $HOME/.xfce4/xinitrc ]; then
mkdir -p $BASEDIR
cp $HOME/.xfce4/xinitrc $BASEDIR/
exec $prog $BASEDIR/xinitrc $*
else
exec $prog /etc/xdg/xfce4/xinitrc $*
fi
代码: 全选
#/usr/bin/startxfce4xgl.sh:
#!/bin/bash -v
#
# start a Xgl session
#
# Author: huangjiahua
#
# Depends: compiz compiz-plugins cgwd cgwd-themes xserver-xgl xfce4 metacity compiz-manager csm libgl1-mesa libglitz-glx1
Xgl -fullscreen :3 -ac &
Xgl -fullscreen :3 -ac -accel glx:pbuffer -accel xv:pbuffer -dpi 96 &
export DISPLAY=:3
sleep 2s
## xmodmap end Xresources
/usr/bin/xmodmap /usr/share/apps/kxkb/ubuntu.xmodmap || true
/usr/bin/xmodmap -e "keycode 22 = BackSpace" # for shift + Backspace
/usr/bin/xrdb -merge ~/.Xresources || xmessage xrdb ~/.Xresources failed &
## about Xsession.d
#for i in /etc/X11/Xsession.d/* ; do
# source $i
#done
. /etc/X11/Xsession.d/*im-switch || xmessage . /etc/X11/Xsession.d/*im-switch failed &
## launch fcitx
#export XMODIFIERS=@im=SCIM ; fcitx || scim -d
domycompiz(){
## for the drivers bug
export LD_PRELOAD=/usr/lib/libGL.so.1.2
#xfwm4 &
sleep 5s
killall xfwm4
## about compiz-manager
( pidof compiz-manager || compiz-manager || compiz --replace dbus csm ) &
sleep 1s
# compiz --replace dbus csm
## launch cgwd
sleep 1s
mkdir -p ~/.cgwd/theme
dbus-launch cgwd --replace &
}
domycompiz &
#xfce4-panel
#startxfce4
xfce4-session
# unlock
rm -f /tmp/.X3-lock /tmp/.X11-unix/X3