第7章 GUI システム

目次

7.1. GUI desktop environment
7.2. GUI 通信プロトコル
7.3. GUI インフラストラクチャー
7.4. GUI アプリケーション
7.5. フォント
7.5.1. 基本的なフォント
7.5.2. Font rasterization
7.6. サンドボックス
7.7. リモートデスクトップ
7.8. Xサーバ接続
7.8.1. X サーバローカル接続
7.8.2. X サーバリモート接続
7.8.3. X サーバ chroot 接続
7.9. クリップボード

There are several choices for the full featured GUI desktop environment on the Debian system.


[ヒント] ヒント

Dependency packages selected by a task metapackage may be out of sync with the latest package transition state under the Debian unstable/testing environment. For task-gnome-desktop, you may need to adjust package selections as follows:

  • Start aptitude(8) as sudo aptitude -u.

  • カーサを "Tasks" に移動し "Enter" を押す。

  • カーサを "End-user" に移動し "Enter" を押す。

  • カーサを "GNOME" に移動し "Enter" を押す。

  • カーサを task-gnome-desktop に移動し "Enter" を押す。

  • カーサを "Depends" に移動し "m" (手動で manually 選択) を押す。

  • カーサを "Recommends" に移動し "m" (手動で manually 選択) を押す。

  • カーサを "task-gnome-desktop に移動し "-" を押す。 (drop)

  • Adjust selected packages while dropping problematic ones causing package conflicts.

  • "g" を押してインストールを開始する。

This chapter will focus mostly on the default desktop environment of Debian: task-gnome-desktop offering GNOME on wayland.

GNOME デスクトップで使用されうる GUI 通信プロトコル:

Please check freedesktop.org site for how Wayland architecture is different from X Window architecture.

From user's perspective, differences can be colloquially summarized as:

  • Wayland is a same-host GUI communication protocol: new, simpler, faster, no setuid root binary

  • X Window is a network-capable GUI communication protocol: traditional, complex, slower, setuid root binary

For applications using Wayland protocol, the access to their display contents from a remote host is supported by the VNC or RDP. See 「リモートデスクトップ」

Modern X servers have the MIT Shared Memory Extension and communicate with their local X clients using the local shared memory. This bypasses the network transparent Xlib interprocess communication channel and gains performance. This situation was the background of creating Wayland as a local-only GUI communication protocol.

Using the xeyes program started from the GNOME terminal, you can check GUI communication protocol used by each GUI application.

 $ xeyes
  • If the mouse cursor is on an application such as "GNOME terminal" which uses Wayland display server protocol, eyes don't move with the mouse cursor.

  • If the mouse cursor is on an application such as "xterm" which uses X Window System core protocol, eyes move with the mouse cursor exposing not-so-isolated nature of X Window architecture.

As of April 2021, many popular GUI applications such as GNOME and LibreOffice (LO) applications have been migrated to the Wayland display server protocol. I see xterm, gitk, chromium, firefox, gimp, dia, and KDE applications still use X Window System core protocol.

[注記] 注記

For both the xwayland on Wayland or the native X Window System, the old X server configuration file "/etc/X11/xorg.conf" shouldn't exist on the system. The graphics and input devices are now configured by the kernel with DRM, KMS, and udev. The native X server has been rewritten to use them. See "modedb default video mode support" in the Linux kernel documentation.

Here are notable GUI infrastructure packages for the GNOME on Wayland environment.


Here, "[auto]" means that these packages are automatically installed when task-gnome-desktop is installed.

[ヒント] ヒント

gnome-tweaks is the indispensable configuration utility. For example:

  • You can force "Over-Amplification" of sound volume from "General".

  • You can force "Caps" to become "Esc" from "Keyboard & Mouse" -> "Keyboard" -> "Additional Layout Option".

有用な GUI アプリケーションの多くは Debian で利用できるようになりました。対応する機能が GNOME デスクトップ環境下では利用できないため、scribus (KDE) のようなソフトウェアを GNOME デスクトップ環境にインストールするのはまったく問題ありません。しかしながら、機能が重複するパッケージをインストールしすぎるとあなたのシステムが散らかってしまいます。

著者の目に止まった GUI アプリケーションのリストを記します。

表7.3 特筆すべき GUI アプリケーションの一覧

パッケージ ポプコン パッケージサイズ タイプ 説明
evolution V:28, I:226 470 GNOME 個人情報管理 (グループウエアと電子メール)
thunderbird V:56, I:123 193432 GTK Eメールクライアント (Mozilla Thunderbird)
kontact V:1, I:12 2195 KDE 個人情報管理 (グループウエアと電子メール)
libreoffice-writer V:122, I:414 38212 LO ワードプロセッサ
abiword V:1, I:9 3467 GNOME ワードプロセッサ
calligrawords V:0, I:6 5836 KDE ワードプロセッサ
scribus V:1, I:20 30234 KDE PDF ファイルを編集するための デスクトップパブリッシング
glabels V:0, I:4 1338 GNOME ラベルエディター
libreoffice-calc V:118, I:410 30647 LO スプレッドシート
gnumeric V:4, I:18 10003 GNOME スプレッドシート
calligrasheets V:0, I:5 11244 KDE スプレッドシート
libreoffice-impress V:83, I:407 9098 LO プレゼンテーション
calligrastage V:0, I:4 5142 KDE プレゼンテーション
libreoffice-base V:46, I:171 5933 LO データーベース管理
kexi V:0, I:1 7118 KDE データーベース管理
libreoffice-draw V:84, I:408 13442 LO ベクトル画像エディター (ドロー)
inkscape V:17, I:147 99316 GNOME ベクトル画像エディター (ドロー)
karbon V:0, I:5 3581 KDE ベクトル画像エディター (ドロー)
dia V:2, I:25 3908 GTK フローチャートやダイアグラムエディター
gimp V:53, I:272 19767 GTK ビットマップ画像エディター (ペイント)
shotwell V:15, I:233 6548 GTK デジタル写真オーガナイザー
digikam V:2, I:11 265 KDE デジタル写真オーガナイザー
darktable V:4, I:14 29882 GTK lighttable and darkroom for photographers
planner V:0, I:3 1458 GNOME プロジェクト管理
calligraplan V:0, I:1 19013 KDE プロジェクト管理
gnucash V:2, I:9 32579 GNOME 個人会計
homebank V:0, I:2 1232 GTK 個人会計
lilypond V:1, I:8 6424 - music typesetter
kmymoney V:0, I:2 13341 KDE 個人会計
librecad V:1, I:16 8798 Qt アプリ computer-aided design (CAD) system (2D)
freecad I:16 53 Qt アプリ computer-aided design (CAD) system (3D)
kicad V:2, I:14 196806 GTK electronic schematic and PCB design software
xsane V:13, I:148 2339 GTK スキャナーのフロントエンド
libreoffice-math V:67, I:411 2234 LO 数式エディター
calibre V:8, I:30 62725 KDE e-book コンバーターとライブラリーの管理
fbreader V:1, I:11 2631 GTK e-book リーダー
evince V:96, I:306 974 GNOME 文書 (pdf) ビューワー
okular V:35, I:109 17297 KDE 文書 (pdf) ビューワー
x11-apps V:26, I:440 2476 純粋な X アプリ xeyes(1) など。
x11-utils V:169, I:556 712 純粋な X アプリ xev(1), xwininfo(1) など。

Many useful scalable fonts are available for users on Debian. User's concern is how to avoid redundancy and how to configure parts of installed fonts to be disabled. Otherwise, useless font choices may clutter your GUI application menus.

Debian system uses FreeType 2.0 library to rasterise many scalable font formats for screen and print:

The following table is compiled in the hope to help users to chose appropriate scalable fonts with clear understanding of the metric compatibility and the glyph coverage. Most fonts cover all Latin fonts, Greek, and Cyril character glyphs. The final choice of activated fonts can also be affected by your aesthetics. These fonts can be used for the screen display or for the paper printing.

表7.4 List of notable TrueType and OpenType fonts

パッケージ ポプコン サイズ サンセリフ セリフ 等幅 フォントについての注釈
fonts-cantarell V:124, I:288 572 59 - - Cantarell (GNOME 3, display)
fonts-noto I:130 35 61 63 40 Noto fonts (Google, multi-lingual with CJK)
fonts-dejavu I:422 39 58 68 40 DejaVu (GNOME 2, MCM:Verdana, extended Bitstream Vera)
fonts-liberation2 V:114, I:378 4290 56 60 40 Liberation fonts for LibreOffice (Red Hat, MCMATC)
fonts-croscore V:20, I:44 5278 56 60 40 Chrome OS: Arimo, Tinos and Cousine (Google, MCMATC)
fonts-crosextra-carlito V:23, I:172 2728 57 - - Chrome OS: Carlito (Google, MCM:Calibri )
fonts-crosextra-caladea I:171 347 - 55 - Chrome OS: Caladea (Google, MCM:Cambria ) (Latin only )
fonts-freefont-ttf V:64, I:226 6656 57 59 40 GNU FreeFont (extended URW Nimbus)
fonts-quicksand I:391 392 56 - - Debian task-desktop, Quicksand (display, Latin only)
fonts-hack V:20, I:95 2508 - - 40 P A typeface designed for source code Hack (Facebook)
fonts-sil-gentiumplus I:35 13568 - 54 - Gentium SIL
fonts-sil-charis I:26 6406 - 59 - Charis SIL
fonts-urw-base35 V:127, I:370 15558 56 60 40 URW Nimbus (Sans, Roman No. 9 L, Mono L, MCAHTC)
fonts-ubuntu V:2, I:5 4339 58 - 33 P Ubuntu fonts (display)
fonts-terminus V:0, I:2 453 - - 33 Cool retro terminal fonts
ttf-mscorefonts-installer V:1, I:54 85 56? 60 40 Downloader of Microsoft non-free fonts (see below)

Here:

  • "MCM" stands for "metric compatible with fonts provided by Microsoft"

  • "MCMATC" stands for "metric compatible with fonts provided by Microsoft: Arial, Times New Roman, Courier New"

  • "MCAHTC" stands for "metric compatible with fonts provided by Adobe: Helvetica, Times, Courier"

  • Numbers in font type columns stands for the rough relative "M" width for the same point size font.

  • "P" in mono font type columns stands for its usability for programming having clearly distinguishable "0"/"O" and "1"/"I"/"l".

  • The ttf-mscorefonts-installer package downloads Microsoft's "Core fonts for the Web" and installs Arial, Times New Roman, Courier New, Verdana, ... . These installed font data are non-free data.

Many free Latin fonts have their lineage traced to URW Nimbus family or Bitstream Vera.

[ヒント] ヒント

If your locale needs fonts not covered well by the above fonts, please use aptitude to check under task packages listed under "Tasks" -> "Localization". The font packages listed as "Depends:" or "Recommends:" in the localization task packages are the primary candidates.

Debian uses FreeType to rasterize fonts. Its font choice infrastructure is provided by the Fontconfig font configuration library.


[ヒント] ヒント

Some font packages such as fonts-noto* install too many fonts. You may also want to keep some font packages installed but disabled under the normal use situation. The multiple glyphs are expected for some Unicode code points due to Han unification and unwanted gliphs may be chosen by the unconfigured Fontconfig library. One of the most annoying case is "U+3001 IDEOGRAPHIC COMMA" and "U+3002 IDEOGRAPHIC FULL STOP" among CJK countries. You can avoid this problematic situation easily by configuring font availability using Font Manager GUI (font-manager).

You can list font configuration state from the command line, too.

  • fontconfig のフォントデフォルトに関しては "fc-match(1)"

  • fontconfig で利用可能なフォントに関しては "fc-list(1)"

You can configure font configuration state from the text editor but this is non-trivial. See fonts.conf(5).

Many mostly GUI applications on Linux are available in binary formats from non-Debian sources.

[警告] 警告

Binaries from these sites may include proprietary non-free software packages.

There is some raison d'être for these binary format distributions for Free Software aficionados using Debian since these can accommodate clean set of libraries used for each application by the respective upstream developer independent of the ones provided by Debian.

The inherent risk of running external binaries can be reduced by using the sandbox environment which leverages modern Linux security features (see 「Linux のセキュリティ機能」).

  • For binaries from AppImage and some upstream sites, run them in firejail with manual configuration.

  • For binaries from FLATHUB, run them in Flatpak . (No manual configuration required.)

  • For binaries from snapcraft, run them in Snap . (No manual configuration required. Compatible with daemon programs.)

The xdg-desktop-portal package provides a standardized API to common desktop features. See xdg-desktop-portal (flatpak) and xdg-desktop-portal (snap)


This sandbox environment technology is very much like apps on smart phone OS where apps are executed under controlled resource accesses.

Some large GUI applications such as web browsers on Debian also use sandbox environment technology internally to make them more secure.


There are several ways to connect from an application on a remote host to the X server including xwayland on the local host.


Access to the local X server by the local applications which use X core protocol can be locally connected through a local UNIX domain socket. This can be authorized by the authority file holding access cookie. The authority file location is identified by the "$XAUTHORITY" environment variable and X display is identified by the "$DISPLAY" environment variable. Since these are normally set automatically, no special action is needed, e.g. "gitk" as the following.

username $ gitk
[注記] 注記

For xwayland, XAUTHORITY holds value like "/run/user/1000/.mutter-Xwaylandauth.YVSU30".

For clipping text to clipboard, see 「マウス操作」.

For clipping graphics to clipboard, see 「グラフィクスデーターツール」.

Some CLI commands can manipulate character clipboard (PRIMARY and CLIPBOARD), too.