debian stable con openbox a4 (by_chamberdoor)

8

Click here to load reader

Upload: german-martinez-solis

Post on 14-Apr-2015

31 views

Category:

Documents


3 download

TRANSCRIPT

Page 1: Debian Stable Con Openbox A4 (By_ChamberDoor)

Debian GNU/Linux con OpenBoxGuía de instalación – Squeeze stable

INICIAR CON CD DE DEBIAN Elegir la opción "otros entornos gráficos", luego "lxde". Cuando pida elegir los paquetes a instalar, destildar todas las opciones (con la barra espaciadora) incluyendo la de "entorno de escritorio" y la de "sistema estandar". Va a instalar el sistema base, sin entorno gráfico.

AGREGAR REPOSITORIOSAl principio de todo poner el de CrunchBang que va a ser útil más adelante. (ponerlo comentado, y descomentarlo sólo para usar):

# deb http://packages.crunchbanglinux.org/statler statler main

Al final poner el de backports:

## DEBIAN BACKPORTS deb   http://backports.debian.org/debian­backports   squeeze­backports   main contrib non­free

Agregar “contrib non-free” al final de los repositorios de debian, si así lo queremos. Y no olvidar:

# aptitude update

INSTALAR XORG

# aptitude install xorg 

Después comentar la última línea del xinitrc de /etc/X11/xinit/, y crear un .xinitrc en nuestro directorio de usuario, copiando el contenido del otro, pero en la última línea sea:

exec ck­launch­session openbox­session 

Completo sería:

#!/bin/sh  # /etc/X11/xinit/xinitrc # # global xinitrc file, used by all X sessions started by xinit (startx)  # invoke global X session script # . /etc/X11/Xsession exec ck­launch­session openbox­session 

INSTALAR SLIM (un gestor de sesión ultraliviano):

# aptitude install slim 

Después de instalar slim, editar el slim.conf para el autologuin, que es como yo lo uso:

# nano /etc/slim.conf 

Descomentar la linea donde dice "default_user simon" y cambiar simon por el nombre de usuario.Descomentar la linea donde dice "auto_login no" y cambiar "no" por "yes".

Página 1 de 8 by ChamberDoor

Page 2: Debian Stable Con Openbox A4 (By_ChamberDoor)

INSTALAR OPENBOX

# aptitude install openbox obmenu obconf 

Mover los archivos:

# mkdir ­p /home/usuario/.config/openbox/ # cp /etc/xdg/openbox/rc.xml /home/usuario/.config/openbox/ # cp /etc/xdg/openbox/menu.xml /home/usuario/.config/openbox/ 

Asegurarnos de que todos tengan como dueño a nuestro user:

# chown usuario:usuario ­R /home/usuario/.config/ 

INSTALAR UN LANZADOR DE APLICACIONES

# aptitude install gmrun 

Y lo configuramos para que se abra con "Alt+F2" agregando al final de la sección "keyboard" de nuestro /home/user/.config/openbox/rc.xml las líneas:

<keybind key="A-F2"> <action name="execute"><execute>gmrun</execute></action> </keybind>

INSTALAR UN ADMINISTRADOR DE ARCHIVOS (File Manager) En mi caso me gusta Thunar:

#   aptitude   install   thunar   thunar­archive­plugin   thunar­media­tags­plugin thunar­thumbnailers thunar­volman 

INSTALAR UN PANEL Puede ser lxpanel, adeskbar, tint2, etc. En mi caso elegí tint2:(Para la última versión, que permite mover íconos arrastrándolos en la barra, habilitar los repositorios de CrunchBang, luego volver a comentar la línea)

# aptitude install tint2 

INSTALAR PROGRAMA PARA PODER TENER WALLPAPERS El programa se llama nitrogen:

# aptitude install nitrogen 

INSTALAR UN EMULADOR DE TERMINAL En mi caso elegí lxterminal, porque es el más liviano y funcional de todos los que he probado:

# aptitude install lxterminal 

INSTALAR UN EDITOR DE TEXTO SIMPLE

# aptitude install leafpad 

INSTALAR UN BUEN CLIPBOARD MANAGER

# aptitude install parcellite

Página 2 de 8 by ChamberDoor

Page 3: Debian Stable Con Openbox A4 (By_ChamberDoor)

APLICACIONES AL INICIO Crear un documento de texto llamado "/home/usuario/.config/openbox/autostart.sh" al cual le agregaremos las aplicaciones que queremos al inicio:

thunar ­­daemon & nitrogen ­­restore & tint2 & (sleep 3s && volumeicon) &(sleep 3s && parcellite) &cb­bad­nautilus &numlockx &

INSTALAR GESTOR DE TEMAS GTK El mejor es lxapperance. Con esta applicación y con obconfig, cambiaremos la apariencia y los temas de escritorio:

# aptitude install lxapperance 

BAD-NAUTILUS Para no tener conflictos con nautilus cuando instalemos programas de gnome que lo pidan como dependencia:

$ mkdir /home/usuario/.config/badnaut 

Y crear el /usr/bin/cb-bad-nautilus que diga lo siguiente:

#!/bin/bash # cb­bad­nautilus  if [ ­e "/home/$USER/.config/crunchbang/cb­bad­nautilus" ]; then         exit 0 else         gconftool­2 ­s ­t bool /apps/nautilus/preferences/show_desktop false                gconftool­2 ­s ­t bool /desktop/gnome/background/draw_background false                 gconftool­2   ­s   ­t   bool /apps/nautilus/preferences/show_advanced_permissions true         if [ ! ­d "/home/$USER/.config/badnaut" ]; then             mkdir /home/$USER/.config/badnaut         fi         if [ ! ­f "/home/$USER/.config/badnaut/cb­bad­nautilus" ]; then             touch /home/$USER/.config/badnaut/cb­bad­nautilus         fi fi exit 0 

Y agregar la línea "cb-bad-nautilus &" al /home/user/.config/openbox/autostart.sh

VISUALIZACIÓN E INTEGRACIÓN QT-GTK Para integrar aplicaciones qt con gtk, instalamos qt4-qtconfig:

# aptitude install libgnomeui­0# aptitude install qt4­qtconfig

Después correr "qtconfig" y elegir la opción gtk+

Página 3 de 8 by ChamberDoor

Page 4: Debian Stable Con Openbox A4 (By_ChamberDoor)

Para la visualización correcta de los bordes y los botones gtk (instalar desde el repositorio de CrunchBang):

# aptitude install gtk2­engines­murrine

GKSUPara correr programas como root en modo gráfico:

# aptitude install gksu 

APAGAR Y REINICIAR SIN SER ROOT

SUDO

# aptitude install sudo 

Fijarse en /etc/group si está la línea:

sudo:x:27:nombredeusuario 

Sinó agregarla.Crear el grupo shutdown y agregarnos, de la siguiente forma:Agregar al /etc/group la línea:

shutdown:x:407:nombredeusuario 

Agregar a /etc/sudoers las líneas:

%shutdown ALL=(root) NOPASSWD: /sbin/reboot %shutdown ALL=(root) NOPASSWD: /sbin/halt %shutdown ALL=(root) NOPASSWD: /sbin/shutdown 

MENÚ DE APAGADO Crear un archivo llamado /usr/bin/openbox-logout con el siguiente contenido:

#!/usr/bin/env python 

import pygtk pygtk.require('2.0') import gtk import os 

class DoTheLogOut: 

    # Cancel/exit     def delete_event(self, widget, event, data=None):         gtk.main_quit()         return False 

    # Logout     def logout(self, widget):         os.system("openbox ­­exit") 

    # Reboot     def reboot(self, widget):         os.system("sudo shutdown ­r now && openbox ­­exit") 

    # Shutdown     def shutdown(self, widget): 

Página 4 de 8 by ChamberDoor

Page 5: Debian Stable Con Openbox A4 (By_ChamberDoor)

        os.system("sudo shutdown ­h now && openbox ­­exit") 

    def __init__(self):         # Create a new window         self.window = gtk.Window(gtk.WINDOW_TOPLEVEL)         self.window.set_title("Exit? Choose an option:")         self.window.set_resizable(False)         self.window.set_position(1)         self.window.connect("delete_event", self.delete_event)         self.window.set_border_width(20) 

        # Create a box to pack widgets into         self.box1 = gtk.HBox(False, 0)         self.window.add(self.box1) 

        # Create cancel button         self.button1 = gtk.Button("_Cancel")         self.button1.set_border_width(10)                self.button1.connect("clicked", self.delete_event, "Changed me mind :)")         self.box1.pack_start(self.button1, True, True, 0)         self.button1.show() 

        # Create logout button         self.button2 = gtk.Button("_Log out")         self.button2.set_border_width(10)         self.button2.connect("clicked", self.logout)         self.box1.pack_start(self.button2, True, True, 0)         self.button2.show() 

        # Create reboot button         self.button3 = gtk.Button("_Reboot")         self.button3.set_border_width(10)         self.button3.connect("clicked", self.reboot)         self.box1.pack_start(self.button3, True, True, 0)         self.button3.show() 

        # Create shutdown button         self.button4 = gtk.Button("_Shutdown")         self.button4.set_border_width(10)         self.button4.connect("clicked", self.shutdown)         self.box1.pack_start(self.button4, True, True, 0)         self.button4.show() 

        self.box1.show()         self.window.show() 

def main():     gtk.main() 

if __name__ == "__main__":     gogogo = DoTheLogOut()     main() 

Después, agregarlo al obmenu con la orden: “python /usr/bin/openbox-logout”.

Página 5 de 8 by ChamberDoor

Page 6: Debian Stable Con Openbox A4 (By_ChamberDoor)

CONFIGURAR LA ZONA HORARIA (si no lo está) Borrar el localtime y crear un link a nuestra zona horaria de /usr/share/zoneinfo Ejemplo:

# rm /etc/localtime # ln ­s /usr/share/zoneinfo/posix/America/Buenos_Aires /etc/localtime 

ICONO DE CONTROL DE VOLUMEN Agregar momentáneamente el repositorio de crunchbang, y después:

# aptitude update # aptitude install volumeicon 

VISOR DE IMÁGENES Si quieren aprovechar que tenemos el repositorio de crunchbang, podemos instalar Viewnior:

# aptitude install viewnior 

CONTROLES DE SONIDO

# apt­get install alsa­base alsa­utils alsa­tools 

SCREENSHOTS

# aptitude install scrot 

Activar a la tecla “screenshot”, agregando al ·/home/usuario/.config/openbox/rc.xml” la línea:

<keybind key="Print"> <action name="Execute"> <execute>scrot   '%Y­%m­%d­­%s_$wx$h_scrot.png'   ­e   'mv   $f   ~/images/   &amp; viewnior ~/images/$f'</execute> </action> </keybind>

Agregar al menú:

scrot   '%Y­%m­%d­­%s_$wx$h_scrot.png'   ­e   'mv   $f   ~/images/   &amp;   viewnior ~/images/$f' 

Y para sacar con 5 segundos de retrazo por ejemplo:

scrot ­d 5 '%Y­%m­%d­­%s_$wx$h_scrot.png' ­e 'mv $f ~/images/ &amp; viewnior ~/images/$f' 

ARRANQUE CON NUMLOCK ACTIVADOPara que arranque el sistema con el Numlock activado:

# aptitude install numlockx

Y después agregar al /home/usuario/.config/openbox/autostart la línea:

numlockx &

Sin embargo va a pasar que el led que indica que el NumLock esta activado, va a estar apagado, y si apretamos la tecla el NumLock se desactiva y el led se prende (o sea que el led va a estar funcionando a la inversa).

Página 6 de 8 by ChamberDoor

Page 7: Debian Stable Con Openbox A4 (By_ChamberDoor)

Solución: Esto se debe a una incompatibilidad entre "numlockx" y "x11-xkb-utils", pero sólo pasa con las últimas versiones de "x11-xkb-utils". Los repos de squeeze tienen la versión 7.5+5 y los de wheezy y sid tienen la 7.6+2, Las dos son incompatibles con "numlockx". Afortunadamente la de lenny (7.4+1) funciona perfectamente. Para instalar la de lenny escribimos en la terminal:

#   wget   http://ftp.us.debian.org/debian/pool/main/x/x11­xkb­utils/x11­xkb­utils_7.4+1_i386.deb # dpkg ­i x11­xkb­utils_7.4+1_i386.deb # rm x11­xkb­utils_7.4+1_i386.deb

Esto va a instalar los paquetes viejos y ahora tanto el NumLock como el led indicador van a andar perfectamente.

A todo esto, si queremos en algún momento hacer una dist-upgrade, nos va a estropear todo lo que hicimos. Para que el día de mañana cuando nos hayamos olvidado de esto, no actualice este paquete en particular, mas vale le mandamos ahora:

# aptitude hold x11­xkb­utils

PD: Si nos arrepentimos, siempre podemos hacer un "aptitude unhold x11-xkb-utils".

INSTALAR UN NAVEGADOR DE INTERNETSe puede bajar el firefox de la página y simplemente correrlo, o sinó:

# aptitude install iceweasel 

INSTALAR JAVA Y FLASH PRIVATIVOS (opcional)

# apt­get install sun­java6­jre sun­java6­jdk sun­java6­plugin sun­java6­fonts# apt­get install flashplugin­nonfree

INSTALAR LIBREOFFICE

# apt­get ­t squeeze­backports install libreoffice# apt­get install libreoffice­gtk

INSTALAR PROGRAMAS MULTIMEDIA

# apt­get ­t squeeze­backports install audacious# apt­get install vlc

INSTALAR ARCHIVER

# apt­get install file­roller# apt­get install unrar

VISTAS EN MINIATURA PARA VIDEOS (en thunar)

# aptitude ­t squeeze­backports install ffmpegthumbnailer

Y reinciciar el sistema.

Página 7 de 8 by ChamberDoor

Page 8: Debian Stable Con Openbox A4 (By_ChamberDoor)

INSTALAR UN TEMA CLÁSICO DE CURSOR

# apt­get install dmz­cursor­theme

INSTALAR DRIVERS NVIDIA (si corresponde)

# apt­get install module­assistant mesa­utils nvidia­kernel­common nvidia­xconfig linux­headers­$(uname ­r) # m­a auto­install nvidia­kernel­source # apt­get install nvidia­glx # apt­get install nvidia­settings # nvidia­xconfig

Reiniciar y correr “nvidia-settings” para ajustar la resolución. Guardar cambios al /etc/X11/xorg.conf y reiniciar nuevamente.

SCREENSAVER (BLANK SCREEN Y APAGADO DE MONITOR)Agregar al final del /etc/X11/xorg.conf:

Section "ServerFlags"Option "blank time" "10"Option "standby time" "0"Option "suspend time" "0"Option "off time" "20"EndSection

El anterior es un ejemplo de 10 minutos para blank screen y 20 minutos para que se apague el monitor.

Para que no se active usando vlc *, crear un /usr/bin/vlc.sh que diga:

#!/bin/shxset s offxset s noblankxset ­dpmsvlc "$@"xset s onxset s blankxset +dpms

Hacerlo ejecutable con chmod +xY después editar el /usr/share/applications/vlc.desktop donde dice:

Exec=vlc %U

cambiarlo por:

Exec=/usr/bin/vlc.sh

* también es válido para hacer con cualquier otro reproductor de video.

Y bueno, esto no termina acá: Recién empieza.Ahora hay que instalar los drivers que falten si corrsponden, los programas que a uno más le gusten, configurar los menús, poner un tema de íconos...

Página 8 de 8 by ChamberDoor