File: Xwindow.ref.txt

package info (click to toggle)
debian-reference 2.24
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 20,088 kB
  • ctags: 35
  • sloc: xml: 70,510; sh: 616; makefile: 352; perl: 221; sed: 3
file content (437 lines) | stat: -rw-r--r-- 31,185 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
= Do not use Edit(GUI) button. =

[[TableOfContents(4)]]

Copyright 2007, 2008  Osamu Aoki GPL, (Please agree to GPL, GPL2, and any version of GPL which is compatible with DSFG if you update any part of wiki page)

Generated HTML is at "[http://people.debian.org/~osamu/pub/getwiki/html/ch08.en.html Debian Reference: Chapter 8. The X window system]".

I welcome your contributions to update this wiki page. You must follow these rules:
 * Do not use Edit(GUI) button of MoinMoin.
 * You can update anytime for:
  * grammar errors
  * spelling errors
  * moved URL location
  * package name transition adjustment (emacs23 etc.)
  * clearly broken script.
 * Before updating this wiki content:
  * Read "[http://wiki.debian.org/DebianReference/Test Guide for contributing to Debian Reference]".

= The X window system =

The [http://en.wikipedia.org/wiki/X_Window_System X window system] on the Debian system is based on the source from [http://www.x.org/ X.Org]. As of January 2009, they are X11R7.1(etch), X11R7.3(lenny) and X11R7.3(sid).  

== Key packages ==

There are a few (meta)packages provided to ease installation.

|| List of key (meta)packages for X window. || 1 || 2 || 3 ||
|| '''(meta)package''' || '''popcon''' || '''size''' || '''description''' ||
|| {{{xorg}}} || - || - || This metapackage provides the X libraries, an X server, a set of fonts, and a group of basic X clients and utilities. ||
|| {{{xserver-xorg}}} || - || - || This package provides the full suits of the X server and its configuration. ||
|| {{{xbase-clients}}} || - || - || This package provides a miscellaneous assortment of the X clients. ||
|| {{{x11-common}}} || - || - || This package contains the filesystem infrastructure for the X window system. ||
|| {{{xorg-docs}}} || - || - || This package contains miscellaneous documentation for the X.Org software suite. ||
|| {{{xspecs}}} || - || - || This package contains X protocol, extension, and library technical specifications. ||
|| {{{menu}}} || - || - || This package generates the Debian menu for all menu-aware applications. ||
|| {{{menu-xdg}}} || - || - || This package converts the Debian menu structure to the [http://en.wikipedia.org/wiki/Freedesktop.org freedesktop.org] xdg menu structure. ||
|| {{{xdg-utils}}} || - || - || This package provides utilities to integrate desktop environment provided by the [http://en.wikipedia.org/wiki/Freedesktop.org freedesktop.org]. ||
|| {{{gnome-desktop-environment}}} || - || - || metapackage for the stadard [http://en.wikipedia.org/wiki/GNOME GNOME] desktop environment. ||
|| {{{kde-core}}} || - || - || metapackage for the core [http://en.wikipedia.org/wiki/KDE KDE] desktop environment. ||
|| {{{xfce4}}} || - || - || metapackage for the [http://en.wikipedia.org/wiki/Xfce Xfce] lightweight desktop environment. ||
|| {{{lxde-core}}} || - || - || metapackage for the [http://en.wikipedia.org/wiki/LXDE LXDE] lightweight desktop environment. ||
|| {{{fluxbox}}} || - || - || [http://en.wikipedia.org/wiki/Fluxbox Fluxbox]: package for highly configurable and low resource [http://en.wikipedia.org/wiki/X_window_manager X window manager]. ||

For the basics of X, refer to {{{X}}}(7), [http://www.tldp.org/HOWTO/XWindow-User-HOWTO.html the LDP XWindow-User-HOWTO].  

== Setting up desktop environment ==

A [http://en.wikipedia.org/wiki/Desktop_environment desktop environment] is usually a combination of a [http://en.wikipedia.org/wiki/X_window_manager X window manager], a file manager, and a suite of compatible utility programs.

You can setup a full [http://en.wikipedia.org/wiki/Desktop_environment desktop environment] such as [http://en.wikipedia.org/wiki/GNOME GNOME], [http://en.wikipedia.org/wiki/KDE KDE], [http://en.wikipedia.org/wiki/Xfce Xfce], or [http://en.wikipedia.org/wiki/LXDE LXDE], from the {{{aptitude}}} under the task menu.

{i} Task menu may be out of sync with the latest package transition state under Debian {{{unstable}}}/{{{testing}}} environment. In such situation, you need to deselect some (meta)packages listed under {{{aptitude}}}(8) task menu to avoid package conflicts.  When deselecting (meta)packages, you must select certain packages providing their dependencies if you need to keep them.

You may alternatively setup a simple environment manually just with a [http://en.wikipedia.org/wiki/X_window_manager X window manager] such as [http://en.wikipedia.org/wiki/Fluxbox Fluxbox].

See [http://www.xwinman.org Window Managers for X] for the guide to the X window manager and the desktop environment.

=== Debian menu ===

[http://www.debian.org/doc/packaging-manuals/menu.html/ 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}}}.

=== Freedesktop.org menu ===

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}}}.

=== Debian menu under GNOME desktop environment ===

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".

{i} You may need to do the similar for other modern desktop environments which are compliant to Freedesktop.org standard.

== The server/client relationship ==

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:

|| 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. ||

== The X server ==

See {{{xorg}}}(1) for X server information.

=== The (re)configuration of the X server ===

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.

(!) Be careful not to use too high refresh rate which may cause fatal hardware failure of your monitor system.

=== The connection methods to the X server ===

There are several ways of getting the "X server" ('''display''' side) to accept connections from an "X client" ('''application''' side):

|| List of connection methods to the X server. || 2 || 3 || 4 || || ||
|| '''method''' || '''package''' || '''popcon''' || '''size''' || '''user''' ||  '''encryption''' || '''pertinent use''' ||
|| {{{xhost}}} command || {{{xbase-clients}}} || 25829 || - || unchecked || no || deprecated ||
|| {{{xauth}}} command || {{{xbase-clients}}} || 25829 || - || checked || no || for local connection via pipe ||
|| {{{ssh -X}}} command || {{{openssh-client}}} || 29037 || - || checked || yes || for remote network connection ||
|| Gnome display manager || {{{gdm}}} || 17331 || - || checked || no(XDMCP) || for local connection via pipe ||
|| KDE display manager || {{{kdm}}} || 5781 || - || checked || no(XDMCP) || for local connection via pipe ||
|| X display manager || {{{xdm}}} || 645 || - || checked || no(XDMCP) || for local connection via pipe ||
|| WindowMaker display manager || {{{wdm}}} || 253 || - || checked || no(XDMCP) || for local connection via pipe ||
|| Secure display manager || {{{sdm}}} || 25 || - || checked || yes || for remote SSH network connection (thin client) ||
|| Linux Terminal Server Project display manager || {{{ldm}}} || 3 || - || checked || yes || for remote SSH network connection (thin client) ||

/!\  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 {{{ssh -X}}}.

{i} You can dare to enable remote TCP/IP connection by setting {{{DisallowTCP=false}}} in {{{/etc/gdm/gdm.conf}}} and by removing {{{-nolisten}}} from lines found by "{{{find /etc/X11 -type f -print0 | xargs -0 grep nolisten}}}", if you are in the fully secured environment.

/!\  Do not use [http://en.wikipedia.org/wiki/X_display_manager XDMCP connection over unsecured network] either.  It sends data via UDP without encryption and prone to the eavesdropping attack.

== Starting the X window system ==

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 [http://en.wikipedia.org/wiki/X_display_manager 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 [http://en.wikipedia.org/wiki/X_session_manager 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.)

{i} See @{@specificlocaleonlyunderxwindow@}@ 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:
 1. The script specified as the argument of {{{/etc/X11/Xsession}}} by the X display manager, if it is defined.
 1. The {{{~/.xsession}}} or {{{~/.Xsession}}} script, if it is defined.
 1. The {{{/usr/bin/x-session-manager}}} command, if it is defined.
 1. The {{{/usr/bin/x-window-manager}}} command, if it is defined.
 1. 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.

=== Starting X session with gdm ===

The {{{gdm}}} program lets you select the session type (or desktop environment: @{@settingupdesktopenvironment@}@), and language (or locale: @{@thelocale@}@) 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
}}}

=== Customizing the X session (classic method) ===

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.

=== Customizing the X session (new method) ===

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..

=== Connecting a remote X client via SSH ===

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 ===

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
}}}

== Fonts in the X window ==

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 [http://en.wikipedia.org/wiki/Xft 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 (@{@basicfonts@}@, @{@additionalfonts@}@, and @{@cjkfonts@}@) with advanced features such as anti-aliasing.  It has no configuration mechanism itself, rather it relies upon the [http://en.wikipedia.org/wiki/Fontconfig 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  [http://en.wikipedia.org/wiki/XRender the X Rendering Extension].

|| Table of packages to support X window font systems. || 1 || 2 || 3 ||
|| '''package''' || '''popcon''' || '''size''' || '''description''' ||
|| {{{xfonts-utils}}} || || || X Window System font utility programs ||
|| {{{libxft2}}} || || || Xft: FreeType-based font drawing library for X ||
|| {{{libfreetype6}}} || || || [http://freetype.sourceforge.net/index.html FreeType] 2 font engine, shared library files ||
|| {{{fontconfig}}} || || || [http://en.wikipedia.org/wiki/Fontconfig  generic font configuration library] - support binaries ||
|| {{{fontconfig-config}}} || || || generic font configuration library - configuration ||
|| {{{defoma}}} || || || Debian Font Manager -- automatic font configuration framework ||
|| {{{x-ttcidfont-conf}}} || || || TrueType configuration for X (for CJK support) ||

## I removed CID reference in x-ttcidfont-conf since I see no CID font used by X.  

You can check actual font path for:
 * core X11 font path with "{{{xset q}}}"
 * fontconfig font default: "{{{fc-match}}}" 

{i} "[http://unifont.org/iuc27/html/ICUPresentation.html 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 [http://en.wikipedia.org/wiki/Free_and_open_source_software free/libre/open source (FLOSS)] operating systems.

{i} You should rely on [http://en.wikipedia.org/wiki/Fontconfig fontconfig] infrastructure to configure fonts on the Debian system.  Debian Font Manager ({{{defoma}}}) is only useful as font installation such as [http://en.wikipedia.org/wiki/X_logical_font_description X logical font description (XLFD)] data.

=== Basic fonts ===

There are 2 major types of [http://en.wikipedia.org/wiki/Computer_font 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 [http://fontforge.sourceforge.net/pcf-format.html X11 pcf bitmap font files] having their file extension "{{{.pcf.gz}}}".

Outline fonts on the Debian system are provided by:
 * [http://en.wikipedia.org/wiki/PostScript PostScript] Type 1 font files having their file extension "{{{.pfb}}}" (binary font file) and "{{{.afm}}}" (font metrics file).
 * [http://en.wikipedia.org/wiki/TrueType TrueType] font files having their file extension "{{{.ttf}}}".

|| Table of corresponding [http://en.wikipedia.org/wiki/PostScript PostScript] Type 1 fonts. || 1 || 2 || 3 || || || ||
|| '''font package''' || '''popcon''' || '''size''' || '''sans-serif font''' || '''serif font''' || '''monospace font''' || '''source of font''' ||
|| (PostScript)  || || || [http://en.wikipedia.org/wiki/Helvetica Helvetica] || [http://en.wikipedia.org/wiki/Times_Roman Times] ||  [http://en.wikipedia.org/wiki/Courier_(typeface) Courier] || Adobe ||
|| gsfonts || || || Nimbus Sans L  || Nimbus Roman No9 L || Nimbus Mono L || [http://en.wikipedia.org/wiki/URW URW] (Adobe compatible size) ||
|| gsfonts-x11 || || || Nimbus Sans L  || Nimbus Roman No9 L || Nimbus Mono L || X font support with PostScript Type 1 fonts. ||
|| t1-cyrillic || || || Free Helvetian || Free Times         || Free Courier  || URW extended (Adobe compatible size) ||
|| lmodern || || || LMSans* || LMRoman* || LMTypewriter* || scalable PostScript and OpenType fonts based on Computer Modern (from TeX) ||

|| Table of corresponding [http://en.wikipedia.org/wiki/TrueType TrueType] fonts. || 1 || 2 || 3 || || || ||
|| '''font package''' || '''popcon''' || '''size''' || '''sans-serif font''' || '''serif font''' || '''monospace font''' || '''source of font''' ||
|| ttf-mscorefonts-installer || || || [http://en.wikipedia.org/wiki/Arial Arial] || [http://en.wikipedia.org/wiki/Times_Roman Times New Roman] || [http://en.wikipedia.org/wiki/Courier_(typeface) Courier New] || Microsoft (Adobe compatible size) (This installs non-free data) ||
|| ttf-liberation            || || || Liberation Sans     || Liberation Serif     || Liberation Mono          || [http://en.wikipedia.org/wiki/Liberation_fonts Liberation Fonts project] (Microsoft compatible size) ||
|| ttf-freefont              || || || FreeSans            || FreeSerif            || FreeMono                 || [http://savannah.gnu.org/projects/freefont/ GNU freefont] (Microsoft compatible size) ||
|| ttf-bitstream-vera        || || || Bitstream Vera Sans || Bitstream Vera Serif || Bitstream Vera Sans Mono || [http://www.gnome.org/fonts/ Bitstream, Inc.] ||
|| ttf-dejavu                || || || DejaVu Sans         || DejaVu Serif         || DejaVu Sans Mono         || [http://dejavu.sourceforge.net/], Bitstream with extended character code support ||
|| ttf-dejavu-core           || || || DejaVu Sans         || DejaVu Serif         || DejaVu Sans Mono         || [http://dejavu.sourceforge.net/] basic font style variants ||
|| ttf-dejavu-extra          || || || DejaVu Sans         || DejaVu Serif         || DejaVu Sans Mono         || [http://dejavu.sourceforge.net/] extra font style variants ||
|| ttf-unifont               || || || N/A                 || N/A                  || unifont                  || [http://Unifoundry.com], GNU Unifont, with all printable character code in Unicode 5.1 Basic Multilingual Plane (BMP) ||

=== Additional fonts ===

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.

=== CJK fonts ===

Here are some key points focused on CJK issues.

|| 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, [http://www.ibiblio.org/pub/packages/ccic/software/info/HBF-1.1/ 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 [http://en.wikipedia.org/wiki/TrueType TrueType] font files, [http://en.wikipedia.org/wiki/TrueType TrueType] font collection file with file extension "{{{.ttc}}}" may be used.

I order to cover complicated code space of characters, CID keyed Type 1 [http://en.wikipedia.org/wiki/PostScript 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 @{@xutilityapplications@}@).

{i} The multiple [http://en.wikipedia.org/wiki/Glyph glyphs] are expected for some [http://en.wikipedia.org/wiki/Unicode Unicode] code points due to [http://en.wikipedia.org/wiki/Han_unification 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.

== X applications ==

=== X office applications ===

Here is a list of basic office applications (OO is OpenOffice.org):

|| List of basic X office applications || 1 || 2 || 3 || ||
|| '''package''' || '''popcon''' || '''package size''' || '''description''' ||'''type''' ||
|| {{{openoffice.org-writer}}} || - || - || word processor || OO ||
|| {{{openoffice.org-calc}}} || - || - || spreadsheet || OO ||
|| {{{openoffice.org-impress}}} || - || - || presentation || OO ||
|| {{{openoffice.org-base}}} || - || - || database management || OO ||
|| {{{openoffice.org-draw}}} || - || - || vector graphics editor (draw) || OO ||
|| {{{openoffice.org-math}}} || - || - || mathematical equation/formula editor || OO ||
|| {{{abiword}}} || - || - || word processor || GNOME ||
|| {{{gnumeric}}} || - || - || spreadsheet || GNOME ||
|| {{{gimp}}} || - || - || bitmap graphics editor (paint) || GTK ||
|| {{{inkscape}}} || - || - || vector graphics editor (draw) || GNOME ||
|| {{{dia-gnome}}} || - || - || flowchart and diagram editor || GNOME ||
|| {{{mergeant}}} || - || - || database management || GNOME ||
|| {{{planner}}} || - || - || project management || GNOME ||
|| {{{kword}}} || - || - || word processor || KDE ||
|| {{{kspread}}} || - || - || spreadsheet || KDE ||
|| {{{kpresenter}}} || - || - || presentation || KDE ||
|| {{{kexi}}} || - || - || database management || KDE ||
|| {{{kivio}}} || - || - || flowchart and diagram editor || KDE ||
|| {{{karbon}}} || - || - || vector graphics editor (draw) || KDE ||
|| {{{krita}}} || - || - || bitmap graphics editor (paint) || KDE ||
|| {{{kplato}}} || - || - || project management || KDE ||
|| {{{kchart}}} || - || - || graph and chart drawing program || KDE ||
|| {{{kformula}}} || - || - || mathematical equation/formula editor || KDE ||
|| {{{kugar}}} || - || - || business quality report generator || KDE ||

=== X utility applications ===

Here is a list of basic utility applications which caught my eyes:

|| List of basic X utility applications || 1 || 2 || 3 || ||
|| '''package''' || '''popcon''' || '''package size''' || '''description''' ||'''type''' ||
|| {{{evince}}} || - || - || document(pdf) viewer || GNOME ||
|| {{{kpdf}}} || - || - || document(pdf) viewer || KDE ||
|| {{{okular}}} || - || - || document(pdf) viewer || KDE4 ||
|| {{{evolution}}} || - || - || Personal information Management (groupware and email) || GNOME ||
|| {{{kontact}}} || - || - || Personal information Management (groupware and email) || KDE ||
|| {{{scribus}}} || - || - || desktop page layout editor || KDE ||
|| {{{glabels}}} || - || - || label editor || GNOME ||
|| {{{kbarcode}}} || - || - || barcode and label printing application || KDE ||
|| {{{gnucash}}} || - || - || personal accounting || GNOME ||
|| {{{homebank}}} || - || - || personal accounting || GTK ||
|| {{{kmymoney2}}} || - || - || personal accounting || KDE ||
|| {{{xsane}}} || - || - || scanner frontend || GTK ||
|| {{{kooka}}} || - || - || scanner frontend || KDE ||

<!> The {{{poppler-data}}} package (non-free, see @{@theghostscript@}@) needs to be installed for {{{evince}}} and {{{okular}}} to display CJK PDF documents using Cmap data (@{@cjkfonts@}@).

(!) Installing softwares such as {{{scribus}}} (KDE) on GNOME desktop environment are quite acceptable since corresponding functionality is not available under GNOME desktop environment.  But installing too many packages with duplicated functionalities will clutter your menu.

== The X trivia ==

=== Keymaps and pointer button mappings in X ===

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.

=== The classic X clients ===

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).

=== The X terminal emulator -- xterm ===

Learn everything about {{{xterm}}} at [http://dickey.his.com/xterm/xterm.faq.html].

=== Running X clients as root ===

/!\ '''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 &
}}}

<!> Use of {{{ssh}}} just for this purpose as above is waste of resource.

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: @@@pop-gksu@@@) 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").