0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

[Linux] X_起動_startx, xinit, ~/.xinitrc, /etc/X11/xinit/xinitrc

Last updated at Posted at 2025-06-08

CUI起動手順

ステップ コマンド / ファイル 説明
1 startx ユーザー用のラッパースクリプト。内部で xinit を呼び出す。
環境変数やログの処理もここで行われる。
2 xinit X サーバと X クライアント(ウィンドウマネージャなど)を起動する本体。
3 ~/.xinitrc ユーザーごとの設定スクリプト。ここで起動するクライアント(例: startplasma-x11, i3)を記述。
4 /etc/X11/xinit/xinitrc ユーザーの ~/.xinitrc が無い場合に代わりに使われるシステム全体のデフォルト設定。
5 ウィンドウマネージャ / デスクトップ環境の実行(例: GNOME, KDE 実際に起動する GUI 環境。最終的に exec で実行される。

CUI起動の流れ

┌────────────────────────────┐
│ 1. ユーザーが CLI ログイン         │
└────────────────────────────┘
              │
              ▼
┌────────────────────────────┐
│ 2. 手動で `startx` or `xinit` 実行 │
└────────────────────────────┘
              │
              ▼
┌────────────────────────────┐
│ 3. ~/.xinitrc の設定が読み込まれる │
└────────────────────────────┘
              │
              ▼
┌────────────────────────┐
│ 4. Xサーバ起動           │
└────────────────────────┘
              │
              ▼
┌────────────────────────┐
│ 5. ウィンドウマネージャ起動│
└────────────────────────┘
              │
              ▼
┌────────────────────────┐
│ 6. Xクライアント起動      │
└────────────────────────┘

GUI起動の流れ

┌────────────────────────┐
│ 1. systemd(PID 1)起動 │
└────────────────────────┘
              │
              ▼
┌────────────────────────────────────┐
│ 2. ディスプレイマネージャ起動(例:GDM, SDDM) │
└────────────────────────────────────┘
              │
              ▼
┌────────────────────────┐
│ 3. Xサーバ起動           │
└────────────────────────┘
              │
              ▼
┌──────────────────────────────┐
│ 4. ウィンドウマネージャ起動    │
└──────────────────────────────┘
              │
              ▼
┌──────────────────────────────┐
│ 5. Xクライアント起動            │
└──────────────────────────────┘

用語まとめ

種類 具体例 役割・説明
起動管理 init, systemd OS 起動時に各種サービスを起動する(systemd が現在主流)
手動起動補助 startx, xinit CLI から X セッションを起動するコマンド
Xサーバ X.Org 描画・入力(マウス・キーボードなど)管理の中核
ディスプレイマネージャ GDM, SDDM, LightDM, XDM GUI ログインを提供し、X セッションを開始
ウィンドウマネージャ Mutter, KWin, Openbox ウィンドウの外観や動作を管理
デスクトップ環境 GNOME, KDE, Xfce ウィンドウマネージャ + パネル + アプリなどの統合環境
Xクライアント xterm, firefox, xclock アプリケーション(Xサーバに描画要求を送るクライアント)

Ping-t

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?