Install Beryl on Ubuntu Feisty with XGL
Link: http://wiki.beryl-project.org/wiki/Install_Beryl_on_Ubuntu_Feisty_with_XGL
Install Beryl on Ubuntu Feisty with XGL
From Beryl Wiki
Note: Using AIGLX is preferred on Edgy Eft because it is included with X.org on Edgy.
Contents[hide] |
Introduction
Installing Xgl and
Note: More documentation is available at https://help.
Note: Lennart Hansen has written an all-graphical guide,
IMPORTANT PLEASE READ BEFORE BEGINNING
In order to use xinerama, you must put a "+xinerama" in any xgl command, for example:
/usr/bin/Xgl:0 -fp /usr/share/fonts/X11/misc -fullscreen -ac -accel glx:pbuffer -accel xv:fbo:0 +xinerama
Graphic Card Drivers and 3D Video Acceleration
Note: If you have previously used Xgl with compiz, you should be good to go and you can skip this step.
The Xgl X server requires 3D video acceleration. Most graphicscards should automatically support 3D acceleration in Edgy Eft; somegraphics cards might need some tweaking though.
You can check whether direct rendering is enabled by invoking
glxinfo | grep direct
in a terminal. If it returns
direct rendering: Yes
For
fglrxinfo
then you're ready to install Xgl and
Migrating from Compiz-QuinnStorm
If you have the QuinnStorm version of Compiz installed on your system and want to migrate to
sudo apt-get remove compiz compiz-gnome gset-compiz
and continue on with the rest of the tutorial.
Adding the Beryl Project repositories
Now add the
deb http://ubuntu .-project.org/ beryl feisty main
Note: A number of mirrors are available if you find yourself getting slow speeds from the primary host. The current list of mirrors includes
deb http://www.beerorkid.com/compiz edgy main-edgy (latest:0.1.1) beryl
deb http://media.blutkind.org/xgl edgy main (latest:0.1.1) beryl
deb http://.xglusers.de/ edgy main (latest: beryl 0.1.4; no aquamarine) beryl
deb http://download.tuxfamily.org/3v1deb edgy-svn ( bleeding edge beryl development, use with care ) beryl
Note: Are all these accurate? I've removed the ones I /know/ to be wrong...
Note: Fixed beerorkid.com repository; needed main-edgy instead of just main.
The packages in the repository are signed with a gpg signatureso you can verify that they are valid. To add the gpg key to yourkeychain, use Synaptic / Adept or invoke the following command:
$ wget http://ubuntu .-project.org/root@lupine.me.uk.gpg -O- | sudo apt-key add - beryl
$ wget http://download.tuxfamily.org/3v1deb/DD800CD9.gpg -O- | sudo apt-key add -
$ wget http://www.beerorkid.com/compiz/quinn.key.asc -O - | sudo apt-key add -
Next, make apt aware of the new software repositories by issuing the following command
$ sudo apt-get update
Done! The new software repositories should now be available for use.
Installing Xgl and Beryl
- Installing the packages
- Use Synaptic or Adept to install the xserver-xgl and either the
-beryl ubuntu or -kubuntu package, or use the command line:beryl
For
$ sudo apt-get install xserver-xgl- beryl ubuntu
For Kubuntu/KDE:
$ sudo apt-get install xserver-xgl-kubuntu beryl
Note: In some cases,
Note: You may also want to install the emerald-themes package, although most emerald themes can be downloaded from within
- IMPORTANT -- Downgrading
-core to 0.2.0beryl
The
$ gksudo gedit /etc/apt/preferences
for
$ kdesu kate /etc/apt/preferences
Then add the following to that file. If there are any other entriesin this file, separate this entry (all three lines) from those entriesby a blank line. Don't separate the three lines from each other.
Package: *
Pin: release o=lupine
Pin-Priority: 1000
Save the file.
This will cause your system to prefer
Next, we need to downgrade to a version from
- click the 'reload' button
- find and select
-coreberyl - click the 'package' menu, and select 'force version'.
- Choose version 0.2.0~0beryl1.
Or, from the command line:
$ sudo apt-get update
and then
$ sudo apt-get install-core=0.2.0~0beryl1 beryl
Configuration
There are a number of ways to log into an Xgl Session and start the
Adding an Xgl login session
Adding a separate Xgl session to your (gdm or kdm) login screen isrecommended for most situations because it allows you to switch easilybetween Xgl and standard Xorg sessions. After all, Xglx is not meant tobe a full-fledged replacement for the standard Xorg server. Someapplications (such as OpenGL games) might not run properly in an Xglsession; and keep in mind that the
Adding an X session to your login screen is a two-step process:first we'll create a startup script that invokes the Xgl session andour desktop environment. Then we'll create the login screen entry thatuses our script.
The startup script: Use your favorite text editor to create a script startxgl.sh in your path, like so:
$ sudo gedit /usr/local/bin/startxgl.sh
Note: The contents of the script varies depending on yourdesktop environment and the graphics card you use. And yes, users ofother window managers, please help out and add your own startup scriptshere.
GNOME & Nvidia graphics card
#!/bin/sh
/usr/bin/Xgl:1 -fullscreen -ac -br -accel xv:fbo -accel glx:pbuffer &
sleep 4
export DISPLAY=:1
exec gnome-session
For KDE, change the last line to
exec startkde
GNOME &
#!/bin/sh
Xgl -fullscreen:1 -ac -br -accel glx:pbuffer -accel xv:pbuffer &
sleep 4
export DISPLAY=:1
exec gnome-session
Shutdown and reboot buttons in GNOME
Zoogie reported in the
#!/bin/sh
Xgl -fullscreen:1 -ac -br -accel glx:pbuffer -accel xv:pbuffer &
sleep 4
export DISPLAY=:1
cookie="$(xauth -i nextract -:0 | cut -d ' ' -f 9)"
xauth -i add:1 . "$cookie"
exec gnome-session
Alternative
For me, above script did load XGL properly, and
#!/bin/sh
Xgl:1 -fullscreen -ac -accel xv:pbuffer -accel glx:pbuffer &
DISPLAY=:1
exec dbus-launch --exit-with-session gnome-session
Note: You may also need to install
If you have a problem with your fonts appearing tiny, you may need to add the -dpi 96 flag to the Xgl call:
Xgl:1 -fullscreen -ac -accel xv:pbuffer -accel glx:pbuffer -dpi 96 &
However, this is kind of a dirty trick. Normally the xserverautomatically calculates the correct dpi by using the resolution andthe size of the monitor. So if the dpi is too low, it probably meansthat the size of the monitor is not read correctly by the graphicscard. Adding the following line to the Monitor section of the xorg.confwill solve this;
DisplaySize 344 222
Of course with the two numbers corresponding to the size of your monitor!! In milimeters.
Note: If your shutdown/restart buttons disappear when you are in Xgl you can add these lines to your startxgl.sh script:
cookie="$(xauth -i nextract -:0 | cut -d ' ' -f 9)"
xauth -i add:1 . "$cookie"
making it look like this:
#!/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
For KDE, change the last line to
exec startkde
For XFCE, change the last line to
exec xfce4-session
Making the script executable: Now make sure the script hasthe right permissions settings set so that it can be invoked by sessionlogin entry - this can be done in Nautilus or Konqueror or simply bytyping the following into a terminal:
$ sudo chmod a+x /usr/local/bin/startxgl.sh
IMPORTANT NOTE I recently found that if we start Gnome/KDE this way,we may lose font or mouse pointer configuration, since they don't getloaded with Xgl. The correct way that I found was to use "exec/etc/X11/Xsession" instead of gnome-session or startkde. Then you canput gnome-session or startkde as an Xsession argument, for example,"exec /etc/X11/Xsession startkde". - Lesterchakyn
Creating the login session entry: To create the login entry, create a new file /etc/X11/sessions/xgl.desktop
$ sudo mkdir -p /etc/X11/sessions
$ sudo gedit /etc/X11/sessions/xgl.desktop
Make it look like this:
[Desktop Entry]
Encoding=UTF-8
Name=Xgl
Exec=/usr/local/bin/startxgl.sh
Icon=
Type=Application
Note: The Name=Xgl entry is the description of the session that you'll see in your login menu, so you could change it to 'Xgl-Gnome' or 'Xgl-
Note: When using kdm (the case in Kubuntu), create this file in /usr/share/xsessions
Done!
When you get to the GDM or KDM login screen, you should now have asession called 'Xgl' available; if you log into this session, Xgl willrun as an overlay to the standard Xorg X session (that is, on DISPLAY:1) and load your desktop environment. Logging into your normal sessionwill give you the standard, un-accelerated desktop for trouble-shootingor running programs which don't play nicely with Xgl.
Changing your standard login
ONLY DO THIS IF YOU DIDN'T ADD AN XGL SESSION TO GDM PER THE PREVIOUS SECTION!!! You only need one or the other.
For GNOME: Instead of adding a separate desktop session,you could alter your standard X session. This is not recommended formost users (see above). It might be useful however if you do not wantto set up a separate X session for
First change gdm.conf-custom:
$ sudo nano /etc/gdm/gdm.conf-custom
Go to the very bottom of the file and add:
0=Xgl
[server-Xgl]
name=Xgl server
command=/usr/bin/Xgl:0 -fullscreen -ac -accel glx:pbuffer -accel xv:fbo
flexible=true
When you reboot or restart the graphical session, the Xgl server should be running.
Running Beryl
Now it's time to test your
$-manager beryl
If all goes well, you should see the
If you don't see the
IRC channels
Adding Beryl to Session Startup
Assuming all goes well, you can set up
GNOME
Note: This method will add
- Go to System? Preferences? Sessions
- Go to the 'Startup Programs' tab
- Click the 'Add' button and type
-manager into the dialog boxberyl - Click 'Close'
Addenda:
1) If the window decorations do not show up when starting
2) A command line version of this tip can be seen here.
KDE
Add
$ ln -s /usr/bin/-manager ~/.kde/Autostart/ beryl -manager beryl
Adding Beryl to an Existing Session
GNOME
To start
Create the script: Use your favourite text editor to create a script start_
$ sudo gedit /usr/local/bin/start_.sh beryl
In the file paste this:
#!/bin/bash
#
# Start-manager within gnome-session beryl
#
if (( `ps -A -o comm | grep -c '^Xgl$'` == "1" )); then
DISPLAY=:1-manager beryl
DISPLAY=:1-xgl beryl
else echo "${0}: Error:-manager not launched. Xgl not running?" beryl
fi
and save the file.
Making the script executable: Now make sure the scripthas the right permissions settings set so that it can be invoked bysession login entry - this can be done in Nautilus or Konqueror orsimply by typing the following into a terminal:
$ sudo chmod a+x /usr/local/bin/start_.sh beryl
Add the script to gnome session startup:
- Go to System? Preferences? Sessions
- Go to the 'Startup Programs' tab
- Click the 'Add' button and type /usr/local/bin/start_
.sh into the dialog boxberyl - Click 'Close'
Now, you can logout and start a session. When you start a gnomesession, the script looks if XGL is started, and so, if you are in axgl-session, it launches
KDE
The Gentoo Wiki offers several startup scripts that allow you to start
Also, the script mentioned above for starting
Note: this command does not work under KDE: "ps -A -o comm |grep -c '^Xgl$'` == "1". Replace it with "ps -A -o comm | grep -c Xgl== "1""
As such, the script should appear something like the following:
#!/bin/bash
#
# Start-manager within kde-session beryl
#
if [ `ps -A -o comm | grep -c '^Xgl$'` == "1" ]; then
DISPLAY=:1-manager beryl
DISPLAY=:$1 dbus-launch emerald &
DISPLAY=:1-xgl beryl
else echo "${0}: Error:
Troubleshooting
Ugly GTK/Icon Themes
If have problems with being unable to change the GTK(controls) oricon themes once logged into your XGL session; type the following intoa terminal:
$ gnome-settings-daemon &
Now try to change GTK/icon themes. If it fixes the problem, add itto your startup programs (In System --> Preferences -->Sessions).
Xgl start problem under Debian
If you use this howto to install
/usr/bin/Xgl:0 -fp /usr/share/fonts/X11/misc -fullscreen -ac -accel glx:pbuffer -accel xv:fbo:0
because the fonts are not located in the same directory between
Using Beryl
See Default Commands for some default commands.
'Ubuntu, Fedora' 카테고리의 다른 글
[본문스크랩] Vmware 로 Ubuntu 7.04 설치 (0) | 2007.07.13 |
---|---|
[본문스크랩] Vmware 로 Ubuntu 7.04 설치 (2) (0) | 2007.07.13 |
[본문스크랩] 페도라에서 vnc 사용하기 (0) | 2007.01.23 |
[본문스크랩] 페도라 코어 5 에 Nvidia 계열 그래픽 카드 설치 하기 (0) | 2006.10.26 |
Fedora5 한글화 (0) | 2006.07.23 |