歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> Linux教程 >> ubuntu下3D效果的實現

ubuntu下3D效果的實現

日期:2017/2/28 17:35:07   编辑:Linux教程
1.第一步當然是安裝好顯卡驅動;
2.安裝必須的包(將我的源列表加入到你的列表當中)
sudo apt-get install xserver-xgl beryl emerald-themes
3.
sudo vi /usr/local/bin/startxgl.sh

#!/bin/sh
Xgl :1 -fullscreen -ac -accel xv:pbuffer -accel glx:pbuffer &
DISPLAY=:1
cookie="$(xauth -i nextract - :0 | cut -d ' ' -f 9)"
xauth -i add :1 . "$cookie"
exec dbus-launch --exit-with-session gnome-session

保存退出

sudo vi /usr/local/bin/start_beryl.sh

#!/bin/bash
#
# Start beryl-manager within gnome-session
#
if (( `ps -A -o comm | grep -c '^Xgl$'` == "1" )); then
DISPLAY=:1 beryl-manager
DISPLAY=:1 beryl-xgl
else echo "${0}: Error: beryl-manager not launched. Xgl not running?"
fi

保存退出

sudo vi /usr/share/xsessions/xgl.desktop

[Desktop Entry]
Encoding=UTF-8
Name=GNOME with XGL
Comment=
Exec=/usr/local/bin/startxgl.sh
Icon=
Type=Application

保存退出

sudo vi /etc/xdg/autostart/beryl.desktop

[Desktop Entry]
Encoding=UTF-8
Version=1.0
Type=Application
Terminal=false
Name[en_US]=Beryl
Exec=/usr/local/bin/start_beryl.sh
Icon[en_US]=/usr/share/icons/hicolor/scalable/apps/beryl-manager.svg
Comment[en_US]=Beryl 3D Manager
Name=Beryl
Comment=Beryl 3D Manager
Icon=/usr/share/icons/hicolor/scalable/apps/beryl-manager.svg

保存退出

4.
cp /etc/xdg/autostart/beryl.desktop /usr/share/applications/beryl.desktop

5.
chmod a+x /usr/local/bin/startxgl.sh
chmod a+x /usr/share/xsessions/xgl.desktop
chmod a+x /usr/local/bin/start_beryl.sh

6.重新啟動即可。
Copyright © Linux教程網 All Rights Reserved