You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
相比于久负盛名的 Windows 与 macOS,Linux 的桌面以及其生态是独特的。本文将简单介绍 Linux 桌面与窗口系统中一些重要的概念。
6
10
7
-
## X 与 Wayland
11
+
## X
12
+
13
+
X 窗口系统起源于 1984 年。在这个时代,桌面环境没有酷炫的效果,相比之下,性能与资源占用重要得多。并且当时个人计算机还是一个新兴的概念,用户更多的时候需要使用终端机连接到服务器上运行任务。因此,X 的设计上包含了当时那个年代设计的局限性,并且有着独特的「网络透明性」的设计:需要显示窗口的程序(客户端)和可以给用户显示窗口的程序(服务端)是可以分离的,通过网络去连接。
14
+
15
+
可以运行 `xlsclients` 获取连接到当前 X 服务器的客户端列表:
16
+
17
+
```console
18
+
$ xlsclients
19
+
examplehost gsd-xsettings
20
+
examplehost steamwebhelper
21
+
examplehost code
22
+
examplehost mutter-x11-frames
23
+
examplehost steam
24
+
```
25
+
26
+
客户端可以创建一个或多个窗口,可以使用 `xwininfo` 获取窗口信息:
27
+
28
+
```console
29
+
$ xwininfo -root -tree
30
+
31
+
xwininfo: Window id: 0x503 (the root window) (has no name)
32
+
33
+
Root window id: 0x503 (the root window) (has no name)
0 commit comments