PDA

View Full Version : Debian 4.0 Etch Installation Guide using scripts


franzrogar
April 13th, 2007, 03:59 PM
This guide covers:

1 - nVIDIA propietary driver installation
2 - Compiz GIT installation
3 - Compiz-extras installation

for Debian 4.0 Etch.

1. nVIDIA propietary driver installation

We'll use a script to automatize the driver installation. Prior to run int you must know this:

1 - This script MUST be run on console. So, press Ctrl+Alt+F1 (or F2...)
2 - This script MUST be run as normal user (NOT root)
3 - This script NEEDS Internet conection

Next. After install Debian 4.0 Etch, type in a terminal or console:

uname -r


This will return you something like this:

2.6.18-4-686


Remember that number and edit the first lines of the script as follow:

kernel_version is till the first " - ". So, in this case, it's 2.6.18
kernel_pc is the whole string. So, in this case, it's 2.6.18-4-686

This is the script. Save it as, as example, install-nvidia.sh
Then, do a chmod +x install-nvidia.sh
And run it on console.


#!/bin/bash

kernel_version=2.6.18

kernel_pc=2.6.18-4-686

nvidia_driver=9755-pkg1.run



clear

echo "YOU MUST BE ON CONSOLE (Ctrl+Alt+F1) and be a NORMAL user"

echo "AND NEED INTERNET CONECTION"

echo "Are you ok? (y/n)"

read RESPONSE

if [ $RESPONSE = "y" || $RESPONSE ="Y" ]; then



echo "Downloading nVIDIA driver and installed needed packages"

wget http://us.download.nvidia.com/XFree86/Linux-x86/1.0-9755/NVIDIA-Linux-x86-1.0-$nvidia_driver

chmod +x NVIDIA-Linux-x86-1.0-$nvidia_driver

su

apt-get update

apt-get install binutils

apt-get install linux-source-$kernel_version linux-headers-$kernel_pc

apt-get install pkg-config xserver-xorg-dev xorg-dev libc6-dev gcc

clear



echo "Stoping X and installing nVIDIA driver"

/etc/init.d/gdm stop

sh NVIDIA-Linux-x86-1.0-$nvidia_driver

clear



echo "Loading nVIDIA kernel module"

modprobe nvidia

clear



echo "Configuring graphical server"

nvidia-xconfig --composite

nvidia-xconfig --render-accel

nvidia-xconfig --allow-glx-with-composite

nvidia-xconfig --add-argb-glx-visuals

clear



echo "Optionally, you can add to Section Screen in /etc/X11/xorg.conf
the following lines (remember that EACH two last words goes between
quotes) :



Option NoLogo True

Option TripleBuffer True



To avoid nVIDIA choose the screen resolution, add this line:



Option UseEDID False



" > nvidia-debian

echo "You can read all this settings in file nvidia-debian."

sleep 3



/etc/init.d/gdm start

exit



fi




2. Compiz GIT installation

Next. We're going to download, compile & install compiz git.

This is the script. Save it as, as example, install-compiz-git.sh
Then, do a chmod +x install-compiz-git.sh
And run it on a terminal or console as normal user.


#!/bin/bash
cd
su
echo "Installing depdencies"
apt-get build-dep compiz
apt-get install git gitweb libdbus-glib-1-dev libglut3-dev

echo "Configuring GIT. Select option 1"
update-alternatives --config git

echo "Downloading Compiz GIT"
git clone git://git.freedesktop.org/git/xorg/app/compiz
clear

echo "Building and installing Compiz GIT"
echo " "
echo "FUSE plugin will not be compile"
echo "because with libfuse-dev it fails"
sleep 3
cp /usr/src/linux-headers-`uname -r`/include/linux/inotify.h /usr/include/sys
cd compiz
./autogen.sh --prefix=/usr --enable-librsvg --enable-gtk && make && make install

echo "Do you want to run compiz right now? (y/n)"
read RESPONSE
if [ $RESPONSE = "y" || $RESPONSE ="Y" ]; then
compiz --replace gconf & gtk-window-decorator --replace &
fi
echo "YOU MUST ADD to Desktop -> Preferences -> Session"
echo "At 3rd tab: programs at boot, this two lines if you want"
echo "to run compiz each time you log-in:"
echo " "
echo "compiz --replace gconf"
echo "gtk-window-decorator --replace"
echo " "


3. Compiz-extras installation

compiz-extras is located at http://forum.compiz.org/viewtopic.php?t=726
Decompress the file and enter in extras-plugins.

This script *should* work with 20070413-1 (tested) and later versions.

This is the script. Save it as, as example, compile-compiz-extras.sh
Then, do a chmod +x compile-compiz-extras.sh
And run it on a terminal or console as normal user.


#!/bin/bash
su
echo "This installs some needed dependencies"
aptitude install automake x11proto-scrnsaver-dev

echo "Compiling extra-plugins"
for plugin in `ls`
do
pushd $plugin
if ($plugin == "desktopclick")
tar xzvf bmenu-0.0.2.tar.gz
cd bmenu
./configure --prefix=/usr && make && make install
cd ..
elif ($plugin == "vignettes")
./configure --prefix=/usr
fi
make
make install
popd
done

echo "Installing schemas"
gconftool-2 --shutdown
export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source`
for plugin in `ls`
do
pushd $plugin
if ($plugin == "vignettes" || $plugin == "desktopclick")
echo "INFO for " $plugin
echo "No .options file available"
sleep 3
elif ($plugin == "crashhandler")
echo "INFO for " $plugin
echo "No .schema due to segment violation"
sleep 3
else
gconftool-2 --makefile-install-rule $plugin.schema
fi
popd
done
exit


And that's all. :D

Er_Maqui
August 18th, 2007, 09:30 AM
I think who if our scripts uses m-a for driver installation will be better (i supposed who the nvidia driver on apt repos is tested).


And... you says to "execute our scripts as normal user", but all scripts makes a su on the firsts lines... xD.

Note: I think who its more simple to install compiz from a repo for debian (example: shame).