lunes, 15 agosto 2005

Dos monitores con una ATI Radeon 9000

Problema.

Quiere usar dos monitores al estilo Xinerama pero en el portátil.
Debido a que es un portátil, no puedo usar otra tarjeta de video que no sea la que lleva integrada, por lo que no vale la forma en que procedí en otra ocasión, con un sobremesa con dos tarjetas de video (Vease blog anterior).

Solución.

Aquí está el xorg.conf resultante:
Section "DRI"
	Mode 0666
EndSection

Section "ServerFlags"
	Option "Xinerama"
EndSection

Section "Module"
	Load "extmod"
	Load  "record"
	Load  "dbe"
	Load  "dri"
	Load  "glx"
	Load  "freetype"
	Load  "type1"

	Load  "xtrap"
	Load "record"

EndSection

Section "Files"
	RgbPath      "/usr/lib/X11/rgb"
	ModulePath   "/usr/lib/modules"
	FontPath     "/usr/share/fonts/misc/"
	FontPath     "/usr/share/fonts/TTF/"
	FontPath     "/usr/share/fonts/Type1/"
	FontPath     "/usr/share/fonts/CID/"
	FontPath     "/usr/share/fonts/75dpi/"
	FontPath     "/usr/share/fonts/100dpi/"
        FontPath   "/usr/share/fonts/75dpi/:unscaled"
        FontPath   "/usr/share/fonts/100dpi/:unscaled"
        FontPath   "/usr/share/fonts/100dpi"
        FontPath   "/usr/share/fonts/75dpi"
        FontPath   "/usr/share/fonts/Speedo"
        FontPath   "/usr/share/fonts/corefonts"
        FontPath   "/usr/share/fonts/cyrillic"
        FontPath   "/usr/share/fonts/encodings"
        FontPath   "/usr/share/fonts/freefont"
        #FontPath   "/usr/share/fonts/local"
        FontPath   "/usr/share/fonts/terminus"
        FontPath   "/usr/share/fonts/ttf-bitstream-vera"
        FontPath   "/usr/share/fonts/ukr"
        FontPath   "/usr/share/fonts/unifont"
        #FontPath   "/usr/share/fonts/util"
        FontPath   "/usr/share/fonts/artwiz"
	FontPath "/usr/share/fonts/cronyx/100dpi/:unscaled"
	FontPath "/usr/share/fonts/cronyx/misc/:unscaled"
	FontPath "/usr/share/fonts/cronyx/75dpi/:unscaled"
EndSection

Section "InputDevice"
	Identifier  "Keyboard0"
	Driver      "kbd"
	Option "XkbModel"   "pc105"
	Option "XkbLayout"  "es"
	Option "AutoRepeat" "500 5"
	#Option "XkbVariant" "nodeadkeys"
EndSection

Section "InputDevice"
	Identifier  "USBMouse"
	Driver      "mouse"
	Option "Protocol"    "ImPS/2"
	Option "Device"      "/dev/input/mice"
	Option "ZAxisMapping" "4 5"
EndSection

Section "InputDevice"
	Identifier      "SynapticsTouchpad"
	Driver          "synaptics"
	Option          "Device"        "/dev/psaux"
	Option          "ZAxisMapping"  "4 5"
	Option          "Edges"         "1900 5400 1800 3900"
	Option          "Finger"        "25 30"
	Option          "MaxTapTime"    "180"
	Option          "MaxTapMove"    "220"
	Option          "VertScrollDelta"       "100"
	Option          "MinSpeed"      "0.02"
	Option          "MaxSpeed"      "0.18"
	Option          "AccelFactor"   "0.0007"
	Option          "SHMConfig"     "on"
	Option          "UpDownScrolling"       "on"
	Option          "Protocol"      "ImPS/2"
	Option          "CorePointer"   ""
EndSection




Section "Monitor"
	#DisplaySize	  310   230	# mm
	Identifier   "Monitor0"
	VendorName   "AUO"
	ModelName    "f03"
	HorizSync    27.0 - 90.0
	VertRefresh  40.0 - 60.0
	Option "DPMS"
EndSection

Section "Monitor"
	#DisplaySize      300   230     # mm
	Identifier   "Monitor1"
	VendorName   "AOC"
	ModelName    "LM520/LM520A"
	HorizSync    30.0 - 63.0
	VertRefresh  55.0 - 75.0
	Option      "DPMS"
EndSection

# === ATI device section ===

Section "Device"
    Identifier                          "ATI Graphics Adapter connector 0"
    # Driver                              "fglrx"
Driver "ati"
# ### generic DRI settings ###
# === disable PnP Monitor  ===
    #Option                              "NoDDC"
# === disable/enable XAA/DRI ===
    Option "no_accel"                   "no"
    Option "no_dri"                     "no"
# === misc DRI settings ===
    Option "mtrr"                       "off" # disable DRI mtrr mapper, driver has its own code for mtrr
# ### FireGL DDX driver module specific settings ###
# === Screen Management ===
    Option "DesktopSetup"               "0x00000000" 
    Option "MonitorLayout"              "LVDS, CRT"
    Option "IgnoreEDID"                 "off"
    Option "HSync2"                     "31.5       " 
    Option "VRefresh2"                  "20 - 60" 
    Option "ScreenOverlap"              "0" 
# === TV-out Management ===
    Option "NoTV"                       "yes"     
    Option "TVStandard"                 "NTSC-M"     
    Option "TVHSizeAdj"                 "0"     
    Option "TVVSizeAdj"                 "0"     
    Option "TVHPosAdj"                  "0"     
    Option "TVVPosAdj"                  "0"     
    Option "TVHStartAdj"                "0"     
    Option "TVColorAdj"                 "0"     
    Option "GammaCorrectionI"           "0x00000000"
    Option "GammaCorrectionII"          "0x00000000"
# === OpenGL specific profiles/settings ===
    Option "Capabilities"               "0x00000000"
# === Video Overlay for the Xv extension ===
    Option "VideoOverlay"               "on"
# === OpenGL Overlay ===
# Note: When OpenGL Overlay is enabled, Video Overlay
#       will be disabled automatically
    Option "OpenGLOverlay"              "off"
# === Center Mode (Laptops only) ===
    Option "CenterMode"                 "off"
# === Pseudo Color Visuals (8-bit visuals) ===
    Option "PseudoColorVisuals"         "off"
# === QBS Management ===
    Option "Stereo"                     "off"
    Option "StereoSyncEnable"           "1"
# === FSAA Management ===
    Option "FSAAEnable"                 "no"
    Option "FSAAScale"                  "1"
    Option "FSAADisableGamma"           "no"
    Option "FSAACustomizeMSPos"         "no"
    Option "FSAAMSPosX0"                "0.000000"
    Option "FSAAMSPosY0"                "0.000000"
    Option "FSAAMSPosX1"                "0.000000"
    Option "FSAAMSPosY1"                "0.000000"
    Option "FSAAMSPosX2"                "0.000000"
    Option "FSAAMSPosY2"                "0.000000"
    Option "FSAAMSPosX3"                "0.000000"
    Option "FSAAMSPosY3"                "0.000000"
    Option "FSAAMSPosX4"                "0.000000"
    Option "FSAAMSPosY4"                "0.000000"
    Option "FSAAMSPosX5"                "0.000000"
    Option "FSAAMSPosY5"                "0.000000"
# === Misc Options ===
    Option "UseFastTLS"                 "0"
    Option "BlockSignalsOnLock"         "on"
    Option "UseInternalAGPGART"         "yes"
    Option "ForceGenericCPU"            "no"
    BusID "PCI:1:0:0"    # vendor=1002, device=4c66
    Screen 0
EndSection

Section "Device"
    Identifier                          "ATI Graphics Adapter connector 1"
#    Driver                              "fglrx"
Driver "ati"
    BusID "PCI:1:0:0"    # vendor=1002, device=4c66
    Screen 1
EndSection

# **********************************************************************
# Screen sections
# **********************************************************************

# Any number of screen sections may be present.  Each describes
# the configuration of a single screen.  A single specific screen section
# may be specified from the X server command line with the "-screen"
# option.
Section "Screen"
    Identifier  "Screen0"
    Device      "ATI Graphics Adapter connector 0"
    Monitor     "Monitor0"
    DefaultDepth 24
    #Option "backingstore"

	SubSection "Display"
		Depth     24
		# Virtual   2048 768
		Modes    "1024x768" "800x600" "640x480"
		ViewPort    0 0  # initial origin if mode is smaller than desktop
	EndSubSection
	SubSection "Display"
		Depth     16
		# Virtual   2048 768
		Modes    "1024x768" "800x600" "640x480"
		ViewPort    0 0  # initial origin if mode is smaller than desktop
	EndSubSection

EndSection

Section "Screen"
    Identifier  "Screen1"
    Device      "ATI Graphics Adapter connector 1"
    Monitor     "Monitor1"
    DefaultDepth 24
    #Option "backingstore"

	SubSection "Display"
		Depth     24
		# Virtual   2048 768
		Modes    "1024x768" "800x600" "640x480"
		ViewPort    0 0  # initial origin if mode is smaller than desktop
	EndSubSection
	SubSection "Display"
		Depth     16
		# Virtual   2048 768
		Modes    "1024x768" "800x600" "640x480"
		ViewPort    0 0  # initial origin if mode is smaller than desktop
	EndSubSection
EndSection


# **********************************************************************
# ServerLayout sections.
# **********************************************************************

# Any number of ServerLayout sections may be present.  Each describes
# the way multiple screens are organised.  A specific ServerLayout
# section may be specified from the X server command line with the
# "-layout" option.  In the absence of this, the first section is used.
# When now ServerLayout section is present, the first Screen section
# is used alone.

Section "ServerLayout"

# The Identifier line must be present
    Identifier  "Server Layout"

# Each Screen line specifies a Screen section name, and optionally
# the relative position of other screens.  The four names after
# primary screen name are the screens to the top, bottom, left and right
# of the primary screen.

    Screen "Screen0"
    Screen "Screen1" RightOf "Screen0"

# Each InputDevice line specifies an InputDevice section name and
# optionally some options to specify the way the device is to be
# used.  Those options include "CorePointer", "CoreKeyboard" and
# "SendCoreEvents".

    InputDevice	"USBMouse" "CorePointer"
    InputDevice	"Keyboard0" "CoreKeyboard"

EndSection

### EOF ###




Posted by angel at 5:34 PM in Gentoo

domingo, 24 julio 2005

Xinerama, nVidia Geforce4 MX440 y S3 ViRGE/DX

Creía que iba a ser más difícil.
La única dificultad que me he encontrado ha sido a la hora de detectar el bus PCI donde está enchufada la s3virge, para indicarlo en el parámetro BusID del xorg.conf
Resulta que es el valor que nos devuelve lspci, pero en decimal.
En mi caso:
0000:00:0c.0 VGA compatible controller: S3 Inc. ViRGE/DX or /GX (rev 01) -> 00:0c.0 -> BusID 0:12:0
0000:01:00.0 VGA compatible controller: nVidia Corporation NV17 [GeForce4 MX 440] (rev a3) -> 01:00.0 -> BusID 1:0:0
Links: Xinerama, un ejemplo práctico
Posted by angel at 10:24 PM in Gentoo

jueves, 28 julio 2005

Impresión dos páginas por cara y demás chorradillas

Vamos a imprir un documento metiendo en un hoja dos páginas del documento y vamos a imprimir estas hojas por las dos caras.
Para el ejemplo usuaremos el manual de css2.1 que tenemos en pdf.

  • Paso 1.

    Pasamos a ps.
    # pdf2ps css2.1_spa.pdf css2.1_spa.ps
  • Paso 2.

    Generamos dos páginas por hoja.
    # psnup -2 css2.1_spa.ps css2.1_spa_2pps.ps
  • Paso 3.

    Separamos las impares de las pares y las ponemos en orden inverso.
    # psselect -o -r css2.1_spa_2pps.ps css2.1_spa_2pps_impares.ps
  • Paso 4.

    Vamos imprimiendo las hojas impares.
    # lp css2.1_spa_2pps_impares.ps
  • Paso 5.

    Separamos las pares de las impares.
    # psselect -e css2.1_spa_2pps.ps css2.1_spa_2pps_pares.ps
  • Paso 6.

    Imprimimos las hojas pares.
    Una vez que se terminan de imprimir las hojas impares, ponemos en la fuente del papel el taco de folios con la impresión de las hojas impares.
    Imprimimos y se imprimirá por el reverso en blanco de las hojas impares.
    # lp css2.1_spa_2pps_pares.ps

Ahora vamos a coger una imagen en postcript y la vamos a generar otra en forma de poster.
Usaremos un ps con el modelo de datos de una aplicación (lógicamente, puede ser cualquier imagen).
El primer comando generará un poster de cuatro hojas (2x2) en A4, sin márgenes para las marcas que se generan para cortar.
El segundo lo envía a la impresora.
# poster -v -c0 -w0 -mA4 -s2 modeloDeDatos.ps > modeloDeDatosPoster.ps
# lp provercomModelo2.ps

Fácil, verdad? Luego dicen que linux es complicado.
Decir que esto vale para cualquier impresora, tanto para la impresora matricial que tienes tirada en el trastero como para la flamante impresora laser en color de la oficina.

Posted by angel at 8:53 PM in Gentoo

sábado, 24 septiembre 2005

Instalando el servidor cvs

Referencias:

http://www.salleurl.edu/~is04069/Codders/cvspasoapaso.html
http://networking.earthweb.com/netsysm/print.php/2190911
http://www.cse.sc.edu/~jqu/work/systemadmin/cvs.html
http://www.geocities.com/sl_edu_colombia/soluciones/irving/wincvs/objetivos.html

Instalando:

Lo voy a instalar para que se pueda accerder mediante ssh, por lo que no precisa ni de servidor pserver ni nada de nada.
Lo primero es instalar los paquetes:
# emerge cvs
Una vez instalado vemos que las variables de entorno son correctas:

# echo $CVSROOT
La sentencia anterior nos dirá el path donde está el repositorio. En mi caso /var/cvsroot Si no os devuelve nada deberéis meter esta variable de entorno en /etc/env.d y ejecutar env-update.

# echo $CVS_RSH
La sentencia anterior nos dirá el programa para acceder de forma remota a un repositorio cvs (creo). Debería ser ssh, pero sólo tiene importancia si vamos a utilizar el ordenador como cliente.

# cvs init
La sentencia anterior inicializará el repositorio en el path indicado en $CVSROOT.

Al intentar acceder me dio un error ya que no podía tener acceso al directorio de locks (entre otras cosas porque no existía. Para solucionarlo:
# mkdir /var/lock/cvs
Si no te da el error, pues no hace falta.

Como está ahora funcionaría siempre y cuando accedieramos como root. Pero como no es lo correcto nos creamos un grupo cvs (y si queremos también un usuario) y metemos en el grupo cvs los usuarios que queremos que tengan acceso al repositorio.
Cambiamos los propietarios y permisos del los directorio:
# chown cvs:cvs /var/lock/cvs
# chown cvs:cvs /var/cvsroot
# chmod -R ug+rwX /var/lock/cvs
# chmod -R ug+rwX /var/cvsroot

Y a vivir que son dos días.
Ahora queda manejar el cliente de cvs, pero eso se da por sentado (sería otra historia).
Posted by angel at 9:15 PM in Gentoo

martes, 18 octubre 2005

Montado automático

Existe un problema con linux para los usuarios nóveles (y acostumbrados a otro sistemas operativos). Es el entender por qué lo de montar los dispositivos.
Para solucionar esto, sólo hay que insatalar los siguiente paquetes.
Estos programas se encargarán de detectar el tipo del dispositivo conectado y en montarlo.
# emerge dbus hal ivman
# rc-update add dbus default
# rc-update add hald default
# rc-update add ivman default
Posted by angel at 2:33 PM in Gentoo

sábado, 2 julio 2005

Puñeteros "Blogger Clients."

Acabo de instalar mi blog. El motor es el blojsom.
Ahora estoy buscado un buen cliente, mejor si está disponible en el portage del Gentoo. De momento he probado:

Gnome-blog 0.9.
Muy simplón, pero funciona. Aunque sólo vale para añadir entradas, y no para editar.

Drivel.
No he conseguido configurarlo para que se enchufe con mi blog.

BloGTK 1.1.
Estoy probando y no parece ir muy bien.
Cuidado!! - NO TIENE DESHACER (UNDO o Ctrl.+z o como lo quieras llamar). He borrado un trozo de texto por error, y lo he perdido para siemprea jamás. MUY MAL!!!!
Actualización 20-7-2005:
Para que funcione correctamente hay que tener instalado el paquete gnome-python-extras para el uso del módulo gtkhtml2 y la versión 2.6.1 de gnome-python.

En definitiva, que no hay ninguno que me parezca lo suficientemente bueno.
Eso sí, siempre son mejores que tener que escribir desde la web.

Posted by angel at 10:00 PM in Gentoo

sábado, 2 abril 2005

Thunderbird y evolution y navegador por defecto

Indicar al Thunderbird cual es el navegador instalado.


Si tienes instalado el xfce4 y los paquetes thunderbird y firefox, en vez del mozilla, los links de los correos no abren el navegador.
La solución es un intercambio de correos en el foro gentoo-user-es.
En /usr/lib/MozillaThunderbird/defaults/pref/all-thunderbird.js
pref("network.protocol-handler.app.http","firefox");
pref("network.protocol-handler.app.https","firefox"); 

Esta forma de configurar el cliente de correo es la más intuitiva que he visto nunca jamás. Madre de Dios!

Gracias a José Zamora y xLekOx por puntualizar en la entrada original.

Para el Evolution (y el gnome en general) es algo parecido:

# gconftool-2 --set /desktop/gnome/url-handlers/http/command -t string 'firefox %s'
# gconftool-2 --set /desktop/gnome/url-handlers/https/command -t string 'firefox %s'

Posted by angel at 10:00 PM in Gentoo

miércoles, 20 julio 2005

sandbox y ACCESS VIOLATION SUMMARY

No es la primera vez que me pasa, y nunca me acuerdo cómo demonios se desactiva el sandbox.
Parece una tontería, pero mi memoria no da para más.

Esta vez ha sido con el blogtk:

# emerge  net-misc/blogtk
Calculating dependencies ...done!
>>> emerge (1 of 1) net-misc/blogtk-1.1 to /
>>> md5 files   ;-) blogtk-1.0.ebuild
>>> md5 files   ;-) blogtk-1.1.ebuild
>>> md5 files   ;-) files/digest-blogtk-1.0
>>> md5 files   ;-) files/digest-blogtk-1.1
>>> md5 files   ;-) files/blogtk-1.0-destdir.patch
>>> md5 src_uri ;-) BloGTK-1.1.tar.bz2
>>> Unpacking source...
>>> Unpacking BloGTK-1.1.tar.bz2 to /var/tmp/portage/blogtk-1.1/work
 * Applying blogtk-1.0-destdir.patch ...                                                                                                                             [ ok ]>>> Source unpacked.
>>> Test phase [not enabled]: net-misc/blogtk-1.1

>>> Install blogtk-1.1 into /var/tmp/portage/blogtk-1.1/image/ category net-misc
mv src/BloGTK.py src/BloGTK.py.old
sed -e "s|/usr/share|`pkg-config libgnome-2.0 --variable=prefix || echo /usr`/share|g" src/BloGTK.py.old > src/BloGTK.py
rm src/BloGTK.py.old
install -m 755 -d /var/tmp/portage/blogtk-1.1/image/`pkg-config libgnome-2.0 --variable=prefix || echo /usr`/bin /var/tmp/portage/blogtk-1.1/image/`pkg-config libgnome-2.0 --variable=prefix || echo /usr`/lib/blogtk /var/tmp/portage/blogtk-1.1/image/`pkg-config libgnome-2.0 --variable=prefix || echo /usr`/share/blogtk /var/tmp/portage/blogtk-1.1/image/`pkg-config libgnome-2.0 --variable=prefix || echo /usr`/share/applications  /var/tmp/portage/blogtk-1.1/image/`pkg-config libgnome-2.0 --variable=prefix || echo /usr`/share/pixmaps
install -m 755 src/* /var/tmp/portage/blogtk-1.1/image/`pkg-config libgnome-2.0 --variable=prefix || echo /usr`/lib/blogtk
install -m 644 pixmaps/* /var/tmp/portage/blogtk-1.1/image/`pkg-config libgnome-2.0 --variable=prefix || echo /usr`/share/blogtk
install -m 644 data/blogtk-icon.png /var/tmp/portage/blogtk-1.1/image/`pkg-config libgnome-2.0 --variable=prefix || echo /usr`/share/pixmaps
install -m 644 data/blogtk.desktop /var/tmp/portage/blogtk-1.1/image/`pkg-config libgnome-2.0 --variable=prefix || echo /usr`/share/applications
ln -sf `pkg-config libgnome-2.0 --variable=prefix || echo /usr`/lib/blogtk/BloGTK.py /var/tmp/portage/blogtk-1.1/image/`pkg-config libgnome-2.0 --variable=prefix || echo /usr`/bin/BloGTK
chmod +x /var/tmp/portage/blogtk-1.1/image/`pkg-config libgnome-2.0 --variable=prefix || echo /usr`/bin/BloGTK
ACCESS DENIED   chmod:     /var/tmp/portage/blogtk-1.1/image/usr/bin/BloGTK
chmod: cambiando los permisos de «/var/tmp/portage/blogtk-1.1/image//usr/bin/BloGTK»: Permiso denegado
make: *** [install] Error 1

!!! ERROR: net-misc/blogtk-1.1 failed.
!!! Function src_install, Line 35, Exitcode 2
!!! Unable to compile blogtk
!!! If you need support, post the topmost build error, NOT this status message.

--------------------------- ACCESS VIOLATION SUMMARY ---------------------------
LOG FILE = "/tmp/sandbox-net-misc_-_blogtk-1.1-7620.log"

chmod:     /var/tmp/portage/blogtk-1.1/image/usr/bin/BloGTK (symlink to /usr/lib/blogtk/BloGTK.py)
--------------------------------------------------------------------------------
Para arreglarlo:
FEATURES="-sandbox" emerge blogtk

Posted by angel at 11:53 AM in Gentoo