Table of Contents
The X window system on the Debian system is based on the source from X.Org. As of January 2009, they are X11R7.1(etch), X11R7.3(lenny) and X11R7.3(sid).
There are a few (meta)packages provided to ease installation.
Table 8.1. List of key (meta)packages for X window.
(meta)package |
popcon |
size |
description |
---|---|---|---|
|
I:56 |
52 |
This metapackage provides the X libraries, an X server, a set of fonts, and a group of basic X clients and utilities. |
|
V:20, I:62 |
696 |
This package provides the full suits of the X server and its configuration. |
|
V:25, I:64 |
84 |
This package provides a miscellaneous assortment of the X clients. |
|
V:48, I:88 |
896 |
This package contains the filesystem infrastructure for the X window system. |
|
I:12 |
5068 |
This package contains miscellaneous documentation for the X.Org software suite. |
|
I:1.8 |
6504 |
This package contains X protocol, extension, and library technical specifications. |
|
V:32, I:62 |
1956 |
This package generates the Debian menu for all menu-aware applications. |
|
I:60 |
76 |
This package converts the Debian menu structure to the freedesktop.org xdg menu structure. |
|
V:8, I:53 |
256 |
This package provides utilities to integrate desktop environment provided by the freedesktop.org. |
|
I:38 |
20 |
metapackage for the stadard GNOME desktop environment. |
|
I:14 |
40 |
metapackage for the core KDE desktop environment. |
|
I:5 |
48 |
metapackage for the Xfce lightweight desktop environment. |
|
I:0.5 |
40 |
metapackage for the LXDE lightweight desktop environment. |
|
V:1.3, I:3 |
4332 |
Fluxbox: package for highly configurable and low resource X window manager. |
For the basics of X, refer to X
(7), the LDP XWindow-User-HOWTO.
A desktop environment is usually a combination of a X window manager, a file manager, and a suite of compatible utility programs.
You can setup a full desktop environment such as GNOME, KDE, Xfce, or LXDE, from the aptitude
under the task menu.
![]() |
Tip |
---|---|
Task menu may be out of sync with the latest package transition state under Debian |
You may alternatively setup a simple environment manually just with a X window manager such as Fluxbox.
See Window Managers for X for the guide to the X window manager and the desktop environment.
Debian menu system provides a general interface for both text- and X-oriented programs with the update-menus
(1) command from the menu
package. Each package installs its menu data in the /usr/share/menu/
directory. See /usr/share/menu/README
.
Each package which is compliant to Freedesktop.org's xdg menu system installs its menu data provided by "*.desktop
" under the /usr/share/applications/
directory. Modern desktop environments which are compliant to Freedesktop.org standard use these data to generate their menu using the xdg-utils
package. See /usr/share/doc/xdg-utils/README
.
In order to obtain access to the traditional Debian menu under GNOME desktop environment, you must install the menu-xdg
package, click "System" -> "Preference" -> "Main Menu", and check the box for "Debian".
![]() |
Tip |
---|---|
You may need to do the similar for other modern desktop environments which are compliant to Freedesktop.org standard. |
The X window system is activated as a combination of the server and client programs. The meaning for the words server and client with respect to the words local and remote requires attention here:
Table 8.2. List of server/client terminology.
type |
description |
---|---|
X server |
a program run on a local host connected to the user's display and input devices. |
X client |
a program run on a remote host that processes data and talks to the X server. |
application server |
a program run on a remote host that processes data and talks to the clients. |
application client |
a program run on a local host connected to the user's display and input devices. |
See xorg
(1) for X server information.
To (re)configure an X server,
# dpkg-reconfigure --priority=low x11-common # dpkg-reconfigure --priority=low xserver-xorg
will generate a new /etc/X11/xorg.conf
file using dexconf
(1).
If you have manually edited this /etc/X11/xorg.conf
file but would like it to be automatically updated again, run the following command:
# sudo dpkg-reconfigure -phigh xserver-xorg
Please check your X configuration with respect to the specification of your monitor carefully. For the large high resolution CRT monitor, it is a good idea to set the refresh rate as high as your monitor can handle (85 Hz is great, 75 Hz is OK) to reduce flicker. For the LCD monitor, slower standard refresh rate (60Hz) is usually fine due to its slow response.
![]() |
Note |
---|---|
Be careful not to use too high refresh rate which may cause fatal hardware failure of your monitor system. |
There are several ways of getting the "X server" (display side) to accept connections from an "X client" (application side):
Table 8.3. List of connection methods to the X server.
method |
package |
popcon |
size |
user |
encryption |
pertinent use |
---|---|---|---|---|---|---|
|
|
V:25, I:64 |
84 |
unchecked |
no |
deprecated |
|
|
V:25, I:64 |
84 |
checked |
no |
for local connection via pipe |
|
|
V:54, I:98 |
2080 |
checked |
yes |
for remote network connection |
Gnome display manager |
|
V:32, I:49 |
15215 |
checked |
no(XDMCP) |
for local connection via pipe |
KDE display manager |
|
V:10, I:13 |
1668 |
checked |
no(XDMCP) |
for local connection via pipe |
X display manager |
|
V:0.9, I:2 |
812 |
checked |
no(XDMCP) |
for local connection via pipe |
WindowMaker display manager |
|
V:20, I:85 |
1968 |
checked |
no(XDMCP) |
for local connection via pipe |
Secure display manager |
|
V:0.03, I:0.19 |
124 |
checked |
yes |
for remote SSH network connection (thin client) |
Linux Terminal Server Project display manager |
|
V:0.00, I:0.09 |
500 |
checked |
yes |
for remote SSH network connection (thin client) |
![]() |
Warning |
---|---|
Do not use remote TCP/IP connection over unsecured network unless you have very good reason. A remote TCP/IP socket connection without encryption is prone to the eavesdropping attack and is disabled by default on the Debian system. Use |
![]() |
Tip |
---|---|
You can dare to enable remote TCP/IP connection by setting |
![]() |
Warning |
---|---|
Do not use XDMCP connection over unsecured network either. It sends data via UDP without encryption and prone to the eavesdropping attack. |
The X Window system is usually started as an X session which is the combination of an X server and connecting X clients. For normal desktop system, both of them are executed on the workstation.
To start the X Window system,
startx
command started from the command line, or
one of the X display manager daemon programs *dm
started from the end of the start up script in /etc/rc?.d/
directory (?
corresponding to the runlevel)
are used to start the X session. (The start up script for the display manager daemons checks the content of the /etc/X11/default-display-manager
file before actually executing themselves.)
![]() |
Tip |
---|---|
See Section 9.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 like action to execute scripts in the /etc/X11/Xsession.d/
directory. This is essentially an execution of a program which was first found in the following order with the exec
command:
The script specified as the argument of /etc/X11/Xsession
by the X display manager, if it is defined.
The ~/.xsession
or ~/.Xsession
script, if it is defined.
The /usr/bin/x-session-manager
command, if it is defined.
The /usr/bin/x-window-manager
command, if it is defined.
The /usr/bin/x-terminal-emulator
command, if it is defined.
This process is affected by the content of the /etc/X11/Xsession.options
file. The exact programs to which these usr/bin/x-*
commands point, are determined by the Debian alternative system and changed by update-alternatives --config x-session-manager
etc.
The gdm
program lets you select the session type (or desktop environment: Section 8.2, “Setting up desktop environment”), and language (or locale: Section 9.3, “The locale”) of the X session from its menu. It keeps the selected default value in ~/.dmrc
as, e.g.:
[Desktop] Session=default Language=ja_JP.UTF-8
On a system where /etc/X11/Xsession.options
contains a line allow-user-xsession
without preceding #
characters, any user who defines ~/.xsession
or ~/.Xsession
will be able to customize the action of /etc/X11/Xsession
by completely overiding the system code. The last command in the ~/.xsession
file should use form of exec some-window/session-manager
to start your favorite X window/session managers.
Here are new methods to customize the X session without completely overiding the system code as above.
The display manager gdm
can select a specific session and set it as the argument of /etc/X11/Xsession
.
The ~/.xsessionrc
file is executed as a part of start up process (desktop independent.)
The ~/.gnomerc
file is executed as a part of start up process. (Gnome desktop only)
The GUI program based session management software can use the ~/.gnome2/session
file etc..
The use of ssh -X
enables a secure connection from a local X server to a remote application server.
Set X11Forwarding
entries to yes
in /etc/ssh/sshd_config
of the remote host, if you want to avoid -X
command-line option.
Start the X server on the local host.
Open an xterm
in the local host.
Run ssh
to establish a connection with the remote site.
localname @ localhost $ ssh -q -X loginname@remotehost.domain Password: .....
Run an X application command, e.g. gimp
, on the remote site.
loginname @ remotehost $ gimp &
This method allows the display of the remote X client output as if it were locally connected through a local UNIX domain socket.
Secure X terminal via Internet, which displays remotely run entire X desktop environment, can easily achieved by using specialized package such as sdm
and ldm
. Your local machine becomes a secure thin client to the remote application server connected via SSH.
If you want to add similar feature to your normal display manager gdm
, create executable shell script at /usr/local/bin/ssh-session
as:
#!/bin/sh -e # Based on gdm-ssh-session in gdm source (GPL) ZENITY=$(type -p zenity) TARGETHOST=$($ZENITY --width=600 \ --title "Host to connect to" --entry \ --text "Enter the name of the host you want to log in to as user@host.dom:") TARGETSESSION=$($ZENITY --width=600 --height=400 \ --title "Remote session name" --list --radiolist --text "Select one" \ --column " " --column "Session" --column "description" --print-column 2 \ TRUE "/etc/X11/Xsession" "Debian" \ FALSE "/etc/X11/xinit/Xclients" "RH variants" \ FALSE "gnome-session" "Gnome session" \ FALSE "xterm" "Safe choice" \ FALSE "rxvt" "Safe choice" \ FALSE "gnome-terminal" "Safe choice") echo "Connecting to "$TARGETHOST" with $TARGETSESSION" /usr/bin/ssh -A -X -T -n "$TARGETHOST" "$TARGETSESSION" #SSH_ASKPASS=/usr/bin/ssh-askpass /usr/bin/ssh -A -X -T -n "$TARGETHOST" "$TARGETSESSION"
Then add followings to /etc/dm/Sessions/ssh.desktop
:
[Desktop Entry] Encoding=UTF-8 Name=SSH Comment=This session logs you into a remote host using ssh Exec=/usr/local/bin/ssh-session Type=Application
X window on the Debian system support two mechanisms for font management:
server side font management: the original core X11 font system and
client side font management: the new Xft 2 font system.
The core X11 font system provides backward compatibility with older applications such as Xterm with bitmap fonts. It is supported by installing pertinent font packages which trigger defoma
scripts to generate required files such as "fonts.dir
".
The Xft2 font system is used by all modern applications such as ones from GNOME, KDE, OpenOffice.org, etc.. It supports all fonts listed below (Section 8.6.1, “Basic fonts”, Section 8.6.2, “Additional fonts”, and Section 8.6.3, “CJK fonts”) with advanced features such as anti-aliasing. It has no configuration mechanism itself, rather it relies upon the fontconfig library to configure and customize fonts as described in fonts.conf
(5). Actual rasterization is supported by the FreeType 2 font engine. These new X clients using Xft2 font system can talk to modern X server via the X Rendering Extension.
Table 8.4. Table of packages to support X window font systems.
package |
popcon |
size |
description |
---|---|---|---|
|
V:38, I:70 |
456 |
X Window System font utility programs |
|
V:40, I:76 |
144 |
Xft: FreeType-based font drawing library for X |
|
V:51, I:88 |
740 |
FreeType 2 font engine, shared library files |
|
V:34, I:75 |
272 |
generic font configuration library - support binaries |
|
V:24, I:82 |
250 |
generic font configuration library - configuration |
|
V:22, I:85 |
449 |
Debian Font Manager -- automatic font configuration framework |
|
I:30 |
156 |
TrueType configuration for X (for CJK support) |
You can check actual font path for:
core X11 font path with "xset q
"
fontconfig font default: "fc-match
"
![]() |
Tip |
---|---|
"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. |
![]() |
Tip |
---|---|
You should rely on fontconfig infrastructure to configure fonts on the Debian system. Debian Font Manager ( |
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 provided by compressed X11 pcf bitmap font files having their file extension ".pcf.gz
".
Outline fonts on the Debian system are provided by:
PostScript Type 1 font files having their file extension ".pfb
" (binary font file) and ".afm
" (font metrics file).
TrueType font files having their file extension ".ttf
".
Table 8.5. Table of corresponding PostScript Type 1 fonts.
font package |
popcon |
size |
sans-serif font |
serif font |
monospace font |
source of font |
---|---|---|---|---|---|---|
(PostScript) |
Not applicable |
NOT_FOUND |
Adobe |
|||
gsfonts |
I:71 |
4792 |
Nimbus Sans L |
Nimbus Roman No9 L |
Nimbus Mono L |
URW (Adobe compatible size) |
gsfonts-x11 |
I:26 |
116 |
Nimbus Sans L |
Nimbus Roman No9 L |
Nimbus Mono L |
X font support with PostScript Type 1 fonts. |
t1-cyrillic |
I:1.7 |
4996 |
Free Helvetian |
Free Times |
Free Courier |
URW extended (Adobe compatible size) |
lmodern |
V:4, I:13 |
46180 |
LMSans* |
LMRoman* |
LMTypewriter* |
scalable PostScript and OpenType fonts based on Computer Modern (from TeX) |
Table 8.6. Table of corresponding TrueType fonts.
font package |
popcon |
size |
sans-serif font |
serif font |
monospace font |
source of font |
---|---|---|---|---|---|---|
ttf-mscorefonts-installer |
I:8 |
188 |
Microsoft (Adobe compatible size) (This installs non-free data) |
|||
ttf-liberation |
I:23 |
1696 |
Liberation Sans |
Liberation Serif |
Liberation Mono |
Liberation Fonts project (Microsoft compatible size) |
ttf-freefont |
I:15 |
3412 |
FreeSans |
FreeSerif |
FreeMono |
GNU freefont (Microsoft compatible size) |
ttf-bitstream-vera |
I:20 |
732 |
Bitstream Vera Sans |
Bitstream Vera Serif |
Bitstream Vera Sans Mono |
|
ttf-dejavu |
I:82 |
68 |
DejaVu Sans |
DejaVu Serif |
DejaVu Sans Mono |
http://dejavu.sourceforge.net/, Bitstream with extended character code support |
ttf-dejavu-core |
I:31 |
2488 |
DejaVu Sans |
DejaVu Serif |
DejaVu Sans Mono |
http://dejavu.sourceforge.net/ basic font style variants |
ttf-dejavu-extra |
I:31 |
5504 |
DejaVu Sans |
DejaVu Serif |
DejaVu Sans Mono |
http://dejavu.sourceforge.net/ extra font style variants |
ttf-unifont |
I:2 |
16060 |
N/A |
N/A |
unifont |
http://Unifoundry.com, GNU Unifont, with all printable character code in Unicode 5.1 Basic Multilingual Plane (BMP) |
The aptitude
will help you find additional fonts easily:
by the short package list under "Packages which depend on defoma" under the defoma
package list,
by the short package list under "Tasks" -> "Localization",
by the filtered flat package list of font data with regex on debtag: "~Gmade-of::data:font
",
by the filtered flat package list of the BDF (bitmap) font packages with regex on package name: "~nxfonts-
", or
by the filtered flat package list of the TrueType (outline) font packages with regex on package name: "~nttf-
".
Since Free fonts are sometimes limited, installing or sharing some commercial TrueType fonts is an option for a Debian users. In order to make this process easy for the user, some convenience packages have been created:
ttf-mathematica4.1
ttf-mscorefonts-installer
You'll have a really good selection of TrueType fonts at the expense of contaminating your Free system with non-Free fonts.
Here are some key points focused on CJK issues.
Table 8.7. Table of key words used in CJK font names to indicate font types.
font type |
Japanese font name |
Chinese font name |
Korean font name |
---|---|---|---|
sans-serif |
gothic, ゴチック |
hei, gothic |
dodum, gulim, gothic |
serif |
mincho, 明朝 |
song, ming |
batang |
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 into:
JIS X 0201 single-byte characters (191 characters),
JIS X 0208 double-byte characters (6879 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.
I order to cover complicated code space of characters, CID keyed Type 1 PostScript 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 Section 8.7.2, “X utility applications”).
![]() |
Tip |
---|---|
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 " |
Here is a list of basic office applications (OO is OpenOffice.org):
Table 8.8. List of basic X office applications
package |
popcon |
package size |
description |
type |
---|---|---|---|---|
|
V:21, I:52 |
22560 |
word processor |
OO |
|
V:21, I:51 |
16412 |
spreadsheet |
OO |
|
V:20, I:51 |
2940 |
presentation |
OO |
|
V:19, I:50 |
8916 |
database management |
OO |
|
V:20, I:51 |
8476 |
vector graphics editor (draw) |
OO |
|
V:19, I:50 |
1580 |
mathematical equation/formula editor |
OO |
|
V:3, I:5 |
8296 |
word processor |
GNOME |
|
V:4, I:9 |
7072 |
spreadsheet |
GNOME |
|
V:13, I:55 |
11928 |
bitmap graphics editor (paint) |
GTK |
|
V:7, I:18 |
61376 |
vector graphics editor (draw) |
GNOME |
|
V:2, I:5 |
596 |
flowchart and diagram editor |
GNOME |
|
V:0.15, I:0.3 |
1412 |
database management |
GNOME |
|
V:0.9, I:6 |
7388 |
project management |
GNOME |
|
V:1.1, I:2 |
8528 |
word processor |
KDE |
|
V:1.1, I:2 |
9064 |
spreadsheet |
KDE |
|
V:0.9, I:2 |
4492 |
presentation |
KDE |
|
V:0.4, I:2 |
12092 |
database management |
KDE |
|
V:1.0, I:2 |
2224 |
flowchart and diagram editor |
KDE |
|
V:0.9, I:2 |
3956 |
vector graphics editor (draw) |
KDE |
|
V:1.2, I:2 |
11404 |
bitmap graphics editor (paint) |
KDE |
|
V:0.2, I:2 |
3420 |
project management |
KDE |
|
V:0.8, I:2 |
4028 |
graph and chart drawing program |
KDE |
|
V:0.8, I:2 |
2284 |
mathematical equation/formula editor |
KDE |
|
V:0.8, I:2 |
1956 |
business quality report generator |
KDE |
Here is a list of basic utility applications which caught my eyes:
Table 8.9. List of basic X utility applications
package |
popcon |
package size |
description |
type |
---|---|---|---|---|
|
V:23, I:48 |
5264 |
document(pdf) viewer |
GNOME |
|
V:8, I:16 |
2784 |
document(pdf) viewer |
KDE |
|
V:1.0, I:1.7 |
2872 |
document(pdf) viewer |
KDE4 |
|
V:17, I:45 |
9324 |
Personal information Management (groupware and email) |
GNOME |
|
V:2, I:14 |
4052 |
Personal information Management (groupware and email) |
KDE |
|
V:0.6, I:3 |
26708 |
desktop page layout editor |
KDE |
|
V:0.2, I:0.9 |
1045 |
label editor |
GNOME |
|
V:0.08, I:0.5 |
2180 |
barcode and label printing application |
KDE |
|
V:0.9, I:3 |
5860 |
personal accounting |
GNOME |
|
V:0.07, I:0.3 |
840 |
personal accounting |
GTK |
|
V:0.2, I:1.0 |
8960 |
personal accounting |
KDE |
|
V:7, I:45 |
744 |
scanner frontend |
GTK |
|
V:1.5, I:14 |
1284 |
scanner frontend |
KDE |
![]() |
Caution |
---|---|
The |
![]() |
Note |
---|---|
Installing softwares such as |
The xmodmap
(1) program is a utility for modifying keymaps and pointer button mappings in the X window system. To get the keycode
, run the xev
program in the X and press keys. To get the meaning of keysym
, look into the MACRO definition in /usr/include/X11/keysymdef.h
file. All #define
statements in this file are named as XK_
prepended to keysym
names.
Most traditional X client programs, such as xterm
, can be started with a set of standard command line options to specify geometry, font, and display.
They also use the X resource database to configure their appearance. The system-wide defaults of X resources are stored in /etc/X11/Xresources/*
and application defaults of them are stored in /etc/X11/app-defaults/*
. Use these settings as the starting points.
The file ~/.Xresources
is used to store user resource specifications. This file is automatically merged into the default X resources upon login. To make changes to these settings and make them effective immediately, merge them into the database using the command:
$ xrdb -merge ~/.Xresources
See x
(7) and xrdb
(1).
Learn everything about xterm
at http://dickey.his.com/xterm/xterm.faq.html.
![]() |
Warning |
---|---|
Never attempt to start an X display/session manager as root to have entire X desktop environment running as root. This is considered security risk. |
The easiest way to run a particular X client, e.g. "foo
" as root is to use sudo
:
$ sudo foo &
or
$ sudo -s # foo &
or
$ gksu foo &
or
$ ssh -X root@localhost # foo &
![]() |
Caution |
---|---|
Use of |
Please note, in order for the X client to connect to the X server,
values of the old user's "$XAUTHORITY
" and "$DISPLAY
" environment variables must be copied to the new user's ones, and
the file pointed by value of the "$XAUTHORITY
" environment variable must be readable by the new user.
The gksu
package (popcon: V:24, I:56) is a specialized GTK+ GUI package for gaining the root privileges. It can be configured to use su
(1) or sudo
(8) as its backend depending on the /apps/gksu/sudo-mode
gconf key. You can edit gconf key using the gconf-editor
(1) command (menu: "Applications" -> "System Tools" -> "Configuration Editor").