dissabte, 8 de novembre del 2008

Archlinux: postinstal·lació


Teclat en català


Modificar locale.gen
$ nano /etc/locale.gen
# Descomentar (eliminar '#') les següents linies y comentar des que estan descomentades (no comencen amb '#')
ca_ES.UTF-8 UTF-8
ca_ES ISO-8859-1
ca_ES@euro ISO-8859-15


Modificar rc.conf
$ nano /etc/rc.conf
LOCALE="ca_ES.utf8"
KEYMAP="es"


executar locale-gen
$ locale-gen

editar ~/.bashrc per a cada usuari que vulgui localització en català
$ nano ~/.bashrc
# afegir les següent linies:
export LC_ALL=ca_ES.utf8
export LANG=ca_ES.utf8


carregar ~/.bashrc
$ source ~/.bashrc

consular localització
$ locale
# la sortida ha de ser:
LANG=ca_ES.utf8
LC_CTYPE="ca_ES.utf8"
LC_NUMERIC="ca_ES.utf8"
LC_TIME="ca_ES.utf8"
LC_COLLATE="ca_ES.utf8"
LC_MONETARY="ca_ES.utf8"
LC_MESSAGES="ca_ES.utf8"
LC_PAPER="ca_ES.utf8"
LC_NAME="ca_ES.utf8"
LC_ADDRESS="ca_ES.utf8"
LC_TELEPHONE="ca_ES.utf8"
LC_MEASUREMENT="ca_ES.utf8"
LC_IDENTIFICATION="ca_ES.utf8"
LC_ALL=ca_ES.utf8

¶ (inici)

Mòduls del kernel


Detectar els móduls
$ pacman -Suy
$ pacman -S hwdetect hwd lshwd
$ hwdetect --modules
# editar /et/rc.conf
$ nano /et/rc.conf
# Substituir MODULES=(...) per la sortida de hwdetect
# carregar automàticament els móduls (/etc/rc.conf)
MOD_AUTOLOAD="yes"
¶ (inici)

Crear un usuari


Afegir un nou usuari, on <usuari> és el nom s'usuari per accedir al sistema
$ useradd -d /home/<usuari> -g users -m <usuari>
$ passwd <usuari>
¶ (inici)

sudo


Instal·lar sudo
$ pacman -S sudo; pacman-optimize

Permetre a un usuari (<usuari>) executar des de sudo
$ gpasswd -a <usuari> wheel
$ visudo
# descomentar la linia
# %wheel ALL=(ALL) ALL
# quedant així:
%wheel ALL=(ALL) ALL
¶ (inici)

Muntar dispositius


Instal·lar hal i dbus
$ sudo pacman -S dbus hal hal-info; pacman-optimize

Configurar dbus
$ sudo groupadd -g 81 dbus
$ sudo useradd -c 'System message bus' -u 81 -g dbus -d '/' -s /bin/false dbus

Permetre a un usuari (<usuari>) muntar dispositius per mitjà de hal i dbus
$ sudo gpasswd -a <usuari> storage

Permetre a un usuari (<usuari>) accedir a una unitat de cd
$ sudo gpasswd -a <usuari> optical

Permetre a un usuari (<usuari>) accedir a una disquetera
$ sudo gpasswd -a <usuari> floppy
¶ (inici)

Permetre als usuaris automontar unitats des del Servidor de les X
#editar l'arxiu /usr/share/PolicyKit/policy/org i reemplaçar la secció <action id="org.freedesktop.hal.storage.mount-removable">
$ sudo nano /usr/share/PolicyKit/policy/org

<action id="org.freedesktop.hal.storage.mount-removable">
 <description>Mount file systems from external drives.</description>
 <message>System policy prevents mounting external media</message>
 <defaults>
  <allow_inactive>yes</allow_inactive>
  <allow_active>yes</allow_active>
 </defaults>
</action>



Actulitzar dipòsits i programari


$ sudo pacman -Syuf
¶ (inici)

Àudio


Instal·lar àudio
$ sudo pacman -S alsa-lib alsa-utils; sudo pacman-optimize

Configurar àudio
$ sudo alsaconf

Donar accés a un usuari (<usuari>) perquè pugui utilitzar l'àudio
$ sudo gpasswd -a <usuari> audio
¶ (inici)

Xarxa cablejada IP estàtica


Permetre a un usuari (<usuari>) configurar la xarxa
$ gpasswd -a <usuari> network

provar la xarxa
###############################
# en aquest exemple:
# IP EQUIP: 192.168.0.3
# MASC. XARXA 255.255.255.0
# PASARELA (GW) 192.168.0.1
# DNS: 62.36.225.150
# INTERFICIE: eth0
###############################

$ ifconfig eth0 192.168.0.3 netmask 255.255.255.0
$ route add default gw 192.168.0.1

# editar /etc/resolv.conf i afegir el dns (ex orange)
nameserver 62.36.225.150

# Provar si funciona la xarxa
$ ifconfig eth0 up
$ ping www.google.es

Configurar xarxa
# si la xarxa funiona carregar a l'inici
# editar arxiu /etc/rc.conf
$ sudo nano /etc/rc.conf
...
eth0="eth0 192.168.0.3 netmask 255.255.255.0 broadcast
192.168.0.255"
INTERFACES=(eth0)
...
DAEMONS=(... network ...)

¶ (inici)

Xarxa cablejada IP dinàmica


Permetre a un usuari (<usuari>) configurar la xarxa
$ gpasswd -a <usuari> network

provar la xarxa
###############################
# en aquest exemple:
# INTERFICIE: eth0
###############################

$ ifconfig eth0 up
$ dhcpcd eth0

# si resol i ens dona una ip
$ ping www.google.es

Configurar xarxa
# si la xarxa funiona carregar a l'inici
# editar arxiu /etc/rc.conf
$ sudo nano /etc/rc.conf
...
eth0="dhcp"
INTERFACES=(eth0)
...
DAEMONS=(... network ...)

¶ (inici)

Servidor de les X (nvidia)


Instal·lar xorg
$ sudo pacman -S hwd xorg nvidia hal hal-info dbus fam; sudo pacman-optimize

Permetre a un usuari (<usuari>) accedir directament al video (no necesari per accedir al servidor X)
$ sudo gpasswd -a <usuari> video

Configurar xorg
$ sudo hwd -x
$ sudo mv /etc/X11/xorg.conf.? /etc/X11/xorg.conf

# editar /etc/X11/xorg.conf
driver="nvidia"
$ sudo nano /etc/X11/xorg.conf

Instal·lar Gestor d'accés
$ sudo pacman -S gdm dbus hal hal-info; sudo pacman-optimize

Configurar dbus
$ sudo groupadd -g 81 dbus
$ sudo useradd -c 'System message bus' -u 81 -g dbus -d '/' -s /bin/false dbus

Configurar Gestor d'accés
# editar /etc/gdm/custom.conf (per inicar automàticament amb un usuari (<usuari>)
$ sudo nano /etc/gdm/custom.conf
# GDM Custom Configuration file.
#
# This file is the appropriate place for specifying your customizations to the
# GDM configuration. If you run gdmsetup, it will automatically edit this
# file for you and will cause the daemon and any running GDM GUI programs to
# automatically update with the new configuration. Not all configuration
# options are supported by gdmsetup, so to modify some values it may be
# necessary to modify this file directly by hand.
#
# This file overrides the default configuration settings. These settings
# are stored in the GDM System Defaults configuration file, which is found
# at the following location.
#
# /usr/share/gdm/defaults.conf.
#
# This file contains comments about the meaning of each configuration option,
# so is also a useful reference. Also refer to the documentation links at
# the end of this comment for further information. In short, to hand-edit
# this file, simply add or modify the key=value combination in the
# appropriate section in the template below this comment section.
#
# For example, if you want to specify a different value for the Enable key
# in the "[debug]" section of your GDM System Defaults configuration file,
# then add "Enable=true" in the "[debug]" section of this file. If the
# key already exists in this file, then simply modify it.
#
# Older versions of GDM used the "gdm.conf" file for configuration. If your
# system has an old gdm.conf file on the system, it will be used instead of
# this file - so changes made to this file will not take effect. Consider
# migrating your configuration to this file and removing the gdm.conf file.
#
# If you hand edit a GDM configuration file, you can run the following
# command and the GDM daemon will immediately reflect the change. Any
# running GDM GUI programs will also be notified to update with the new
# configuration.
#
# gdmflexiserver --command="UPDATE_CONFIG "
#
# e.g, the "Enable" key in the "[debug]" section would be "debug/Enable".
#
# You can also run gdm-restart or gdm-safe-restart to cause GDM to restart and
# re-read the new configuration settings. You can also restart GDM by sending
# a HUP or USR1 signal to the daemon. HUP behaves like gdm-restart and causes
# any user session started by GDM to exit immediately while USR1 behaves like
# gdm-safe-restart and will wait until all users log out before restarting GDM.
#
# For full reference documentation see the gnome help browser under
# GNOME|System category. You can also find the docs in HTML form on
# http://www.gnome.org/projects/gdm/
#
# NOTE: Lines that begin with "#" are considered comments.
#
# Have fun!

[daemon]

AutomaticLoginEnable=true

AutomaticLogin=<usuari>


TimedLogin=<usuari>

[security]

[xdmcp]

[gui]

[greeter]



[chooser]

[debug]

# Note that to disable servers defined in the GDM System Defaults
# configuration file (such as 0=Standard, you must put a line in this file
# that says 0=inactive, as described in the Configuration section of the GDM
# documentation.
#
[servers]

# Also note, that if you redefine a [server-foo] section, then GDM will
# use the definition in this file, not the GDM System Defaults configuration
# file. It is currently not possible to disable a [server-foo] section
# defined in the GDM System Defaults configuration file.
#

# editar /etc/rc.conf
$ sudo gedit /etc.rc.conf
SERVICES=(alsa esd hal dbusd fam ... gdm)
# per iniciar manualment els seveis (sense reiniciar)
$ sudo /etc/rc.d/alsa start
$ sudo /etc/rc.d/esd start
$ sudo /etc/rc.d/dbusd start
$ sudo /etc/rc.d/fam start
$ sudo /etc/rc.d/gdm start
# nota: esd permet carregar sons de sessió, (ficar després de alsa)
¶ (inici)

Gestors de finestres xfce


Instal·lar XFCE
$ sudo pacman -S xfce4; sudo pacman-optimize
¶ (inici)

Gestors de finestres gnome


Instal·lar Gnome
$ sudo pacman -S gnome gnome-extras pidgin; sudo pacman-optimize
Instal·lar Compiz
$ sudo pacman -S compiz-core compiz-manager compiz-manager compiz-bcop compizconfig-backend-gconf compiz-fusion-plugins-extra compiz-fusion-plugins-main compiz-decorator-gtk fusion-icon emerald; pacman-optimize
¶ (inici)

Gestors de finestres KDE


Eliminar versiors anteriors de kde
$ sudo pacman -Rd kde qt

Instal·lar KDE
# editar arxiu /etc/pacman.conf
$ sudo nano /etc/pacman.conf

# afegir aquestes linies per a i686
[kdemod-core]
Server=http://kdemod.ath.cx/repo/core/i686
[kdemod-extragear]
Server=http://kdemod.ath.cx/repo/extragear/i686
[kdemod-playground]
Server=http://kdemod.ath.cx/repo/playground/i686


# afegir aquestes linies per a arquitectura a 64 bits
[kdemod-core]
Server=http://kdemod.ath.cx/repo/core/x86_64
[kdemod-extragear]
Server=http://kdemod.ath.cx/repo/extragear/x86_64
[kdemod-playground]
Server=http://kdemod.ath.cx/repo/playground/x86_64


# executar
$ sudo pacman -Suyf
$ sudo pacman -S kdemod-complete kde-l10n-ca koffice-l10n-ca k3b-i18n; sudo pacman-optimize
¶ (inici)

Actualització de l'hora per NTP


Instal·lar NTP
$ sudo pacman -S ntpd; pacman-optimize
Configurar NTP
# editar /etc/rc.conf
TIMEZONE="Europa/Madrid"
# editar /etc/ntpd.conf
server hora.rediris.es
$ sudo ntpdate -u hora.rediris.es
# editar /etc/rc.conf
SERVICES=(... ntpd)
# per iniciar manualment el sevei (sense reiniciar)
$ sudo /etc/rc.d/ntpd start
¶ (inici)

Gestor d'energia ACPI


Instal·lar ACPI
$ sudo pacman -S acpi acpid acpitool; sudo pacman-optimize
Configurar ACPI
# editar /etc/rc.conf
$ sudo nano /etc/rc.conf
SERVICES=(... acpid ...)
# per iniciar manualment el sevei (sense reiniciar)
$ sudo /etc/rc.d/acpid start
Si disposeu d'un portatil
$ pacman -S laptop-mode-tools
¶ (inici)

Teclat: tecles especials i multimedia


Inst·lalar esekeyd
$ sudo pacman -S esekeyd; sudo pacman-optimize
Configurar esekeyd
# editar /etc/esekeyd.conf
$ sudo nano /etc/esekeyd.conf
# Activar tecles especials/multimedia (treure comentari '#'):
#
# ESE Key Deamon 1.2.1 config file
#

# Note: esekeyd runs all commands as root!
# In order to run commands as user you should call them this way:
#CALC:su -l username -c "/bin/bash -l -c 'DISPLAY=:0 gcalctool &'"
#
# Note that it is impossible to use xdg-utils and some Gnome/KDE applications
# because some vital environment variables are set after desktop session start,
# so shell session started via su won't have them

#BACK:
#FORWARD:
#STOP:
#REFRESH:
#SEARCH:
#BOOKMARKS:/bin/sh -c "DISPLAY=:0 xterm &"
#WWW:
#MAIL:
#PREVIOUSSONG:mpc prev &
#STOPCD:mpc stop &
#PLAYPAUSE:mpc toggle &
#NEXTSONG:mpc next &
VOLUMEDOWN:amixer set Master 5%- &
VOLUMEUP:amixer set Master 5%+ &
MUTE:amixer set Master toggle &
#MEDIA:mpc update &
#COMPUTER:
#CALC:/bin/sh -c "DISPLAY=:0 xcalc &"
#SLEEP:/bin/sh -c "DISPLAY=:0 xset dpms force standby &"

# per iniciar manualment el sevei (sense reiniciar)
$ sudo /etc/rc.d/esekeyd start
¶ (inici)

Touchpad


Instal·lar gsynaptics
$ sudo pacman -S gsynaptics; sudo pacman-optimize
Configurar gsynaptics
# editar/crear ~/.xinitrc
$ nano ~/.xinitrc
# Afegir linia:
gsynaptics-init &
# editar /etc/X11/xorg.conf
$ sudo nano /etc/X11/xorg.conf
# modificar el principi de fitxer
# InputDevice    "PS/2 Mouse" "CorePointer"
InputDevice    "Synaptics Touchpad" "CorePointer"
# afegir les següent linies al matix fitxer (/etc/X11/xorg.conf)
Section "InputDevice"
Identifier   "Synaptics Touchpad"
Driver      "synaptics"
Option      "SendCoreEvents"   "true"
Option      "Device"      "/dev/psaux"
Option      "Protocol"      "auto-dev"
#       Option      "LeftEdge"      "1700"
#       Option      "RightEdge"      "5300"
#       Option      "TopEdge"      "1700"
#       Option      "BottomEdge"      "4200"
#       Option      "FingerLow"      "25"
#       Option      "FingerHigh"      "30"
#       Option      "MaxTapTime"      "180"
#       Option      "MaxTapMove"      "220"
#       Option      "VertScrollDelta"   "100"
#       Option      "MinSpeed"      "0.60"
#       Option      "MaxSpeed"      "1.20"
#       Option      "MinSpeed"      "0.06"
#       Option      "MaxSpeed"      "0.12"
#       Option      "AccelFactor"      "0.0010"
Option      "SHMConfig"      "true"
#       Option      "Repeater"      "/dev/ps2mouse"
EndSection
¶ (inici)

VirtualBox


Instal·lar VirtualBox
$ sudo pacman -Sy virtualbox_bin; sudo pacman-optimize
$ sudo vbox_build_module
Configurar VirtualBox
# editar /etc/rc.conf
$ sudo nano /etc/rc.conf
MODULES=(... vboxdrv vboxnetflt)
# editar /etc/fstab
$ sudo nano /etc/fstab
# afegir la linea:
none /proc/bus/usb usbfs auto,busgid=108,busmode=0775,devgid=108,devmode=0664 0 0
# afegir usuaris autoritzats per utilitzar virtualbox, on USERNAME és el nom de l'usuari
$ sudo gpasswd -a USERNAME vboxusers
# per carregar el modul sense reiniciar el sistema:
$ sudo modprobe vboxdrv
$ sudo modprobe vboxnetflt
Afegir un nou usuari (<usuari>) als usuaris permesos per executar VirtualBox
$ sudo gpasswd -a <usuari> vboxusers
¶ (inici)

Instal·lar yaourt


Afegir repositori
# editar /etc/pacman.conf
$ nano /etc/pacman.conf
# afegir les segǘents línies en cas que utilitzeu i686
[archlinuxfr]
Server = http://repo.archlinux.fr/i686

# afegir les segǘents línies en cas que utilitzeu x64
[archlinuxfr]
Server = http://repo.archlinux.fr/x86_64

Actualitzar repositori
$ sudo pacman -Suyf
Instal·lar yaourt
$ sudo pacman -S yaourt; sudo pacman-optimize
¶ (inici)

Instal·lar DropBox


Instal·lar DropBox
$ sudo yaourt -S dropbox
iniciar DropBox sense tancar la sessió
Aplicacions -> Internet -> Dropbox
¶ (inici)

Instal·lar reproductors


Instal·lar codecs gstreamer
$ sudo pacman -Sy codecs `sudo pacman -Ss gstreamer | grep -e '^extra/gstreamer0.10' | awk '{print $1}'`
Instal·lar altres codecs
$ sudo pacman -Sy codecs dvdrip libdv xvidcore divx4linux; sudo pacman-optimize
Instal·lar reproductors
$ sudo pacman -Sy codecs mplayer mplayer-plugins vlc smplayer; sudo pacman-optimize
¶ (inici)

Montar partions ntfs


Instal·lar ntfs-3g ntfsprogs
$ sudo pacman -S ntfs-3g ntfsprogs; pacman-optimize
$ sudo ln -s /sbin/mount.ntfs-3g /sbin/mount.ntfs

Manejador d'imatges lowfat


$ pacman -S git
$ git clone http://people.freedesktop.org/~macslow/lowfat
$ cd lowfat
$ ./autogen.sh
$ ./configure
$ make
$ make install

Altres


$ sudo pacman -S shaman pacupdate firefox firefox-i18n flashplugin evolution bogofilter partimage gparted openoffice-base jre p7zip unrar unzip gimp gpg-crypter wine pidgin; sudo pacman-optimize
¶ (inici)

Sign by Danasoft - Myspace Layouts and Signs