Archlinux on HP Compaq nx8220

Ayant un laptop qui devient de plus en plus dépassé par rapport aux nouveaux gros cylindrés des pc portables de nos jours, j’avais entendu parlé de Archlinux (via le le plus geek des gadiris geeky minds Tao sensei) comme étant une bonne et légère solution pour ne pas trop forcer sur le matos modeste de mon laptop…

sur le site http://www.archlinux.org ils disent

“Welcome to Arch! You’ve reached the website for Arch Linux, a lightweight and flexible Linux® distribution that tries to Keep It Simple.”

ils disent que c’est légère et rapide comme distribution mais ce qu’ils disent pas c’est que une fois installée, vous trouverez qu’un joli écran noir à votre accueil, à vous d’installer l’environnement graphique et tout configurer (graphique, son, wifi… même les bouton du contrôle de volume !)
L’intérêt est bon, pour les créateurs d’Archlinux, avec un distribution simple comme ubuntu ou suse, tôt ou tard on va se trouver face à un grave problème, pour le débloquer, on pourra jamais (ou au moins difficilement) s’en sortir vu que c’est un wizard qui a tout installer et non pas nous…

archlinux2

bref, j’ai passé tout un weekend à lire dans la wiki http://wiki.archlinux.org et à essayer de configurer un OS opérationnel qui remplacera complètement windoz (pour me forcer, j’ai même viré mon historique windoz que j’avais en dual boot, quand il fallait chercher des pistes sur internet, je bootais plutôt sur le CD live de http://www.linuxmint.com :)

pour garder une trace online de ma config, voila les commandes et les paramètres des fichiers de conf qu’ont fonctionné avec mon HP Compaq nx8220… ici je présente que l’essentiel, à vous le wiki pour plus de détails

Wifi

[bash]
pacman -S ipw2200-fw
[/bash]

Son

[bash]
pacman -S alsa alsamixer gnome-alsamixer alsa-oss alsa-lib
[/bash]

Video

[bash]
pacman -S xf86-video-ati libgl catalyst
[/bash]

Touchpad

[bash]
pacman -S synaptics
[/bash]

Écrire sur mon disque dur externe NTFS

[bash]
pacman -S ntfs-3g
[/bash]

rc.conf

[bash]
#
# /etc/rc.conf – Main Configuration for Arch Linux
#

# ———————————————————————–
# LOCALIZATION
# ———————————————————————–
#

LOCALE="ar_MA.iso88591"
HARDWARECLOCK="localtime"
USEDIRECTISA="no"
TIMEZONE="Africa/Casablanca"
KEYMAP="fr-latin9"
CONSOLEFONT=
CONSOLEMAP=
USECOLOR="yes"

# ———————————————————————–
# HARDWARE
# ———————————————————————–
#

MODULES=(tg3 ipw2200 ac97_bus evdev psmouse vmmon)

# Scan for LVM volume groups at startup, required if you use LVM
USELVM="no"

# ———————————————————————–
# NETWORKING
# ———————————————————————–
#
# HOSTNAME: Hostname of machine. Should also be put in /etc/hosts
#
HOSTNAME="faycal-arch"

#INTERFACES=(eth0 eth1)
INTERFACES=(eth1)

eth1="dhcp"
wlan_eth1="eth1 essid faycal’s"
#aux voleurs de wifi: j’ai un filtre MAC ds mon routeur wifi :P

# Routes to start at boot-up (in this order)
# Declare each route then list in ROUTES
# – prefix an entry in ROUTES with a ! to disable it
#
gateway="default gw 192.168.0.1"
ROUTES=(!gateway)

# ———————————————————————–
# DAEMONS
# ———————————————————————–
#
# Daemons to start at boot-up (in this order)
# – prefix a daemon with a ! to disable it
# – prefix a daemon with a @ to start it up in the background
#
DAEMONS=(syslog-ng network netfs crond hal ham gdm @alsa)
[/bash]

/home/user/.Xmodmap

(pour les butons de controle de volume)
[bash]
keycode 160 = XF86AudioMute
keycode 176 = XF86AudioRaiseVolume
keycode 174 = XF86AudioLowerVolume
[/bash]

xorg.conf

[bash]
Section "ServerLayout"
Identifier "Xorg Configured"
Screen 0 "Screen0" 0 0
InputDevice "Keyboard0" "CoreKeyboard"
InputDevice "SynapticsTouchpad" "SendCoreEvents"
InputDevice "USB Mouse" "CoreEvents"
EndSection

Section "ServerFlags"
Option "AllowMouseOpenFail" "true"
Option "AutoAddDevices" "False"
EndSection

Section "Files"
ModulePath "/usr/lib/xorg/modules"
FontPath "/usr/share/fonts/misc:unscaled"
FontPath "/usr/share/fonts/misc"
FontPath "/usr/share/fonts/75dpi:unscaled"
FontPath "/usr/share/fonts/75dpi"
FontPath "/usr/share/fonts/100dpi:unscaled"
FontPath "/usr/share/fonts/100dpi"
FontPath "/usr/share/fonts/PEX"
# Additional fonts: Locale, Gimp, TTF…
FontPath "/usr/share/fonts/cyrillic"
# FontPath "/usr/share/lib/X11/fonts/latin2/75dpi"
# FontPath "/usr/share/lib/X11/fonts/latin2/100dpi"
# True type and type1 fonts are also handled via xftlib, see /etc/X11/XftConfig!
FontPath "/usr/share/fonts/Type1"
FontPath "/usr/share/fonts/ttf/western"
FontPath "/usr/share/fonts/ttf/decoratives"
FontPath "/usr/share/fonts/truetype"
FontPath "/usr/share/fonts/truetype/openoffice"
FontPath "/usr/share/fonts/truetype/ttf-bitstream-vera"
FontPath "/usr/share/fonts/latex-ttf-fonts"
FontPath "/usr/share/fonts/defoma/CID"
FontPath "/usr/share/fonts/defoma/TrueType"
EndSection

Section "Module"
Load "ddc" # ddc probing of monitor
Load "drm"
Load "dbe"
Load "dri"
Load "extmod"
Load "glx"
Load "bitmap" # bitmap-fonts
Load "type1"
Load "freetype"
Load "record"
Load "synaptics"
Load "int10"
Load "vbe"
EndSection

Section "InputDevice"
Identifier "Keyboard0"
Driver "keyboard"
Option "CoreKeyboard"
Option "XkbRules" "xorg"
Option "XkbModel" "pc105"
Option "XkbLayout" "fr-latin9"
Option "XkbVariant" ""
EndSection

Section "InputDevice"
Identifier "Serial Mouse"
Driver "mouse"
Option "Protocol" "Microsoft"
Option "Device" "/dev/ttyS0"
Option "Emulate3Buttons" "true"
Option "Emulate3Timeout" "70"
Option "SendCoreEvents" "true"
EndSection

Section "InputDevice"
Identifier "PS/2 Mouse"
Driver "mouse"
Option "Protocol" "auto"
Option "ZAxisMapping" "4 5"
Option "Device" "/dev/psaux"
Option "Emulate3Buttons" "true"
Option "Emulate3Timeout" "70"
Option "SendCoreEvents" "true"
EndSection

Section "InputDevice"
Identifier "USB Mouse"
Driver "mouse"
Option "Device" "/dev/input/mice"
Option "SendCoreEvents" "true"
Option "Protocol" "IMPS/2"
Option "ZAxisMapping" "4 5"
Option "Buttons" "5"
EndSection

Section "Device"
Identifier "Card0"
Driver "radeon"
Option "XAANoOffscreenPixmaps" "true" #needed for aiglx
Option "AGPMode" "4"
Option "ColorTiling" "on"
Option "AccelMethod" "EXA" #If you enable this and then can’t get back into X, remove it.
Option "AGPFastWrite" "yes" #This one can be problematic, so be prepared to remove it if you can’t get into X.
EndSection

# Auto-generated by Archie mkxcfg

Section "Monitor"
Identifier "Monitor0"
Option "DPMS" "true"
EndSection

Section "Screen"
Identifier "Screen0"
Device "Card0"
Monitor "Monitor0"
DefaultColorDepth 24
SubSection "Display"
Viewport 0 0
Depth 24
Modes "1280×800"
EndSubSection
EndSection

Section "Extensions"
Option "Composite" "Enable"
Option "RENDER" "Enable"
EndSection

Section "DRI"
Mode 0666
EndSection

Section "InputDevice"
Identifier "SynapticsTouchpad"
Driver "synaptics"
Option "AlwaysCore" "true" # send events to CorePointer
Option "Device" "/dev/psaux"
Option "Protocol" "auto-dev"
Option "VertEdgeScroll" "true" # enable vertical scroll zone
Option "HorizEdgeScroll" "true" # enable horizontal scroll zone
Option "VertScrollDelta" "100" # edge-to-edge scroll distance of the vertical scroll
Option "HorizScrollDelta" "100" # edge-to-edge scroll distance of the horizontal scroll
Option "Emulate3Buttons" "on"
Option "SHMConfig" "false" # configurable at runtime? security risk
Option "LeftEdge" "1700" # x coord left
Option "RightEdge" "5300" # x coord right
Option "TopEdge" "1700" # y coord top
Option "BottomEdge" "4200" # y coord bottom
Option "FingerLow" "25" # pressure below this level triggers release
Option "FingerHigh" "30" # pressure above this level triggers touch
# Option "MaxTapTime" "180" # max time in ms for detecting tap
Option "CornerCoasting" "true" # enable continuous scroll with finger in corner
Option "CoastingSpeed" "0.30" # corner coasting speed
# Option "MinSpeed" "0.10" # speed factor for low pointer movement
# Option "MaxSpeed" "0.60" # maximum speed factor for fast pointer movement
# Option "AccelFactor" "0.0020" # acceleration factor for normal pointer movements
Option "VertTwoFingerScroll" "true" # vertical scroll anywhere with two fingers
Option "HorizTwoFingerScroll" "true" # horizontal scroll anywhere with two fingers
Option "TapButton1" "1"
Option "TapButton2" "2"
Option "TapButton3" "3"
# Option "FastTaps" "1"
EndSection
[/bash]

.bashrc

(credits to Tao sensei)
[bash]
# Check for an interactive session
[ -z "$PS1" ] && return

# Change the window title of X terminals
case ${TERM} in
xterm*|rxvt|Eterm|eterm)
PROMPT_COMMAND=’echo -ne "�33]0;${USER}@${HOSTNAME%%.*} ${PWD}�07"’
PS1='[�33[01;34m][[�33[01;36m]u@h[�33[01;34m] W][[�33[01;31m]j[�33[01;34m]]$ [�33[00m]’
;;
screen)
PROMPT_COMMAND=’echo -ne "�33_${USER}@${HOSTNAME%%.*} ${PWD}�33"’
PS1='[�33[01;34m][[�33[01;36m]u@h[�33[01;34m] W][[�33[01;31m]j[�33[01;34m]]$ [�33[00m]’
;;
esac

# Colors for ls
[[ -f ${HOME}/.DIR_COLORS ]] && eval `dircolors -b ${HOME}/.DIR_COLORS`

alias ls=’ls –color=auto’
[/bash]

ce n’est pas notre objectif mais je garde aussi la config du serveur apache que j’avais dans mon laptop comme environnement de test(surtout la clause concernant le SVN que j’utilisais via https)

/etc/httpd/conf/extra/httpd-vhosts.conf

[shell]
NameVirtualHost *:80
<VirtualHost *:80>
ServerName www.faycal-arch.org
DocumentRoot /home/faycal/www/www.faycal-arch.org/docs
ErrorLog /var/log/httpd/faycal-arch-error.log
CustomLog /var/log/httpd/faycal-arch-error.log common
Redirect / https://www.faycal-arch.org
<Directory /home/faycal/www/www.faycal-arch.org/docs>
Order Deny,Allow
Allow from all
Options -Indexes
</Directory>
</VirtualHost>

NameVirtualHost *:443
<VirtualHost *:443>
ServerName www.faycal-arch.org
DocumentRoot /home/faycal/www/www.faycal-arch.org/docs
ErrorLog /var/log/httpd/faycal-arch-error.log
CustomLog /var/log/httpd/faycal-arch-error.log common
SSLEngine on
SSLCertificateFile /etc/httpd/conf/server.crt
SSLCertificateKeyFile /etc/httpd/conf/server.key
<Directory /home/faycal/www/www.faycal-arch.org/docs>
Order Deny,Allow
Allow from all
Options -Indexes
</Directory>

<Location /svn>
DAV svn
SVNParentPath /var/svn/repos
AuthType Basic
AuthName "Subversion repository"
AuthUserFile /var/svn/conf/svnusers
AuthzSVNAccessFile /var/svn/conf/svnpolicy
Satisfy Any
Require valid-user
</Location>

</VirtualHost>
[/shell]

Yallah, bon archlinuxage ;)