| 1 |
osamu |
6683 |
== The X window system
|
| 2 |
|
|
|
| 3 |
|
|
// vim: set sts=2 expandtab:
|
| 4 |
|
|
// Use ":set nowrap" to edit table
|
| 5 |
|
|
|
| 6 |
osamu |
6789 |
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 July 2009, they are X11R7.1(etch), X11R7.3(lenny), X11R7.3(squeeze) and X11R7.4(sid).
|
| 7 |
osamu |
6683 |
|
| 8 |
|
|
=== Key packages
|
| 9 |
|
|
|
| 10 |
|
|
There are a few (meta)packages provided to ease installation.
|
| 11 |
|
|
|
| 12 |
|
|
.List of key (meta)packages for X window.
|
| 13 |
|
|
[grid="all"]
|
| 14 |
|
|
`---------------------------`-------------`------------`----------------------------------------------------------------------------------------------------------------------------------------------------------------
|
| 15 |
|
|
(meta)package popcon size description
|
| 16 |
|
|
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
| 17 |
|
|
`xorg` @@@popcon1@@@ @@@psize1@@@ This metapackage provides the X libraries, an X server, a set of fonts, and a group of basic X clients and utilities.
|
| 18 |
osamu |
6786 |
`xserver-xorg` @@@popcon1@@@ @@@psize1@@@ This package provides the full suits of the X server and its configuration.
|
| 19 |
|
|
`xbase-clients` @@@popcon1@@@ @@@psize1@@@ This package provides a miscellaneous assortment of X clients.
|
| 20 |
|
|
`x11-common` @@@popcon1@@@ @@@psize1@@@ This package contains the filesystem infrastructure for the X window system.
|
| 21 |
|
|
`xorg-docs` @@@popcon1@@@ @@@psize1@@@ This package contains miscellaneous documentation for the X.Org software suite.
|
| 22 |
|
|
`xspecs` @@@popcon1@@@ @@@psize1@@@ This package contains X protocol, extension, and library technical specifications.
|
| 23 |
|
|
`menu` @@@popcon1@@@ @@@psize1@@@ This package generates the Debian menu for all menu-aware applications.
|
| 24 |
osamu |
6683 |
`gksu` @@@popcon1@@@ @@@psize1@@@ This package provides a Gtk+ frontend to `su`(1) or `sudo`(8).
|
| 25 |
osamu |
6786 |
`menu-xdg` @@@popcon1@@@ @@@psize1@@@ This package converts the Debian menu structure to the http://en.wikipedia.org/wiki/Freedesktop.org[freedesktop.org] xdg menu structure.
|
| 26 |
|
|
`xdg-utils` @@@popcon1@@@ @@@psize1@@@ This package provides utilities to integrate desktop environment provided by the http://en.wikipedia.org/wiki/Freedesktop.org[freedesktop.org].
|
| 27 |
|
|
`gnome-desktop-environment` @@@popcon1@@@ @@@psize1@@@ metapackage for the stadard http://en.wikipedia.org/wiki/GNOME[GNOME] desktop environment.
|
| 28 |
|
|
`kde-core` @@@popcon1@@@ @@@psize1@@@ metapackage for the core http://en.wikipedia.org/wiki/KDE[KDE] desktop environment.
|
| 29 |
|
|
`xfce4` @@@popcon1@@@ @@@psize1@@@ metapackage for the http://en.wikipedia.org/wiki/Xfce[Xfce] lightweight desktop environment.
|
| 30 |
|
|
`lxde-core` @@@popcon1@@@ @@@psize1@@@ metapackage for the http://en.wikipedia.org/wiki/LXDE[LXDE] lightweight desktop environment.
|
| 31 |
|
|
`fluxbox` @@@popcon1@@@ @@@psize1@@@ 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].
|
| 32 |
osamu |
6683 |
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
| 33 |
|
|
|
| 34 |
|
|
For the basics of X, refer to `X`(7), http://www.tldp.org/HOWTO/XWindow-User-HOWTO.html[the LDP XWindow-User-HOWTO].
|
| 35 |
|
|
|
| 36 |
|
|
=== Setting up desktop environment
|
| 37 |
|
|
|
| 38 |
|
|
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.
|
| 39 |
|
|
|
| 40 |
|
|
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.
|
| 41 |
|
|
|
| 42 |
osamu |
6791 |
TIP: 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 manually to avoid them deleted automatically.
|
| 43 |
osamu |
6683 |
|
| 44 |
|
|
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].
|
| 45 |
|
|
|
| 46 |
|
|
See http://www.xwinman.org[Window Managers for X] for the guide to the X window manager and the desktop environment.
|
| 47 |
|
|
|
| 48 |
|
|
==== Debian menu
|
| 49 |
|
|
|
| 50 |
|
|
http://www.debian.org/doc/packaging-manuals/menu.html/[Debian menu system] provides a general interface for both text- and X-oriented programs with `update-menus`(1) from the `menu` package. Each package installs its menu data in the "`/usr/share/menu/`" directory. See "`/usr/share/menu/README`".
|
| 51 |
|
|
|
| 52 |
|
|
==== Freedesktop.org menu
|
| 53 |
|
|
|
| 54 |
|
|
Each package which is compliant to Freedesktop.org\'s xdg menu system installs its menu data provided by "`\*.desktop`" under "`/usr/share/applications/`". 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`".
|
| 55 |
|
|
|
| 56 |
|
|
==== Debian menu under GNOME desktop environment
|
| 57 |
|
|
|
| 58 |
|
|
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".
|
| 59 |
|
|
|
| 60 |
|
|
TIP: You may need to do the similar for other modern desktop environments which are compliant to Freedesktop.org standard.
|
| 61 |
|
|
|
| 62 |
|
|
=== The server/client relationship
|
| 63 |
|
|
|
| 64 |
|
|
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:
|
| 65 |
|
|
|
| 66 |
|
|
|
| 67 |
|
|
.List of server/client terminology.
|
| 68 |
|
|
[grid="all"]
|
| 69 |
|
|
`----------------------`-------------------------------------------------------------------------------------
|
| 70 |
|
|
type description
|
| 71 |
|
|
-------------------------------------------------------------------------------------------------------------
|
| 72 |
|
|
**X server** a program run on a **local host** connected to the user\'s display and input devices.
|
| 73 |
|
|
**X client** a program run on a **remote host** that processes data and talks to the X server.
|
| 74 |
|
|
**application server** a program run on a **remote host** that processes data and talks to the clients.
|
| 75 |
|
|
**application client** a program run on a **local host** connected to the user\'s display and input devices.
|
| 76 |
|
|
-------------------------------------------------------------------------------------------------------------
|
| 77 |
|
|
|
| 78 |
|
|
=== The X server
|
| 79 |
|
|
|
| 80 |
|
|
See `xorg`(1) for X server information.
|
| 81 |
|
|
|
| 82 |
|
|
==== The (re)configuration of the X server
|
| 83 |
|
|
|
| 84 |
osamu |
6739 |
NOTE: X server (post-`lenny`) is rewitten to use more information from standardized OS services such as http://en.wikipedia.org/wiki/HAL_(software)[HAL] and http://en.wikipedia.org/wiki/D-Bus[D-bus], for its configuration than that from "`/etc/X11/xorg.conf`". So contents in "`/etc/X11/xorg.conf`" are getting less. You may need to http://wiki.debian.org/XStrikeForce/InputHotplugGuide[work around transitional problems of X server].
|
| 85 |
|
|
|
| 86 |
osamu |
6794 |
The following will (re)configure an X server by generating a new "`/etc/X11/xorg.conf`" file using `dexconf`(1).
|
| 87 |
osamu |
6683 |
|
| 88 |
|
|
--------------------
|
| 89 |
|
|
# dpkg-reconfigure --priority=low x11-common
|
| 90 |
|
|
# dpkg-reconfigure --priority=low xserver-xorg
|
| 91 |
|
|
--------------------
|
| 92 |
|
|
|
| 93 |
|
|
If you have manually edited this "`/etc/X11/xorg.conf`" file but would like it to be automatically updated again, run the following command:
|
| 94 |
osamu |
6739 |
|
| 95 |
|
|
-----
|
| 96 |
osamu |
6683 |
# sudo dpkg-reconfigure -phigh xserver-xorg
|
| 97 |
osamu |
6739 |
-----
|
| 98 |
osamu |
6683 |
|
| 99 |
|
|
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.
|
| 100 |
|
|
|
| 101 |
|
|
NOTE: Be careful not to use too high refresh rate which may cause fatal hardware failure of your monitor system.
|
| 102 |
|
|
|
| 103 |
|
|
==== The connection methods to the X server
|
| 104 |
|
|
|
| 105 |
|
|
There are several ways of getting the "X server" (**display** side) to accept connections from an "X client" (**application** side):
|
| 106 |
|
|
|
| 107 |
|
|
.List of connection methods to the X server.
|
| 108 |
|
|
[grid="all"]
|
| 109 |
|
|
`---------------------------------------------`----------------`-------------`------------`---------`----------`-----------------------------------------------
|
| 110 |
|
|
method package popcon size user encryption pertinent use
|
| 111 |
|
|
---------------------------------------------------------------------------------------------------------------------------------------------------------------
|
| 112 |
|
|
`xhost` command `xbase-clients` @@@popcon2@@@ @@@psize2@@@ unchecked no deprecated
|
| 113 |
|
|
`xauth` command `xbase-clients` @@@popcon2@@@ @@@psize2@@@ checked no for local connection via pipe
|
| 114 |
|
|
`ssh -X` command `openssh-client` @@@popcon2@@@ @@@psize2@@@ checked yes for remote network connection
|
| 115 |
|
|
GNOME display manager `gdm` @@@popcon2@@@ @@@psize2@@@ checked no(XDMCP) for local connection via pipe
|
| 116 |
|
|
KDE display manager `kdm` @@@popcon2@@@ @@@psize2@@@ checked no(XDMCP) for local connection via pipe
|
| 117 |
|
|
X display manager `xdm` @@@popcon2@@@ @@@psize2@@@ checked no(XDMCP) for local connection via pipe
|
| 118 |
|
|
WindowMaker display manager `wdm` @@@popcon2@@@ @@@psize2@@@ checked no(XDMCP) for local connection via pipe
|
| 119 |
osamu |
6740 |
LTSP display manager `ldm` @@@popcon2@@@ @@@psize2@@@ checked yes for remote SSH network connection (thin client)
|
| 120 |
osamu |
6683 |
---------------------------------------------------------------------------------------------------------------------------------------------------------------
|
| 121 |
|
|
|
| 122 |
osamu |
6743 |
// Secure display manager `sdm` @@@popcon2@@@ @@@psize2@@@ checked yes for remote SSH network connection (thin client)
|
| 123 |
|
|
|
| 124 |
osamu |
6683 |
WARNING: Do not use remote http://en.wikipedia.org/wiki/Transmission_Control_Protocol[TCP]/http://en.wikipedia.org/wiki/Internet_Protocol[IP] connection over **unsecured** network for X connection unless you have very good reason such as use of encryption. 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`".
|
| 125 |
|
|
|
| 126 |
osamu |
6796 |
WARNING: Do not use http://en.wikipedia.org/wiki/X_display_manager[XDMCP connection] over **unsecured** network either. It sends data via http://en.wikipedia.org/wiki/User_Datagram_Protocol[UDP]/http://en.wikipedia.org/wiki/Internet_Protocol[IP] without encryption and is prone to the **eavesdropping attack**.
|
| 127 |
osamu |
6683 |
|
| 128 |
osamu |
6796 |
TIP: You can **dare** to enable remote TCP/IP connection by setting "`DisallowTCP=false`" in "`/etc/gdm/gdm.conf`" to override "`/usr/share/gdm/defaults.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.
|
| 129 |
osamu |
6683 |
|
| 130 |
osamu |
6740 |
TIP: LTSP stands for http://en.wikipedia.org/wiki/Linux_Terminal_Server_Project[Linux Terminal Server Project].
|
| 131 |
|
|
|
| 132 |
osamu |
6683 |
=== Starting the X window system
|
| 133 |
|
|
|
| 134 |
osamu |
6796 |
The X Window system is usually started as an http://en.wikipedia.org/wiki/X_session_manager[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.
|
| 135 |
osamu |
6683 |
|
| 136 |
osamu |
6796 |
The http://en.wikipedia.org/wiki/X_session_manager[X session] is started by:
|
| 137 |
osamu |
6683 |
|
| 138 |
|
|
- `startx` command started from the command line, or
|
| 139 |
osamu |
6796 |
- 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/`" ("`?`" corresponding to the runlevel) directory.
|
| 140 |
osamu |
6683 |
|
| 141 |
osamu |
6796 |
TIP: 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 http://en.wikipedia.org/wiki/X_display_manager[X display manager] daemon program activated.
|
| 142 |
|
|
|
| 143 |
osamu |
6683 |
TIP: See <<_specific_locale_only_under_x_window>> for initial environment variables of the X display manager.
|
| 144 |
|
|
|
| 145 |
|
|
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 first program which is found in the following order with the `exec` builtin command:
|
| 146 |
|
|
|
| 147 |
|
|
1. The script specified as the argument of "`/etc/X11/Xsession`" by the X display manager, if it is defined.
|
| 148 |
|
|
2. The "`\~/.xsession`" or "`\~/.Xsession`" script, if it is defined.
|
| 149 |
|
|
3. The "`/usr/bin/x-session-manager`" command, if it is defined.
|
| 150 |
|
|
4. The "`/usr/bin/x-window-manager`" command, if it is defined.
|
| 151 |
|
|
5. The "`/usr/bin/x-terminal-emulator`" command, if it is defined.
|
| 152 |
|
|
|
| 153 |
|
|
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 alternative system and changed by "`update-alternatives --config x-session-manager`", etc.
|
| 154 |
|
|
|
| 155 |
|
|
==== Starting X session with gdm
|
| 156 |
|
|
|
| 157 |
|
|
`gdm`(1) lets you select the session type (or desktop environment: <<_setting_up_desktop_environment>>), and language (or locale: <<_the_locale>>) of the X session from its menu. It keeps the selected default value in "`\~/.dmrc`" as, e.g.:
|
| 158 |
|
|
|
| 159 |
|
|
--------------------
|
| 160 |
|
|
[Desktop]
|
| 161 |
|
|
Session=default
|
| 162 |
|
|
Language=ja_JP.UTF-8
|
| 163 |
|
|
--------------------
|
| 164 |
|
|
|
| 165 |
|
|
==== Customizing the X session (classic method)
|
| 166 |
|
|
|
| 167 |
|
|
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.
|
| 168 |
|
|
|
| 169 |
|
|
==== Customizing the X session (new method)
|
| 170 |
|
|
|
| 171 |
|
|
Here are new methods to customize the X session without completely overiding the system code as above.
|
| 172 |
|
|
|
| 173 |
|
|
|
| 174 |
|
|
- The display manager `gdm` can select a specific session and set it as the argument of "`/etc/X11/Xsession`".
|
| 175 |
|
|
- The "`\~/.xsessionrc`" file is executed as a part of start up process (desktop independent.)
|
| 176 |
|
|
- The "`\~/.gnomerc`" file is executed as a part of start up process. (GNOME desktop only)
|
| 177 |
|
|
- The GUI program based session management software can use the "`\~/.gnome2/session`" file etc..
|
| 178 |
|
|
|
| 179 |
|
|
==== Connecting a remote X client via SSH
|
| 180 |
|
|
|
| 181 |
|
|
The use of "`ssh -X`" enables a secure connection from a local X server to a remote application server.
|
| 182 |
|
|
|
| 183 |
|
|
|
| 184 |
|
|
- Set "`X11Forwarding`" entries to "`yes`" in "`/etc/ssh/sshd_config`" of the remote host, if you want to avoid "`-X`" command-line option.
|
| 185 |
|
|
- Start the X server on the local host.
|
| 186 |
|
|
- Open an `xterm` in the local host.
|
| 187 |
|
|
- Run `ssh`(1) to establish a connection with the remote site.
|
| 188 |
|
|
+
|
| 189 |
|
|
--------------------
|
| 190 |
|
|
localname @ localhost $ ssh -q -X loginname@remotehost.domain
|
| 191 |
|
|
Password:
|
| 192 |
|
|
.....
|
| 193 |
|
|
--------------------
|
| 194 |
|
|
|
| 195 |
|
|
- Run an X application command, e.g. "`gimp`", on the remote site.
|
| 196 |
|
|
+
|
| 197 |
|
|
--------------------
|
| 198 |
|
|
loginname @ remotehost $ gimp &
|
| 199 |
|
|
--------------------
|
| 200 |
|
|
|
| 201 |
|
|
This method allows the display of the remote X client output as if it were locally connected through a local UNIX domain socket.
|
| 202 |
|
|
|
| 203 |
osamu |
6786 |
==== Secure X terminal via the Internet
|
| 204 |
osamu |
6683 |
|
| 205 |
osamu |
6786 |
Secure X terminal via the Internet, which displays remotely run entire X desktop environment, can easily achieved by using specialized package such as `ldm`. Your local machine becomes a secure thin client to the remote application server connected via SSH.
|
| 206 |
osamu |
6683 |
|
| 207 |
|
|
If you want to add similar feature to your normal display manager `gdm`, create executable shell script at "`/usr/local/bin/ssh-session`" as:
|
| 208 |
|
|
|
| 209 |
|
|
--------------------
|
| 210 |
|
|
#!/bin/sh -e
|
| 211 |
|
|
# Based on gdm-ssh-session in gdm source (GPL)
|
| 212 |
|
|
ZENITY=$(type -p zenity)
|
| 213 |
|
|
TARGETHOST=$($ZENITY --width=600 \
|
| 214 |
|
|
--title "Host to connect to" --entry \
|
| 215 |
|
|
--text "Enter the name of the host you want to log in to as user@host.dom:")
|
| 216 |
|
|
TARGETSESSION=$($ZENITY --width=600 --height=400 \
|
| 217 |
|
|
--title "Remote session name" --list --radiolist --text "Select one" \
|
| 218 |
|
|
--column " " --column "Session" --column "description" --print-column 2 \
|
| 219 |
|
|
TRUE "/etc/X11/Xsession" "Debian" \
|
| 220 |
|
|
FALSE "/etc/X11/xinit/Xclients" "RH variants" \
|
| 221 |
|
|
FALSE "gnome-session" "GNOME session" \
|
| 222 |
|
|
FALSE "xterm" "Safe choice" \
|
| 223 |
|
|
FALSE "rxvt" "Safe choice" \
|
| 224 |
|
|
FALSE "gnome-terminal" "Safe choice")
|
| 225 |
|
|
echo "Connecting to "$TARGETHOST" with $TARGETSESSION"
|
| 226 |
|
|
/usr/bin/ssh -A -X -T -n "$TARGETHOST" "$TARGETSESSION"
|
| 227 |
|
|
#SSH_ASKPASS=/usr/bin/ssh-askpass /usr/bin/ssh -A -X -T -n "$TARGETHOST" "$TARGETSESSION"
|
| 228 |
|
|
--------------------
|
| 229 |
|
|
Then add followings to "`/etc/dm/Sessions/ssh.desktop`":
|
| 230 |
|
|
|
| 231 |
|
|
--------------------
|
| 232 |
|
|
[Desktop Entry]
|
| 233 |
|
|
Encoding=UTF-8
|
| 234 |
|
|
Name=SSH
|
| 235 |
|
|
Comment=This session logs you into a remote host using ssh
|
| 236 |
|
|
Exec=/usr/local/bin/ssh-session
|
| 237 |
|
|
Type=Application
|
| 238 |
|
|
--------------------
|
| 239 |
|
|
|
| 240 |
|
|
=== Fonts in the X window
|
| 241 |
|
|
|
| 242 |
|
|
X window on the Debian system support two mechanisms for font management:
|
| 243 |
|
|
|
| 244 |
|
|
- server side font management: the original core X11 font system and
|
| 245 |
|
|
- client side font management: the new http://en.wikipedia.org/wiki/Xft[Xft] 2 font system.
|
| 246 |
|
|
|
| 247 |
|
|
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`(1) scripts to generate required files such as "`fonts.dir`".
|
| 248 |
|
|
|
| 249 |
|
|
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 (<<_basic_fonts>>, <<_additional_fonts>>, and <<_cjk_fonts>>) 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].
|
| 250 |
|
|
|
| 251 |
|
|
|
| 252 |
|
|
.Table of packages to support X window font systems.
|
| 253 |
|
|
[grid="all"]
|
| 254 |
|
|
`-------------------`-------------`------------`----------------------------------------------------------------------------------------------
|
| 255 |
|
|
package popcon size description
|
| 256 |
|
|
----------------------------------------------------------------------------------------------------------------------------------------------
|
| 257 |
|
|
`xfonts-utils` @@@popcon1@@@ @@@psize1@@@ X Window System font utility programs
|
| 258 |
|
|
`libxft2` @@@popcon1@@@ @@@psize1@@@ Xft: FreeType-based font drawing library for X
|
| 259 |
|
|
`libfreetype6` @@@popcon1@@@ @@@psize1@@@ http://freetype.sourceforge.net/index.html[FreeType] 2 font engine, shared library files
|
| 260 |
|
|
`fontconfig` @@@popcon1@@@ @@@psize1@@@ http://en.wikipedia.org/wiki/Fontconfig[generic font configuration library] - support binaries
|
| 261 |
|
|
`fontconfig-config` @@@popcon1@@@ @@@psize1@@@ generic font configuration library - configuration
|
| 262 |
|
|
`defoma` @@@popcon1@@@ @@@psize1@@@ Debian Font Manager -- automatic font configuration framework
|
| 263 |
|
|
`x-ttcidfont-conf` @@@popcon1@@@ @@@psize1@@@ TrueType configuration for X (for CJK support)
|
| 264 |
|
|
----------------------------------------------------------------------------------------------------------------------------------------------
|
| 265 |
|
|
|
| 266 |
|
|
// I removed CID reference in x-ttcidfont-conf since I see no CID font used by X.
|
| 267 |
|
|
|
| 268 |
|
|
You can check actual font path for:
|
| 269 |
|
|
|
| 270 |
|
|
- core X11 font path with "`xset q`"
|
| 271 |
|
|
- fontconfig font default: "`fc-match`"
|
| 272 |
|
|
|
| 273 |
|
|
TIP: "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/[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.
|
| 274 |
|
|
|
| 275 |
|
|
TIP: You should rely on http://en.wikipedia.org/wiki/Fontconfig[fontconfig] infrastructure to configure fonts on the Debian system. Debian Font Manager (`defoma`(1)) is only useful as font installation such as http://en.wikipedia.org/wiki/X_logical_font_description[X logical font description (XLFD)] data.
|
| 276 |
|
|
|
| 277 |
|
|
==== Basic fonts
|
| 278 |
|
|
|
| 279 |
|
|
There are 2 major types of http://en.wikipedia.org/wiki/Computer_font[computer fonts]:
|
| 280 |
|
|
|
| 281 |
|
|
- bitmap fonts (good for low resolution rasterization)
|
| 282 |
|
|
- outline/stroke fonts (good for high resolution rasterization)
|
| 283 |
|
|
|
| 284 |
|
|
While scaling of bitmap fonts causes jugged image, scaling of outline/stroke
|
| 285 |
|
|
fonts produces smooth image.
|
| 286 |
|
|
|
| 287 |
osamu |
6796 |
Bitmap fonts on the Debian system are usually provided by compressed http://fontforge.sourceforge.net/pcf-format.html[X11 pcf bitmap font files] having their file extension "`.pcf.gz`".
|
| 288 |
osamu |
6683 |
|
| 289 |
|
|
Outline fonts on the Debian system are provided by:
|
| 290 |
|
|
|
| 291 |
|
|
- http://en.wikipedia.org/wiki/PostScript[PostScript] Type 1 font files having their file extension "`.pfb`" (binary font file) and "`.afm`" (font metrics file).
|
| 292 |
|
|
- http://en.wikipedia.org/wiki/TrueType[TrueType] font files having their file extension "`.ttf`".
|
| 293 |
osamu |
6796 |
- http://en.wikipedia.org/wiki/OpenType[OpenType] font files having their file extension "`.ttf`" or "`.otf`".
|
| 294 |
osamu |
6683 |
|
| 295 |
osamu |
6796 |
TIP: OpenType is intended to supersede both the TrueType and the Type 1 ("PostScript") font formats.
|
| 296 |
osamu |
6683 |
|
| 297 |
|
|
.Table of corresponding http://en.wikipedia.org/wiki/PostScript[PostScript] Type 1 fonts.
|
| 298 |
|
|
[grid="all"]
|
| 299 |
|
|
`------------`-------------`------------`-------------------------------------------------`-----------------------------------------------`--------------------------------------------------------`--------------------------------------------------------------------------
|
| 300 |
|
|
font package popcon size sans-serif font serif font monospace font source of font
|
| 301 |
|
|
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
| 302 |
|
|
PostScript N/A N/A http://en.wikipedia.org/wiki/Helvetica[Helvetica] http://en.wikipedia.org/wiki/Times_Roman[Times] http://en.wikipedia.org/wiki/Courier_(typeface)[Courier] Adobe
|
| 303 |
|
|
gsfonts @@@popcon1@@@ @@@psize1@@@ Nimbus Sans L Nimbus Roman No9 L Nimbus Mono L http://www.math.utah.edu/~beebe/fonts/urw.html[URW] (Adobe compatible size)
|
| 304 |
|
|
gsfonts-x11 @@@popcon1@@@ @@@psize1@@@ Nimbus Sans L Nimbus Roman No9 L Nimbus Mono L X font support with PostScript Type 1 fonts.
|
| 305 |
|
|
t1-cyrillic @@@popcon1@@@ @@@psize1@@@ Free Helvetian Free Times Free Courier URW extended (Adobe compatible size)
|
| 306 |
|
|
lmodern @@@popcon1@@@ @@@psize1@@@ LMSans\* LMRoman\* LMTypewriter\* scalable PostScript and OpenType fonts based on Computer Modern (from TeX)
|
| 307 |
|
|
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
| 308 |
|
|
|
| 309 |
|
|
|
| 310 |
|
|
.Table of corresponding http://en.wikipedia.org/wiki/TrueType[TrueType] fonts.
|
| 311 |
|
|
[grid="all"]
|
| 312 |
|
|
`-------------------------`-------------`------------`-----------------------------------------`---------------------------------------------------------`------------------------------------------------------------`-----------------------------------------------------------------------------------------------------------------------
|
| 313 |
|
|
font package popcon size sans-serif font serif font monospace font source of font
|
| 314 |
|
|
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
| 315 |
|
|
ttf-mscorefonts-installer @@@popcon1@@@ @@@psize1@@@ 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)
|
| 316 |
|
|
ttf-liberation @@@popcon1@@@ @@@psize1@@@ Liberation Sans Liberation Serif Liberation Mono http://en.wikipedia.org/wiki/Liberation_fonts[Liberation Fonts project] (Microsoft compatible size)
|
| 317 |
|
|
ttf-freefont @@@popcon1@@@ @@@psize1@@@ FreeSans FreeSerif FreeMono http://savannah.gnu.org/projects/freefont/[GNU freefont] (Microsoft compatible size)
|
| 318 |
|
|
ttf-bitstream-vera @@@popcon1@@@ @@@psize1@@@ Bitstream Vera Sans Bitstream Vera Serif Bitstream Vera Sans Mono http://www.gnome.org/fonts/[Bitstream, Inc.]
|
| 319 |
|
|
ttf-dejavu @@@popcon1@@@ @@@psize1@@@ DejaVu Sans DejaVu Serif DejaVu Sans Mono http://dejavu.sourceforge.net[DejaVu], Bitstream with extended character code support
|
| 320 |
|
|
ttf-dejavu-core @@@popcon1@@@ @@@psize1@@@ DejaVu Sans DejaVu Serif DejaVu Sans Mono http://dejavu.sourceforge.net/[DejaVu], basic font style variants
|
| 321 |
|
|
ttf-dejavu-extra @@@popcon1@@@ @@@psize1@@@ DejaVu Sans DejaVu Serif DejaVu Sans Mono http://dejavu.sourceforge.net/[DejaVu], extra font style variants
|
| 322 |
|
|
ttf-unifont @@@popcon1@@@ @@@psize1@@@ N/A N/A unifont http://Unifoundry.com[GNU Unifont], with all printable character code in Unicode 5.1 Basic Multilingual Plane (BMP)
|
| 323 |
|
|
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
| 324 |
|
|
|
| 325 |
|
|
==== Additional fonts
|
| 326 |
|
|
|
| 327 |
|
|
`aptitude`(8) will help you find additional fonts easily:
|
| 328 |
|
|
|
| 329 |
|
|
- by the short package list under "Packages which depend on defoma" under the `defoma` package list,
|
| 330 |
|
|
- by the short package list under "Tasks" -> "Localization",
|
| 331 |
|
|
- by the filtered flat package list of font data with regex on debtag: "`\~Gmade-of::data:font`",
|
| 332 |
|
|
- by the filtered flat package list of the BDF (bitmap) font packages with regex on package name: "`\~nxfonts-`", or
|
| 333 |
|
|
- by the filtered flat package list of the TrueType (outline) font packages with regex on package name: "`\~nttf-`".
|
| 334 |
|
|
|
| 335 |
|
|
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:
|
| 336 |
|
|
|
| 337 |
|
|
- `ttf-mathematica4.1`
|
| 338 |
|
|
- `ttf-mscorefonts-installer`
|
| 339 |
osamu |
6796 |
|
| 340 |
osamu |
6683 |
You\'ll have a really good selection of TrueType fonts at the expense of contaminating your **Free** system with non-Free fonts.
|
| 341 |
|
|
|
| 342 |
|
|
==== CJK fonts
|
| 343 |
|
|
|
| 344 |
|
|
Here are some key points focused on CJK issues.
|
| 345 |
|
|
|
| 346 |
|
|
|
| 347 |
|
|
.Table of key words used in CJK font names to indicate font types.
|
| 348 |
|
|
[grid="all"]
|
| 349 |
|
|
`----------`--------------------`-----------------`--------------------
|
| 350 |
|
|
font type Japanese font name Chinese font name Korean font name
|
| 351 |
|
|
-----------------------------------------------------------------------
|
| 352 |
|
|
sans-serif gothic, ゴチック hei, gothic dodum, gulim, gothic
|
| 353 |
|
|
serif mincho, 明朝 song, ming batang
|
| 354 |
|
|
-----------------------------------------------------------------------
|
| 355 |
|
|
|
| 356 |
|
|
Font name such as "VL PGothic" with "P" is a proportional font which corresponds to the fixed width "VL Gothic" font.
|
| 357 |
|
|
|
| 358 |
|
|
For example, Shift_JIS code table comprises 7070 characters. They can be grouped into:
|
| 359 |
|
|
|
| 360 |
|
|
- JIS X 0201 single-byte characters (191 characters),
|
| 361 |
|
|
- JIS X 0208 double-byte characters (6879 characters).
|
| 362 |
osamu |
6796 |
|
| 363 |
osamu |
6683 |
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.
|
| 364 |
|
|
|
| 365 |
|
|
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.
|
| 366 |
|
|
|
| 367 |
osamu |
6796 |
In 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 <<_x_utility_applications>>).
|
| 368 |
osamu |
6683 |
|
| 369 |
|
|
TIP: 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.
|
| 370 |
|
|
|
| 371 |
|
|
=== X applications
|
| 372 |
|
|
|
| 373 |
|
|
==== X office applications
|
| 374 |
|
|
|
| 375 |
|
|
Here is a list of basic office applications (OO is OpenOffice.org):
|
| 376 |
|
|
|
| 377 |
|
|
|
| 378 |
|
|
.List of basic X office applications
|
| 379 |
|
|
[grid="all"]
|
| 380 |
osamu |
6768 |
`------------------------`-------------`------------`-----`------------------------------------
|
| 381 |
|
|
package popcon package size type description
|
| 382 |
osamu |
6683 |
-----------------------------------------------------------------------------------------------
|
| 383 |
osamu |
6768 |
`openoffice.org-writer` @@@popcon1@@@ @@@psize1@@@ OO word processor
|
| 384 |
|
|
`openoffice.org-calc` @@@popcon1@@@ @@@psize1@@@ OO spreadsheet
|
| 385 |
|
|
`openoffice.org-impress` @@@popcon1@@@ @@@psize1@@@ OO presentation
|
| 386 |
|
|
`openoffice.org-base` @@@popcon1@@@ @@@psize1@@@ OO database management
|
| 387 |
|
|
`openoffice.org-draw` @@@popcon1@@@ @@@psize1@@@ OO vector graphics editor (draw)
|
| 388 |
|
|
`openoffice.org-math` @@@popcon1@@@ @@@psize1@@@ OO mathematical equation/formula editor
|
| 389 |
|
|
`abiword` @@@popcon1@@@ @@@psize1@@@ GNOME word processor
|
| 390 |
|
|
`gnumeric` @@@popcon1@@@ @@@psize1@@@ GNOME spreadsheet
|
| 391 |
|
|
`gimp` @@@popcon1@@@ @@@psize1@@@ GTK bitmap graphics editor (paint)
|
| 392 |
|
|
`inkscape` @@@popcon1@@@ @@@psize1@@@ GNOME vector graphics editor (draw)
|
| 393 |
|
|
`dia-gnome` @@@popcon1@@@ @@@psize1@@@ GNOME flowchart and diagram editor
|
| 394 |
|
|
`mergeant` @@@popcon1@@@ @@@psize1@@@ GNOME database management
|
| 395 |
|
|
`planner` @@@popcon1@@@ @@@psize1@@@ GNOME project management
|
| 396 |
|
|
`kword` @@@popcon1@@@ @@@psize1@@@ KDE word processor
|
| 397 |
|
|
`kspread` @@@popcon1@@@ @@@psize1@@@ KDE spreadsheet
|
| 398 |
|
|
`kpresenter` @@@popcon1@@@ @@@psize1@@@ KDE presentation
|
| 399 |
|
|
`kexi` @@@popcon1@@@ @@@psize1@@@ KDE database management
|
| 400 |
|
|
`kivio` @@@popcon1@@@ @@@psize1@@@ KDE flowchart and diagram editor
|
| 401 |
|
|
`karbon` @@@popcon1@@@ @@@psize1@@@ KDE vector graphics editor (draw)
|
| 402 |
|
|
`krita` @@@popcon1@@@ @@@psize1@@@ KDE bitmap graphics editor (paint)
|
| 403 |
|
|
`kplato` @@@popcon1@@@ @@@psize1@@@ KDE project management
|
| 404 |
|
|
`kchart` @@@popcon1@@@ @@@psize1@@@ KDE graph and chart drawing program
|
| 405 |
|
|
`kformula` @@@popcon1@@@ @@@psize1@@@ KDE mathematical equation/formula editor
|
| 406 |
|
|
`kugar` @@@popcon1@@@ @@@psize1@@@ KDE business quality report generator
|
| 407 |
osamu |
6683 |
-----------------------------------------------------------------------------------------------
|
| 408 |
|
|
|
| 409 |
|
|
==== X utility applications
|
| 410 |
|
|
|
| 411 |
|
|
Here is a list of basic utility applications which caught my eyes:
|
| 412 |
|
|
|
| 413 |
|
|
|
| 414 |
|
|
.List of basic X utility applications
|
| 415 |
|
|
[grid="all"]
|
| 416 |
osamu |
6768 |
`-----------`-------------`------------`-----`-----------------------------------------------------
|
| 417 |
|
|
package popcon package size type description
|
| 418 |
osamu |
6683 |
---------------------------------------------------------------------------------------------------
|
| 419 |
osamu |
6768 |
`evince` @@@popcon1@@@ @@@psize1@@@ GNOME document(pdf) viewer
|
| 420 |
|
|
`kpdf` @@@popcon1@@@ @@@psize1@@@ KDE3 document(pdf) viewer
|
| 421 |
|
|
`okular` @@@popcon1@@@ @@@psize1@@@ KDE4 document(pdf) viewer
|
| 422 |
|
|
`evolution` @@@popcon1@@@ @@@psize1@@@ GNOME Personal information Management (groupware and email)
|
| 423 |
|
|
`kontact` @@@popcon1@@@ @@@psize1@@@ KDE Personal information Management (groupware and email)
|
| 424 |
|
|
`scribus` @@@popcon1@@@ @@@psize1@@@ KDE desktop page layout editor
|
| 425 |
|
|
`glabels` @@@popcon1@@@ @@@psize1@@@ GNOME label editor
|
| 426 |
|
|
`kbarcode` @@@popcon1@@@ @@@psize1@@@ KDE barcode and label printing application
|
| 427 |
|
|
`gnucash` @@@popcon1@@@ @@@psize1@@@ GNOME personal accounting
|
| 428 |
|
|
`homebank` @@@popcon1@@@ @@@psize1@@@ GTK personal accounting
|
| 429 |
|
|
`kmymoney2` @@@popcon1@@@ @@@psize1@@@ KDE personal accounting
|
| 430 |
|
|
`xsane` @@@popcon1@@@ @@@psize1@@@ GTK scanner frontend
|
| 431 |
|
|
`kooka` @@@popcon1@@@ @@@psize1@@@ KDE scanner frontend
|
| 432 |
osamu |
6683 |
---------------------------------------------------------------------------------------------------
|
| 433 |
|
|
|
| 434 |
|
|
CAUTION: The `poppler-data` package (non-free, see <<_ghostscript>>) needs to be installed for `evince` and `okular` to display CJK PDF documents using Cmap data (<<_cjk_fonts>>).
|
| 435 |
|
|
|
| 436 |
|
|
NOTE: 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.
|
| 437 |
|
|
|
| 438 |
|
|
=== The X trivia
|
| 439 |
|
|
|
| 440 |
|
|
==== Keymaps and pointer button mappings in X
|
| 441 |
|
|
|
| 442 |
|
|
`xmodmap`(1) is a utility for modifying keymaps and pointer button mappings in the X window system.
|
| 443 |
|
|
To get the **keycode**, run `xev`(1) 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.
|
| 444 |
|
|
|
| 445 |
|
|
==== Classic X clients
|
| 446 |
|
|
|
| 447 |
|
|
Most traditional X client programs, such as `xterm`(1), can be started with a set of standard command line options to specify geometry, font, and display.
|
| 448 |
|
|
|
| 449 |
|
|
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.
|
| 450 |
|
|
|
| 451 |
|
|
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:
|
| 452 |
|
|
|
| 453 |
|
|
--------------------
|
| 454 |
|
|
$ xrdb -merge ~/.Xresources
|
| 455 |
|
|
--------------------
|
| 456 |
|
|
|
| 457 |
|
|
See `x`(7) and `xrdb`(1).
|
| 458 |
|
|
|
| 459 |
|
|
==== The X terminal emulator -- xterm
|
| 460 |
|
|
|
| 461 |
|
|
Learn everything about `xterm`(1) at http://dickey.his.com/xterm/xterm.faq.html[http://dickey.his.com/xterm/xterm.faq.html].
|
| 462 |
|
|
|
| 463 |
|
|
==== Running X clients as root
|
| 464 |
|
|
|
| 465 |
|
|
WARNING: Never start the X display/session manager under the root account by typing in `root` to the prompt of the display manager such as `gdm` because it is considered unsafe (insecure), even when you plan to perform administrative activities. The entire X architecture is considered insecure if run as root. You must always use the lowest privilege level possible, like a regular user account.
|
| 466 |
|
|
|
| 467 |
|
|
The easiest way to run a particular X client, e.g. "`foo`" as root is to use `sudo`(8):
|
| 468 |
|
|
|
| 469 |
|
|
--------------------
|
| 470 |
|
|
$ sudo foo &
|
| 471 |
|
|
--------------------
|
| 472 |
|
|
or
|
| 473 |
|
|
|
| 474 |
|
|
--------------------
|
| 475 |
|
|
$ sudo -s
|
| 476 |
|
|
# foo &
|
| 477 |
|
|
--------------------
|
| 478 |
|
|
or
|
| 479 |
|
|
|
| 480 |
|
|
--------------------
|
| 481 |
|
|
$ gksu foo &
|
| 482 |
|
|
--------------------
|
| 483 |
|
|
or
|
| 484 |
|
|
|
| 485 |
|
|
--------------------
|
| 486 |
|
|
$ ssh -X root@localhost
|
| 487 |
|
|
# foo &
|
| 488 |
|
|
--------------------
|
| 489 |
|
|
|
| 490 |
|
|
CAUTION: Use of `ssh`(1) just for this purpose as above is waste of resource.
|
| 491 |
|
|
|
| 492 |
|
|
Please note, in order for the X client to connect to the X server,
|
| 493 |
|
|
|
| 494 |
|
|
- values of the old user\'s "`$XAUTHORITY`" and "`$DISPLAY`" environment variables must be copied to the new user\'s ones, and
|
| 495 |
|
|
- the file pointed by value of the "`$XAUTHORITY`" environment variable must be readable by the new user.
|
| 496 |
|
|
|
| 497 |
|
|
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 `gconf-editor`(1) (menu: "Applications" -> "System Tools" -> "Configuration Editor").
|