ubuntu上安装beryl


这一段安装过程是从beryl上的wiki摘来的,经过作者的整理,保留了基本的安装步骤。实验系统为Ubuntu7.04, 显卡nVidia.

Install Beryl on Ubuntu Feisty with nVidia

Ubuntu

1. Open a terminal. Execute:

sudo echo "Beryl & nVidia installation script for ubuntu Ubuntu Feisty"

(this one line requires your password so that, the next text paste is uninterrupted.)

2. Copy and paste all the text into the Terminal in one action. [Select all the text. Then middle button click in terminal]

sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf.backup.beryl-script
sudo cp /etc/apt/sources.list /etc/apt/sources.list.backup.beryl-script
echo "deb http://ubuntu.beryl-project.org feisty main
deb-src http://ubuntu.beryl-project.org feisty main" | sudo tee -a /etc/apt/sources.list
wget http://ubuntu.beryl-project.org/root@lupine.me.uk.gpg -O- | sudo apt-key add -
sudo apt-get update
sudo apt-get -y install beryl beryl-manager emerald-themes
sudo nvidia-xconfig --add-argb-glx-visuals
sudo cp /usr/share/applications/beryl-manager.desktop /etc/xdg/autostart/beryl-manager.desktop
cp /usr/share/applications/beryl-manager.desktop ~/Desktop/beryl-manager.desktop
echo -e "Logout now and then press \e[0;31mCTRL+ALT+BACKSPACE\e[0m to restart xorg"
echo "Installation completed !"


3. Now Logout and then press [CTRL+ALT+BACKSPACE] to restart xorg

DONE

WARNING: THIS HAS BEEN KNOWN TO BREAK FEISTY IN SOME INSTANCES, BREAKING THE WHOLE GUI SYSTEM AND NOT ALLOWING THE UBUNTU GUI TO LOAD SINCE NVIDIA CANNOT LOAD THE KERNEL MODULE

LOAD THE NVIDIA DRIVERS SEPARATELY --THEN --Execute the script above. Some repositories have out-of-date nVidia drivers and the script above is really hard to get undone.
[edit]
Removing the autostart

System > Preferences > Sessions

Click on the "Startup Programs" tab and select "beryl-manager" then subsequently click "disable."

Open a terminal. Execute:

sudo rm /etc/xdg/autostart/beryl-manager.desktop

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" | sudo tee /usr/share/applications/beryl-manager.desktop


gedit ./beryl-install-script

Now, copy and paste the following script into the window:

#!/bin/bash
red='\e[0;31m'
bred='\e[1;31m'
nocolor='\e[0m'
willrestartx="n"
dist="feisty"
echo -e "${bred}.----------------------------.${nocolor}"
echo -e "${bred}|${red} Beryl/nVidia install. ${bred}|${nocolor}"
echo -e "${bred}'----------------------------'${nocolor}"
if [ `whoami` != "root" ]; then
echo -e "${bred}You must run this script as root.${nocolor}";
else
echo -e "${nocolor}Starting install${bred}...${nocolor}";
sleep 1s
echo -e "${red}Do not close the terminal while the script is running, or in any other way interrupt the script!${nocolor}"
if grep -q "deb http://ubuntu.beryl-project.org ${dist} main" /etc/apt/sources.list
then
echo -e "${red}beryl repositories have already been added${nocolor}"
else
echo "Adding beryl repositories to /etc/apt/sources.list and installing Beryl"
cp /etc/apt/sources.list /etc/apt/sources.list.backup.beryl-script
echo "deb http://ubuntu.beryl-project.org ${dist} main" | tee -a /etc/apt/sources.list
echo "deb-src http://ubuntu.beryl-project.org ${dist} main" | tee -a /etc/apt/sources.list
wget http://ubuntu.beryl-project.org/root@lupine.me.uk.gpg -O- | sudo apt-key add -
aptitude update
echo "Backup of /etc/apt/sources.list made to /etc/apt/sources.list.backup.beryl-script"
fi
if [ -e /usr/bin/beryl-manager ]; then
updateberyl="upgrade"
else
updateberyl="install"
fi
echo -e "${updateberyl} Beryl?${bred}(y/n)${nocolor}"; read answer
if [ $answer = y ]; then
apt-get -y ${updateberyl} beryl emerald-themes
fi
echo "Installing nVidia drivers"
echo -ne "${nocolor}Install nVidia drivers? ${bred}(y/n)${nocolor}"; read answer
if [ $answer = y ]; then
aptitude -y install nvidia-glx nvidia-kernel-common
fi
if grep -q AddARGBGLXVisuals /etc/X11/xorg.conf
then
echo -e " ${bred}Driver \"nvidia\"${red} has already been added to ${bred}Section \"Device\"${nocolor}"
echo -e " ${bred}Option \"AddARGBGLXVisuals\" \"True\" ${red} has already been added to ${bred} Section \"Screen\"${nocolor}"
else
echo "configuring /etc/X11/xorg.conf"
echo "Backup of /etc/X11/xorg.conf made to /etc/X11/xorg.conf.backup"
cp /etc/X11/xorg.conf /etc/X11/xorg.conf.backup.beryl-script
nvidia-xconfig --add-argb-glx-visuals
echo -e "${red}\nRestart X.org NOW?${nocolor}\nClose and save any open windows. ${bred}(y/n)${nocolor}"; read willrestartx
fi;
if [ -e /usr/bin/beryl-manager ]; then
echo -e "${nocolor}Beryl is ${updateberyl}ed.\ntype ${bred}beryl-manager${nocolor} in terminal to run${nocolor}"
fi;
if [ $willrestartx = y ]; then
sleep 3s
/etc/init.d/gdm restart
fi;
fi;

Running the script

Run the following command

sudo bash ./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.
[edit]
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

Add beryl repositories and install Beryl

Adding beryl repositories

Run the following command:

echo "deb http://ubuntu.beryl-project.org feisty main" | sudo tee -a /etc/apt/sources.list
echo "deb-src http://ubuntu.beryl-project.org feisty main" | sudo tee -a /etc/apt/sources.list
wget http://ubuntu.beryl-project.org/root@lupine.me.uk.gpg -O- | sudo apt-key add -

Installing Beryl
sudo apt-get update
sudo apt-get -y install beryl emerald-themes

Configure X.Org to use the new nVIDIA driver

Submethod 1 (nvidia-xconfig) [recommended]

Run the following command:

sudo apt-get install -y nvidia-glx nvidia-kernel-common
sudo nvidia-xconfig --add-argb-glx-visuals

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.

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".

相关内容

    暂无相关文章