[ubuntu] Beryl 자동 설치하기
Install Beryl on Ubuntu Edgy with nVidia
From Beryl Wiki
Note: More documentation is available at https://help.ubuntu.com/community/CompositeManager.
To install Beryl automatically using a script, see below. Otherwise, see Install Beryl on Ubuntu Edgy with nVidia#Installing the nVIDIA Beta Driver and all subsequent sections.
Automatic installation
The following instructions have been tested successfully on an updated base Ubuntu installation, using a nVidia GeForce FX 5200 video card (though it should work with all other cards supported by the nVidia beta driver).
Be SURE to close Synaptic Package Manager or the install will fail and Beryl will not work. You will need to run the script again if that happens. Doing so caused my desktop to fail miserably. You have been warned!
Ubuntu
The automatic installation will:
- Perform all necessary steps to install Beryl with no user input needed while the script is running;
- install the stable beta nVidia drivers;
- run nvidia-xconfig to configure /etc/X11/xorg.conf; and
- enable the ARGBGLXVisuals option.
- Create a Desktop icon for the installer
- Add menu item into Applications:Accessories
- Automatically start for each user.
Creating the script
Open a terminal. Execute:
gedit ./beryl-install-script
Now, copy and paste the following script into the window:
#!/bin/bash
if [ $UID -gt 0 ]; then
echo "You must run this script as root.";
else
cp /etc/apt/sources.list /etc/apt/sources.list.backup.beryl-script
cp /etc/X11/xorg.conf /etc/X11/xorg.conf.backup.beryl-script
echo "deb http://nvidia.limitless.lupine.me.uk/ubuntu edgy stable" >> /etc/apt/sources.list
wget http://nvidia.limitless.lupine.me.uk/ubuntu/root@lupine.me.uk.gpg -O- | apt-key add -
aptitude -y update && aptitude -y install linux-restricted-modules-$(uname -r) nvidia-glx
nvidia-xconfig --add-argb-glx-visuals
echo "deb http://ubuntu.beryl-project.org/ edgy main" >> /etc/apt/sources.list
wget http://ubuntu.beryl-project.org/root@lupine.me.uk.gpg -O- | apt-key add -
aptitude -y update && aptitude -y dist-upgrade
aptitude -y install beryl emerald emerald-themes
echo "[Desktop Entry]
Encoding=UTF-8
Name=Beryl Manager
GenericName=3D Window Manager
Comment=Beryl Manager daemon
Icon=/usr/share/icons/hicolor/scalable/apps/beryl-manager.svg
Exec=beryl-manager
Terminal=false
Type=Application
Categories=GTK;GNOME;Application;Utility;
StartupNotify=true
X-Ubuntu-Gettext-Domain=beryl-manager" > /etc/xdg/autostart/beryl-manager.desktop
cp /etc/xdg/autostart/beryl-manager.desktop /usr/share/applications/beryl-manager.desktop
cp /etc/xdg/autostart/beryl-manager.desktop ~/Desktop/beryl-manager.desktop
echo -e "\n\nBeryl is now installed.\n\nTo run Beryl on Ubuntu startup,
please add beryl-manager to your\nstartup programs (System > Preferences > Sessions,
and click on\nthe \"startup programs\" tab). Afterwards, please reboot.\n\nBackups of /etc/apt/sources.list
and /etc/X11/xorg.conf were made:\n /etc/apt/sources.list.backup.beryl-script\n /etc/X11/xorg.conf.backup"
fi;
Subsequently, save the file and close gedit.
Running the script
Run the following commands:
sudo chmod +x ./beryl-install-script
sudo ./beryl-install-script
The script will then perform all the necessary functions to perform the installation of Beryl. Do not close the terminal while the script is running, or in any other way interrupt the script. Also, note that this script will install a 97xx series driver which is now incompatible with GeForce 4 and older cards.
Postinstallation
In general, it is not a good idea to rerun the script after the initial execution. Thus, you should remove it:
rm ./beryl-install-script
Removing the autostart
Single User
Open a terminal. Execute:
gnome-session-properties
Click on the "Startup Programs" tab and select "beryl-manager" then subsequently click "disable."
or from the menu
System > Preferences > Sessions
Click on the "Startup Programs" tab and select "beryl-manager" then subsequently click "disable."
All Users
Open a terminal. Execute:
sudo rm /etc/xdg/autostart/beryl-manager.desktop
Kubuntu
The automatic installation will:
- perform all necessary steps to install Beryl with no user input needed while the script is running;
- install the stable beta nVidia drivers;
- run nvidia-xconfig to configure /etc/X11/xorg.conf;
- enable the ARGBGLXVisuals option; and
- place a symbolic link into ~/.kde/Autostart to launch Beryl on KDE startup.
Creating the script
Open a terminal. Execute:
kate ./beryl-install-script
Now, copy and paste the following script into the window:
#!/bin/bash
if [ `whoami` != "root" ]; then
echo "You must run this script as root.";
else
cp /etc/apt/sources.list /etc/apt/sources.list.backup.beryl-script
cp /etc/X11/xorg.conf /etc/X11/xorg.conf.backup.beryl-script
echo "deb http://nvidia.limitless.lupine.me.uk/ubuntu edgy stable" >> /etc/apt/sources.list
wget http://nvidia.limitless.lupine.me.uk/ubuntu/root@lupine.me.uk.gpg -O- | apt-key add -
aptitude -y update && aptitude -y install linux-restricted-modules-$(uname -r) nvidia-glx
nvidia-xconfig --add-argb-glx-visuals
echo "deb http://ubuntu.beryl-project.org/ edgy main" >> /etc/apt/sources.list
wget http://ubuntu.beryl-project.org/root@lupine.me.uk.gpg -O- | apt-key add -
aptitude -y update && aptitude -y dist-upgrade
aptitude -y install beryl emerald emerald-themes aquamarine
ln -s /usr/bin/beryl-manager ~/.kde/Autostart/beryl-manager
echo -e "\n\nBeryl is now installed; please reboot.\n\nBackups of /etc/apt/sources.list and /etc/X11/xorg.conf were made:\n
/etc/apt/sources.list.backup.beryl-script\n /etc/X11/xorg.conf.backup"
fi;
Subsequently, save the file and close kate.
Running the script
Run the following commands:
sudo chmod +x ./beryl-install-script
sudo ./beryl-install-script
The script will then perform all the necessary functions to perform the installation of Beryl. Do not close the terminal while the script is running, or in any other way interrupt the script.
Postinstallation
In general, it is not a good idea to rerun the script after the initial execution. Thus, you should remove it:
rm ./beryl-install-script
Now, reboot. Beryl should begin running after you log in. An icon resembling a red gem will appear in the system tray; clicking on it is the recommended way to access needed programs and change settings.
Installing the nVIDIA Driver
You may manually perform the installation of the nVIDIA beta driver utilizing one of two methods. Before beginning the procedure, backing /etc/apt/sources.list is recommended:
sudo cp /etc/apt/sources.list /etc/apt/_sources.list.backup
First method (installing from repository) [recommended]
These repositories contain the linux-restricted-modules package, modified slightly to include the nVIDIA driver. This method is advantageous as linux-restricted-modules can be used easily for many other purposes (use of wireless drivers, for instance).
First, select one apt repository from the sections below. One way to do so is by running:
echo -e "\n## nVidia driver repository\nrepository" | sudo tee -a /etc/apt/sources.list
where repository (in italics) is one of the strings listed in the gray boxes (beginning with deb) below. The current supported architectures are i386 and amd64.
Repository for stable drivers [recommended]
deb http://nvidia.limitless.lupine.me.uk/ubuntu edgy stable
Repository for unstable drivers
deb http://nvidia.limitless.lupine.me.uk/ubuntu edgy unstable
Now, run the following command for GPG authentication:
wget http://nvidia.limitless.lupine.me.uk/ubuntu/root@lupine.me.uk.gpg -O- | sudo apt-key add -
Driver installation
Perform the installation of the nVIDIA drivers by running:
sudo apt-get update && sudo apt-get install linux-restricted-modules-$(uname -r) nvidia-glx
If problems occur
It is possible that the Ubuntu developers have released a later version of linux-restricted-modules, and that the repository you have chosen to use has not yet been updated (this has occured on November 6th, 2006 and January 9th, 2007, for instance). To overcome these problems, run:
apt-cache policy linux-restricted-modules-$(uname -r)
And analyze the resulting output:
linux-restricted-modules-2.6.17-10-generic:
Installed: 2.6.17.5-12~amaranth
Candidate: 2.6.17.6-1
Version table:
2.6.17.6-1 0
500 http://security.ubuntu.com edgy-security/restricted Packages
*** 2.6.17.6-2~amaranth 0
500 http://amaranth.selfip.com edgy/lrm Packages
100 /var/lib/dpkg/status
2.6.17.5-11 0
500 http://gb.archive.ubuntu.com edgy/restricted Packages
Thus, the latest version containing the nVIDIA beta drivers in this case is "2.6.17.5-12~amaranth" (note the "~" in the version designation). In this situation, one should run:
sudo apt-get install linux-restricted-modules-$(uname -r)=2.6.17.6-2~amaranth
Unfortunately, the package will be overwritten once the system is upgraded if this method is used. Situations such as this should be temporary, however.
Configure X.Org to use the new nVIDIA driver
Submethod 1 (nvidia-xconfig) [recommended]
Run the following command:
sudo nvidia-xconfig --add-argb-glx-visuals
A backup of /etc/X11/xorg.conf will be made at /etc/X11/xorg.conf.backup.
Submethod 2 (xorg.conf)
Composite extension. Restart X11 (Ctrl + Alt + Backspace), or reboot. Subsequently, run the following command:
grep "Composite extension" /var/log/Xorg.0.log
If
(WW) NVIDIA(0): 32-bit ARGB GLX visuals require the Composite extension.
is returned, execute:
echo -e '\nSection "Extensions"\n Option "Composite" "Enable"\nEndSection' | sudo tee /etc/X11/xorg.conf
Modifying the "Device" section. Edit /etc/X11/xorg.conf and change the "driver" value to nVIDIA:
Section "Device"
Identifier [...]
Driver "nvidia" # Edit only this line.
BusID [...]
EndSection
On some laptops (Dell) installing nvidia driver results in blank screen. Adding following line to "Device" section solves this problem
Option "UseDisplayDevice" "DFP-0"
Enabling the ARGBGLXVisuals option. Execute:
sudo sed -i -e '/Section "Screen"/,/EndSection/ { s/EndSection/ Option "AddARGBGLXVisuals" "True"\nEndSection/ }' /etc/X11/xorg.conf
Alternatively, manually edit /etc/X11/xorg.conf and add the "AddARGBGLXVisuals" option line:
Section "Screen"
[...your configuration...]
Option "AddARGBGLXVisuals" "True" # Edit only this line.
EndSection
Restart X11
Restart the X server with Ctrl + Alt + Backspace, or reboot.
Note: if the X server fails to restart, then it is likely that the old version of the nVIDIA kernel module is still loaded. This can be fixed by running:
sudo rmmod nvidia && sudo modprobe nvidia
Now, see Install Beryl on Ubuntu Edgy with nVidia#Adding Beryl repository.
Second method (installing official package)
Users planning to install the officially distributed version of the beta nVidia drivers should be advised that X.org may fail to start upon upgrading the kernel as modules are built for specific kernel configurations. Thus, installing from a repository (see Install Beryl on Ubuntu Edgy with nVidia#Installing the nVIDIA Beta Driver) is recommended. The following instructions, however, document methods for performing the installation of the official packages, should you decide to make use of them.
Retrieval of package files from the nVidia webserver
To retrieve the current version of the nVidia driver complied for 32-bit x86 systems, execute:
wget http://us.download.nvidia.com/XFree86/Linux-x86/1.0-9746/NVIDIA-Linux-x86-1.0-9746-pkg1.run
Otherwise, if you are using an AMD64/EM64T system, you may run
wget http://us.download.nvidia.com/XFree86/Linux-x86_64/1.0-9746/NVIDIA-Linux-x86_64-1.0-9746-pkg2.run
instead.
Installation of packages required to build kernel modules
Because the process of installing nVidia driver involves some compilation, it is necessary to install some header files, software, and libraries. To do so, simply issue:
sudo apt-get install linux-headers-$(uname -r) build-essential
About TTY sessions
Note: This section is intended mainly for inexperienced users. If you are experienced using Linux and are confident you will be able to work effectively in a TTY (teletypewriter) environment, see Install Beryl on Ubuntu Edgy with nVidia#Running the nVidia installation package.
For the installation of the official packages to be possible, it is necessary to temporarily shut down the X server, meaning that for a brief period of time, you will not have access to a graphical interface. For this reason, viewing this documentation in Firefox or any other graphical browser is not possible if you only have one computer available for use.
To continue viewing this documentation while performing the installation of the driver, it is necessary to first install a browser which requires no graphical environment to operate.
It is extremely likely that you are currently viewing output from the X server from TTY0. Thus to access a graphical environment whenever an implementation of the X Window System is running, one should press CTRL + ALT + F7. Making note of this important keystroke combination is advisable.
A recommended means to access the documentation on this webpage from a command line interface is to launch links while the X.org is still running. Select a terminal to use for viewing the documentation; the teletypewriter interfaces available most likely include TTY1-TTY6. To access any one of the these terminals, press CTRL + ALT + Ftty_number, where tty_number corresponds to terminal you wish to view. For instance, to access TTY2, one would press CTRL + ALT + F2.
Links will access any URL passed to it in the form of a command line argument immediately. However, switching to and from the graphical environment to transfer the URI from the browser into the TTY interface may prove to be unpleasant and frustrating. To ease the process, you might run
echo "http://wiki.beryl-project.org/index.php?title=Install_Beryl_on_Ubuntu_Edgy_with_nVidia" > beryl-nvidia-doc-uri
which will create a text file containing the URI that corresponds to this page.
To view the documentation, you should run the command above if you have not already. Install Links by running
sudo aptitude install links
Now, press CTRL + ALT + F2 to access TTY2 (assuming it is not in use, if so, you may select a different terminal; also recall that CTRL + ALT + F7 will return you to the graphical interface while X.org is running) and execute
links $(cat beryl-nvidia-doc-uri)
You may scroll across documents using either the arrow keys or Page Up and Page Down buttons. Press q at anytime to quit Links and return to your TTY interface. Of course, running the above command again will return you to the documentation after Links is closed. <RETURN> accesses links to other webpages, and <BACKSPACE> will cause links to return to the most recently viewed webpage.
Copying and pasting across multiple TTY terminals may not be possible, and therefore the user is encouraged to use <TAB> completion whenever possible. Assuming no other files in your home directory or in your path contain "NVIDIA", it possible to insert the name of the previously downloaded file simply by entering
sudo sh ./NVIDIA<TAB>
into the terminal. The above keystokes should result in, for instance
sudo sh ./NVIDIA-Linux-x86-1.0-9746-pkg1.run
being displayed. Thus, it is not always necessary to type long filenames manually.
Now, press CTRL + ALT + F1 to access TTY1. Assuming the terminal is not in use, you will now be able to log in and perform tasks related to the installation of the nVidia drivers without the need for X11.
Running the nVidia installation package
For the installation of the nVidia drivers to continue, X.org must be shut down. Note that after executing the following command, it is not possible to return to a graphical interface until X.org is restarted.
One way to shutdown the X.org server is by stopping GDM. To do so, execute
sudo /etc/init.d/gdm stop
Now, actually running the installer is possible. Run
sudo sh ./<nvidia_installation_pkg_filename>
where <nvidia_installation_pkg_filename> is the filename of the previously downloaded package. The actual installation and compilation of the kernel modules is automatic and, in general, the selection of the default choice at each prompt should suffice. However, you should not run the nvidia-xconfig (configuration) utility from the installation, please wait until after the installation to do so (the default invocation will not enable the required ARGBGLXVisuals option in /etc/X11/xorg.conf).
After the installation of the drivers is complete, a prompt will appear. Execute
sudo nvidia-xconfig --add-argb-glx-visuals
and restart GDM and X11 with
sudo /etc/init.d/gdm start
In most cases, the graphical interface should reappear immediately. If not, please see Install Beryl on Ubuntu Edgy with nVidia#If problems with an installation with an official package occur.
Upon upgrading the kernel at a later time
Unfortunately, X11 will most likely refuse to start if the kernel is upgraded after a manual installation of the nVidia drivers. Because new modules will need to be compiled and installed, it is necessary to rerun the installation procedures documented above (see Install Beryl on Ubuntu Edgy with nVidia#Running the nVidia installation package), with one exception: nvidia-xconfig will not need to be reinvoked in most cases.
If problems with an installation with an official package occur
After the installation of the official nVidia package, it is possible (though perhaps unlikely) that X11 will refuse due its attempt to utilize the older version of the nVidia kernel module. In such a situation, you should unload and subsequently reload the nvidia kernel module by running:
sudo rmmod nvidia && sudo modprobe nvidia
In the case that the user receives an API mismatch error upon restarting Ubuntu, it is necessary disable the "nv" module. To simultaneously backup linux-restricted-modules-common and automatically disable the nv module, you may execute:
sudo cp /etc/default/linux-restricted-modules-common /etc/default/_linux-restricted-modules-common.backup && sudo sed -i
-e 's/^DISABLED_MODULES="/DISABLED_MODULES="nv /' -e 's/ "/"/' /etc/default/linux-restricted-modules-common
Or, to simultaneously backup linux-restricted-modules-common and edit the file manually, run:
sudo cp /etc/default/linux-restricted-modules-common /etc/default/_linux-restricted-modules-common.backup &&
sudo nano /etc/default/linux-restricted-modules-common
and add "nv, " the following line:
DISABLED_MODULES="nv, [...]" # Edit only this line.
Adding Beryl repository
Add the following repository:
deb http://ubuntu.beryl-project.org/ edgy main
One way to do so is by executing:
sudo echo -e "\n## Beryl repository\ndeb http://ubuntu.beryl-project.org/ edgy main" >> /etc/apt/sources.list
Note: The domain name ubuntu.beryl-project.org forwards to a variety of different mirrors. Using it helps evenly distribute bandwidth.
Now, run the following command for GPG authentication:
sudo echo && wget http://ubuntu.beryl-project.org/root@lupine.me.uk.gpg -O- | sudo apt-key add -
Updating System
Run the following command:
sudo apt-get update && sudo apt-get dist-upgrade
Installation
To perform the installation of Beryl, run:
sudo apt-get install beryl emerald emerald-themes
Users of KDE
A new window decorator, aquamarine, is available as of version 0.1.3. Installation can be performed by running:
sudo apt-get install aquamarine
TripleBuffer [optional]
This option makes Beryl smoother, at the expense of consuming additional video RAM. On some video cards, performance may be improved.
To enable the TripleBuffer option, either run:
sudo sed -i -e '/Section "Device"/,/EndSection/ { s/EndSection/ Option "TripleBuffer" "True"\nEndSection/ }'
/etc/X11/xorg.conf
or edit /etc/X11/xorg.conf manually and perform the following edit:
Section "Device"
[...your configuration...]
Option "TripleBuffer" "True" # Edit only this line.
EndSection
Executing Beryl
Beryl may be started by running the following command (restarting X11 [Ctrl + Alt + Backspace] is recommended prior to doing so upon installation):
beryl-manager
Generally, however, beryl-manager is used in such a manner that Beryl is executed upon loading the desktop environment.
Users of GNOME
The recommended method of adding a startup script to the GNOME Desktop Environment is to access the sessions configuration program (System > Preferences > Sessions). Click on the "Startup Programs" tab and subsequently click "add." Copy and paste the following into the text field:
beryl-manager
and click on "OK".
Users of KDE
On startup, KDE executes all files in ~/.kde/Autostart. Therefore, a symbolic link may be used to load Beryl upon each execution of KDE. To create it, run:
ln -s /usr/bin/beryl-manager ~/.kde/Autostart/beryl-manager
Restart X11
Restart X11 using Ctrl + Alt + Backspace, or reboot. Beryl should begin running after your desktop environment loads. An icon resembling a red gem will now appear in the system tray; clicking on it is the recommended way to access needed programs and change settings.
Using Beryl
See Default Commands.
Troubleshooting
If window borders and decorations are not showing up:
- Try changing DefaultDepth to 24 in the Screen section.
- Have you disabled the use of desktop-icons on your desktop? Reenable them...
- Beryl is incompatible with Xinerama (multiple monitors bonded together to create a larger desktop). Beryl requires the XRandR extension, and Xinerama disables it. Some have reported that Beryl is compatible with Twinview, a nVidia-only feature similar to the hardware-neutral Xinerama.
If opening multiple windows leaves some as black, you do not have enough video memory. This is a bug in the beta drivers - currently, shared video RAM cannot be used with the GLX_EXT_TEXTURE_FROM_PIXMAP extension. nVidia are aware of it, and it may be fixed in the future. In the meantime, one solution is to use the Copy rendering path - it can be enabled in beryl-manager (Advanced Beryl Options->Rendering Path).