Wiki: Beryl light your desktop
2007/1/3
Beryl是一个独立的wm,它可以使用xgl,aiglx作为Composite的后段。现在gentoo 现在已经把Beryl融入了portage树,所以现在不再需要导入其他的overlay就可以 使用它了。
首先设置一下make.conf
#在USE中添加aiglx项目
USE="... aiglx"
#设置显卡驱动和输入设备类型
VIDEO_CARDS=" radeon vesa"
INPUT_DEVICES=" keyboard mouse"
需要安装的软件只有两个:
升级到xorg7.1,其中已经包含了aiglx
emerge --update xorg-x11 xorg-server
之所以要升级xorg,其中的关键部分一在于显卡驱动,二在于aiglx。注意你的显 卡是否被源码开放驱动所支持。可以查看这里的列表: http://gentoo-wiki.com/HOWTO_AIGLX#Cards_Supported 我的显卡是FireGL 9000 mobile,是在支持之列的(注意,一定是开放的驱动, 如果安装ati-drivers这样的闭源驱动是无法打开aiglx的).如果你的显卡太新,或者太 旧,不在这个列表中。那么可以选择各自的驱动,然后另外安装XGL支持。
编译beryl
emerge -va libwnck beryl
这里是具体列表
x11-base/xorg-x11-7.1
x11-base/xorg-server-1.1.1-r2 USE="aiglx dri nptl sdl xorg -3dfx -debug -dmx -ipv6 -kdrive -minimal -xprint" INPUT_DEVICES="evdev keyboard mouse void -acecad -aiptek -calcomp -citron -digitaledge -dmc -dynapro -elo2300 -elographics -fpit -hyperpen -jamstudio -joystick -magellan -microtouch -mutouch -palmax -penmount -spaceorb -summa -synaptics -tek4957 -ur98 -vmmouse -wacom" VIDEO_CARDS="radeon vesa vga -apm -ark -chips -cirrus -cyrix -dummy -epson -fbdev -fglrx* -glint -i128 -i740 -i810 (-impact) -imstt -mach64 -mga -neomagic (-newport) -nsc -nv -nvidia -r128 -rendition -s3 -s3virge -savage -siliconmotion -sis -sisusb (-sunbw2) (-suncg14) (-suncg3) (-suncg6) (-sunffb) (-sunleo) (-suntcx) -tdfx -tga -trident -tseng -v4l -via -vmware -voodoo"
x11-wm/beryl-0.1.1-r1
x11-wm/beryl-core-0.1.1 [0.1.0_p20061008]
x11-plugins/beryl-plugins-0.1.1-r1 [0.1.0_p20061008]
x11-plugins/beryl-dbus-0.1.1-r1
x11-misc/beryl-settings-0.1.1 [0.1.0_p20061008]
x11-libs/libwnck-2.16.1 [2.16.0]
x11-wm/emerald-0.1.1 [0.1.0_p20061008]
x11-misc/emerald-themes-0.1.1 [0.1.0_p20061008]
x11-misc/beryl-manager-0.1.1 [0.1.0_p20061008]
xorg.conf
编译安装之后,需要重新配置 xorg.conf,下边列出一个配置清单:
Section "Module"
SubSection "extmod"
Option "omit xfree86-dga" # don't initialise the DGA extension
EndSubSection
Load "type1"
Load "dbe" # Double buffer extension
Load "freetype"
Load "glx"
Load "dri"
Load "bitmap"
# Load "GLcore"
Load "vbe"
Load "int10"
Load "record"
Load "extmod"
EndSection
Section "Files"
FontPath "/home/nini/.fonts"
FontPath "/home/nini/.fonts/VeraSansYuanTi"
FontPath "/home/nini/.fonts/Calibri"
FontPath "/home/nini/.fonts/SegoeUI"
FontPath "/home/nini/.fonts/corefonts"
FontPath "/home/nini/.fonts/arial"
FontPath "/home/nini/.fonts/wqy-bitmapfont"
FontPath "/usr/share/fonts/misc"
FontPath "/usr/share/fonts/75dpi"
FontPath "/usr/share/fonts/100dpi"
FontPath "/usr/share/fonts/arphicfonts"
FontPath "/usr/share/fonts/Type1"
FontPath "/usr/share/fonts/ttf-bitstream-vera"
# ModulePath "/usr/lib/modules"
EndSection
Section "ServerFlags"
EndSection
Section "InputDevice"
Identifier "Keyboard1"
Driver "kbd"
Option "AutoRepeat" "500 30"
Option "XkbRules" "xorg"
Option "XkbModel" "pc105"
Option "XkbLayout" "us"
EndSection
Section "InputDevice"
Identifier "Mouse1"
Driver "mouse"
Option "Protocol" "ImPS/2" # Auto detect
Option "Device" "/dev/input/mice"
Option "ZAxisMapping" "4 5"
Option "Emulate3Buttons" "true"
Option "EmulateWheel" "true"
Option "EmulateWheelButton" "2"
EndSection
Section "Monitor"
Identifier "ThinkPad GIU SVGA Monitor"
Option "DPMS"
EndSection
Section "Device"
Identifier "Standard VGA"
VendorName "Unknown"
BoardName "Unknown"
Driver "vga"
EndSection
Section "Device"
Identifier "ATI FireGL 9000 Mobile[M9]"
Driver "radeon"
VideoRam 65536
# Insert Clocks lines here if appropriate
BusID "PCI:1:0:0"
Option "BusType" "AGP"
Option "AGPMode" "4"
Option "EnablePageFlip" "true"
Option "RenderAccel" "on"
Option "UseInternalAGPGART" "no"
Option "mtrr" "on"
Option "ColorTiling" "on"
Option "OpenGLOverlay" "off"
Option "VideoOverlay" "on"
# Option "ReducedBlanking"
# This two lines are needed to prevent fonts from being scrambled
Option "XaaNoScanlineImageWriteRect"
Option "XaaNoScanlineCPUToScreenColorExpandFill"
Option "XAANoOffscreenPixmaps" "true"
Option "DRI" "true"
Screen 0
EndSection
Section "Screen"
Identifier "Screen 1"
Device "ATI FireGL 9000 Mobile[M9]"
Monitor "ThinkPad GIU SVGA Monitor"
DefaultDepth 24
Subsection "Display"
Depth 8
Modes "1400x1050" "1024x768" "800x600"
ViewPort 0 0
EndSubsection
Subsection "Display"
Depth 16
Modes "1400x1050" "1024x768" "800x600"
ViewPort 0 0
EndSubsection
Subsection "Display"
Depth 24
Modes "1400x1050" "1024x768" "800x600"
ViewPort 0 0
EndSubsection
EndSection
Section "ServerLayout"
Identifier "Simple Layout"
Screen "Screen 1"
InputDevice "Mouse1" "CorePointer"
InputDevice "Keyboard1" "CoreKeyboard"
Option "AIGLX" "true"
EndSection
Section "DRI"
Group 0
Mode 0666
EndSection
Section "Extensions"
Option "Composite" "Enable"
EndSection
.xinitrc
#!/bin/sh
export LC_CTYPE=zh_CN.UTF-8
export XIM_PROGRAM=fcitx
export XIM=fcitx
export XMODIFIERS="@im=fcitx"
export GTK_IM_MODULE="fcitx"
export QT_IM_MODULE="fcitx"
export G_FILENAME_ENCODING=GBK
export G_BROKEN_FILENAMES=1
export GDK_USE_XFT=1
export OOO_FORCE_DESKTOP=gnome
exec fcitx &
exec gkrellm2 &
exec trayer --SetDockType true \
--widthtype request \
--heighttype pixel \
--height 24 \
--edge bottom \
--align right \
--transparent true \
--alpha 70 \
--tint 30 \
--margin 0 \
--distance 30 &
exec xmodmap ~/.Xmodmap &
exec rox -p Default &
#exec fvwm2
dbus-launch beryl-manager
exec beryl --indirect-rendering --strict-binding --replace dbus settings
因为beryl自己就是一个独立的wm,不像compiz,它不需要gnome和kde就能运行, 所以如果它独立运行的话,需要一些小软件来搭配它一起工作,会更加方便。从前 边的.xinitrc可以看出,搭配使用了 gkrellm2 和 trayer
gkrellm2 经典的计算机资源监视软件,可以用来显示未读邮件/CPU/网络等
trayer 一个小巧的system trayer软件,运行之后会
另外可以搭配的还有fbpanel,实现一个带trayer的任务栏。
发觉beryl还是搭配gnome或者kde这样的整套桌面软件用起来更加流畅,推荐配置 gnome-light+beryl。下边是一个world软件列表:
net-wireless/madwifi-ng
media-sound/alsa-utils
sys-process/vixie-cron
app-text/acroread
x11-themes/gtk-engines
app-shells/bash-completion
gnome-base/gnome-light
app-office/dia
gnome-extra/gnome-audio
sys-kernel/linux-headers
app-arch/unrar
media-libs/alsa-oss
app-admin/sudo
sys-power/cpufreqd
app-text/antiword
x11-base/x11-drm
www-client/mozilla-firefox
app-editors/vim
net-dns/bind-tools
x11-apps/xlsfonts
net-mail/fetchmail
app-text/evince
app-dicts/stardict
gnome-base/gnome-applets
net-wireless/wpa_supplicant
sys-power/acpid
x11-base/xorg-server
net-fs/samba
media-gfx/eog
net-print/gnome-cups-manager
sys-devel/gdb
app-admin/localepurge
sys-apps/baselayout
sys-apps/slocate
app-portage/gentoolkit
media-gfx/gimp
net-ftp/vsftpd
x11-terms/rxvt-unicode
x11-base/xorg-x11
net-misc/dhcpcd
net-wireless/wireless-tools
x11-themes/jimmac-xcursors
sys-boot/grub
dev-util/cvs
media-libs/mesa
app-i18n/scim-pinyin
app-admin/syslog-ng
media-sound/rhythmbox
x11-libs/libwnck
sys-kernel/gentoo-sources
x11-libs/libdrm
net-im/gaim
www-client/w3m
app-office/openoffice-bin
app-portage/eix
app-dicts/stardict-langdao-zh-en-gb
x11-plugins/beryl-dbus
x11-wm/beryl
app-dicts/stardict-langdao-en-zh-gb
media-gfx/imagemagick
x11-wm/emerald
net-ftp/lftp
sys-power/hibernate-script
sys-fs/udev
sys-apps/dbus
media-video/realplayer
mail-filter/procmail
sys-apps/hotplug
media-video/mplayer
app-misc/screen
dev-util/ccache