Capítulo 7. El Sistema de ventanas X

Tabla de contenidos

7.1. Paquetes importantes
7.2. Configurando el entorno de escritorio
7.2.1. Menú de Debian
7.2.2. Menu de Freedesktop.org
7.2.3. Debian menu from Freedesktop.org menu
7.3. La relación servidor/cliente
7.4. El servidor X
7.4.1. La (re)configuración del servidor X
7.4.2. Métodos de conexión al servidor X
7.5. Starting the X Window System
7.5.1. Starting X session with gdm3
7.5.2. Customizing the X session (classic method)
7.5.3. Customizing the X session (new method)
7.5.4. Connecting a remote X client via SSH
7.5.5. Secure X terminal via the Internet
7.6. Fonts in the X Window
7.6.1. Basic fonts
7.6.2. Additional fonts
7.6.3. CJK fonts
7.7. X applications
7.7.1. X office applications
7.7.2. X utility applications
7.8. The X trivia
7.8.1. Clipboard
7.8.2. Keymaps and pointer button mappings in X
7.8.3. Classic X clients
7.8.4. The X terminal emulator — xterm
7.8.5. Running X clients as root
[Aviso] Aviso

Este capítulo esta desactualizado ya que esta fundamentado en Debian 7.0 (Wheezy) liberado en 2013.

The X Window System on the Debian system is based on the source from X.Org.

Existen unos pocos meta-paquetes, que se proveen para facilitar la instalación


For the basics of X, refer to X(7) and the LDP XWindow-User-HOWTO.

Un entorno de escritorio es usualmente una combinación de un manejador de ventanas, un administrador de archivos y un conjunto de programas utilitarios.

Usted puede configurar un entorno de escritorio completo como GNOME, KDE,Xfce, o LXDE, desde aptitude bajo el menu de tareas.

[Sugerencia] Sugerencia

El menu de tareas puede estar desincronizado con el último estado de transición de paquete bajo Debian en los entornos unstable/testing.En tal situación, usted necesita deseleccionar algunos meta-paquetes listados bajo el menu de tareas de aptitude(8) para evitar conflictos entre paquetes. Cuando se encuentre deseleccionando los meta-paquetes, debe seleccionar ciertos paquetes proveyendo sus dependencias manualmente para evitar que sean borrados en forma automática.

De forma alternativa, usted puede configurar un entorno de escritorio sencillo sólo con un manejador de ventanas como Fluxbox.

Para una lista de los manejadores de ventanas y escritorios disponibles para el sistema X puede visitar la guía de manejadores de ventanas para X.

El sistema de menu de Debian provee una interfaz general tanto para programas en modo texto como con interfaz gráfica mediante el comando update-menus(1) del paquete menu. Cada paquete instala la información del menu en el directorio /usr/share/menu. Véase "/usr/share/menu/README"

In order to access the traditional Debian menu from the Freedesktop.org menu compliant window manager environment such as GNOME and KDE, you must install the menu-xdg package.

El sistema de ventanas X se activa como una combinación de un servidor y un cliente. El significado para los términos servidor y cliente con respecto a los términos local y remoto requiere de atención en esta parte.


Modern X servers have the MIT Shared Memory Extension and communicate with their local X clients using the local shared memory. This bypasses the network transparent Xlib interprocess communication channel and gains performance for large images.

Véase xorg(1) para información sobre el servidor X

Hay muchas maneras de obtener una instancia del "Servidor X" (lado de visualización) para aceptar conexiones de un "cliente de X" (lado aplicación).


[Aviso] Aviso

No use conexiones TCP/IP remotas bajo redes inseguras para conexiones con un servidor X a menos que tenga una muy buena razón tal como uso de cifrado. Un socket TCP/IP remoto sin encriptar es propenso a un ataque de tipo eavesdropping y se encuentra deshabilitado por defecto en el sistema Debian. Use "ssh -X".

[Aviso] Aviso

No use conexiones XDMCP sobre una red insegura. Estas envían los datos vía UDP/IP sin cifrar, siendo propenso a un ataque de tipo eavesdropping.

[Sugerencia] Sugerencia

LTSP significa Linux Terminal Server Project

The X Window System is usually started as an X session which is the combination of an X server and connecting X clients. For the normal desktop system, both of them are executed on a workstation.

The X session is started by one of the following.

  • startx command started from the command line

  • One of the X display manager daemon programs *dm started from the end of the start up script in "/etc/rc?.d/" ("?" corresponding to the runlevel) directory

[Sugerencia] Sugerencia

The start up script for the display manager daemons checks the content of the "/etc/X11/default-display-manager" file before actually executing themselves. This ensures to have only one X display manager daemon program activated.

[Sugerencia] Sugerencia

See Sección 8.3.5, “Specific locale only under X Window” for initial environment variables of the X display manager.

Essentially, all these programs execute the "/etc/X11/Xsession" script. Then the "/etc/X11/Xsession" script performs run-parts(8) like action to execute scripts in the "/etc/X11/Xsession.d/" directory. This is essentially an execution of the first program which is found in the following order by the exec builtin command.

  1. The script specified as the argument of "/etc/X11/Xsession" by the X display manager, if it is defined.

  2. The "~/.xsession" or "~/.Xsession" script, if it is defined.

  3. The "/usr/bin/x-session-manager" command, if it is defined.

  4. The "/usr/bin/x-window-manager" command, if it is defined.

  5. The "/usr/bin/x-terminal-emulator" command, if it is defined.

This process is affected by the content of "/etc/X11/Xsession.options". The exact programs to which these "/usr/bin/x-*" commands point, are determined by the Debian alternatives system and changed by "update-alternatives --config x-session-manager", etc.

See Xsession(5) for details.

gdm3(1) lets you select the session type (or desktop environment: Sección 7.2, “Configurando el entorno de escritorio”), and language (or locale: Sección 8.3, “The locale”) of the X session from its menu. It keeps the selected default value in "~/.dmrc" as the following.

[Desktop]
Session=default
Language=ja_JP.UTF-8

Fontconfig 2.0 was created to provide a distribution independent library for configuring and customizing font access in 2002. Debian after squeeze uses Fontconfig 2.0 for its font configuration.

Font supports on X Window System can be summarized as follows.


You can check font configuration information by the following.

  • "xset q" for core X11 font path

  • "fc-match" for fontconfig font default

  • "fc-list" for available fontconfig fonts

[Sugerencia] Sugerencia

"The Penguin and Unicode" is a good overview of modern X Window System. Other documentations at http://unifont.org/ should provide good information on Unicode fonts, Unicode-enabled software, internationalization, and Unicode usability issues on free/libre/open source (FLOSS) operating systems.

There are 2 major types of computer fonts.

  • Bitmap fonts (good for low resolution rasterization)

  • Outline/stroke fonts (good for high resolution rasterization)

While scaling of bitmap fonts causes jugged image, scaling of outline/stroke fonts produces smooth image.

Bitmap fonts on the Debian system are usually provided by compressed X11 pcf bitmap font files having their file extension ".pcf.gz".

Outline fonts on the Debian system are provided by the following.

  • PostScript Type 1 font files having their file extension ".pfb" (binary font file) and ".afm" (font metrics file).

  • TrueType (or OpenType) font files usually having their file extension ".ttf".

[Sugerencia] Sugerencia

OpenType is intended to supersede both TrueType and PostScript Type 1.

Tabla 7.5. Table of corresponding PostScript Type 1 fonts

font package popularidad tamaño sans-serif font serif font monospace font source of font
PostScript N/A N/A Helvetica Times Courier Adobe
gsfonts I:708 4439 Nimbus Sans L Nimbus Roman No9 L Nimbus Mono L URW (Adobe compatible size)
gsfonts-x11 I:135 96 Nimbus Sans L Nimbus Roman No9 L Nimbus Mono L X font support with PostScript Type 1 fonts.
t1-cyrillic I:23 4882 Free Helvetian Free Times Free Courier URW extended (Adobe compatible size)
lmodern I:152 33270 LMSans* LMRoman* LMTypewriter* scalable PostScript and OpenType fonts based on Computer Modern (from TeX)

Tabla 7.6. Table of corresponding TrueType fonts

font package popularidad tamaño sans-serif font serif font monospace font source of font
ttf-mscorefonts-installer V:1, I:92 125 Arial Times New Roman Courier New Microsoft (Adobe compatible size) (This installs non-free data)
fonts-liberation I:577 2093 Liberation Sans Liberation Serif Liberation Mono Liberation Fonts project (Microsoft compatible size)
fonts-freefont-ttf V:39, I:388 10747 FreeSans FreeSerif FreeMono GNU freefont (Microsoft compatible size)
fonts-dejavu I:470 39 DejaVu Sans DejaVu Serif DejaVu Sans Mono DejaVu, Bitstream Vera with Unicode coverage
fonts-dejavu-core V:285, I:679 2954 DejaVu Sans DejaVu Serif DejaVu Sans Mono DejaVu, Bitstream Vera with Unicode coverage (sans, sans-bold, serif, serif-bold, mono, mono-bold)
fonts-dejavu-extra I:490 7217 N/A N/A N/A DejaVu, Bitstream Vera with Unicode coverage (oblique, italic, bold-oblique, bold-italic, condensed)
ttf-unifont I:23 16901 N/A N/A unifont GNU Unifont, with all printable character code in Unicode 5.1 Basic Multilingual Plane (BMP)

[Sugerencia] Sugerencia

DejaVu fonts are based on and superset of Bitstream Vera fonts.

Here are some key points focused on fonts of CJK characters.


Font name such as "VL PGothic" with "P" is a proportional font which corresponds to the fixed width "VL Gothic" font.

For example, Shift_JIS code table comprises 7070 characters. They can be grouped as the following.

  • JIS X 0201 single-byte characters (191 characters, a.k.a. half-width characters)

  • JIS X 0208 double-byte characters (6879 characters, a.k.a. full-width characters)

Double-byte characters occupy double width on console terminals which uses CJK fixed width fonts. In order to cope with such situation, Hanzi Bitmap Font (HBF) File with file extension ".hbf" may be deployed for fonts containing single-byte and double-byte characters.

In order to save space for TrueType font files, TrueType font collection file with file extension ".ttc" may be used.

In order to cover complicated code space of characters, CID keyed PostScript Type 1 font is used with CMap files starting themselves with "%!PS-Adobe-3.0 Resource-CMap". This is rarely used for normal X display but used for PDF rendering etc. (see Sección 7.7.2, “X utility applications”).

[Sugerencia] Sugerencia

The multiple glyphs are expected for some Unicode code points due to Han unification. One of the most annoying ones are "U+3001 IDEOGRAPHIC COMMA" and "U+3002 IDEOGRAPHIC FULL STOP" whose character positions differ among CJK countries. Configuring priority of Japanese centric fonts over Chinese ones using "~/.fonts.conf" should give peace of minds to Japanese.