mirror of
https://github.com/LCTT/TranslateProject.git
synced 2025-01-13 22:30:37 +08:00
translated
This commit is contained in:
parent
264b2c97d0
commit
26bf6cccc3
@ -1,91 +0,0 @@
|
||||
[#]: subject: "How to Check: Xorg or Wayland Display Server?"
|
||||
[#]: via: "https://www.debugpoint.com/check-wayland-or-xorg/"
|
||||
[#]: author: "Arindam https://www.debugpoint.com/author/admin1/"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: "geekpi"
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
How to Check: Xorg or Wayland Display Server?
|
||||
======
|
||||
|
||||
**Here’s how you can quickly check whether you are running Xorg or Wayland Display Server.**
|
||||
|
||||
With every passing day, the modern Wayland display server is making its way to all Linux distributions. Although the legacy Xorg is still relevant and will stay, Wayland is undoubtedly better in security and other performance aspects.
|
||||
|
||||
However, Xorg will not completely phase out anytime soon. Probably never.
|
||||
|
||||
If you are running any Linux distribution, how can you check whether you are running Xorg or Wayland? Here’s how.
|
||||
|
||||
### Wayland or Xorg: Which one are you running?
|
||||
|
||||
- Open a terminal window (CTRL+ALT+T) in your Linux distributions (e.g. Ubuntu, Fedora, Arch…etc.).
|
||||
|
||||
- Then type the following command and hit enter.
|
||||
|
||||
```
|
||||
echo $XDG_SESSION_TYPE
|
||||
```
|
||||
|
||||
- The output of the command will tell you whether the current session is Wayland or Xorg (X11).
|
||||
|
||||
```
|
||||
[debugpoint@fedora ~]$ echo $XDG_SESSION_TYPEwayland
|
||||
```
|
||||
|
||||
![This command can give you details about Xorg or Wayland][1]
|
||||
|
||||
That’s simple. However, there are other ways as well.
|
||||
|
||||
### Other methods
|
||||
|
||||
#### Using Settings
|
||||
|
||||
If you want a graphical method, open your Linux distribution settings application. In the about section, you should see the Wayland/X11 mentioned under some label.
|
||||
|
||||
For example, in the GNOME Settings, you can find it under “Windowing system”, as shown below.
|
||||
|
||||
![In GNOME Settings you can find it][2]
|
||||
|
||||
#### Using session values
|
||||
|
||||
You can also find it out using `loginctl` which is the [systemd][3] login manager. Remember, it only works for systemd-based systems.
|
||||
|
||||
Open a terminal and run the below command. You can see the session id value. In this example `c2`.
|
||||
|
||||
```
|
||||
loginctl
|
||||
```
|
||||
|
||||
Now, pass the session id to the following command to get the display server type. Make sure to change c2 to your system spec.
|
||||
|
||||
```
|
||||
loginctl show-session c2 -p Type
|
||||
```
|
||||
|
||||
![Using loginctl to find out][4]
|
||||
|
||||
### Wrapping Up
|
||||
|
||||
So, these are some of the ways you can find out whether you are running Systemd or Xorg in your Linux system. You can also use the above commands in your shell scripts for further process automation.
|
||||
|
||||
Cheers.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.debugpoint.com/check-wayland-or-xorg/
|
||||
|
||||
作者:[Arindam][a]
|
||||
选题:[lkxed][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://www.debugpoint.com/author/admin1/
|
||||
[b]: https://github.com/lkxed
|
||||
[1]: https://www.debugpoint.com/wp-content/uploads/2022/10/This-command-can-give-you-details-about-Xorg-or-Wayland-1024x612.jpg
|
||||
[2]: https://www.debugpoint.com/wp-content/uploads/2022/10/In-GNOME-Settings-you-can-find-it.jpg
|
||||
[3]: https://www.debugpoint.com/tag/systemd/
|
||||
[4]: https://www.debugpoint.com/wp-content/uploads/2022/10/Using-loginctl-to-find-out.jpg
|
@ -0,0 +1,91 @@
|
||||
[#]: subject: "How to Check: Xorg or Wayland Display Server?"
|
||||
[#]: via: "https://www.debugpoint.com/check-wayland-or-xorg/"
|
||||
[#]: author: "Arindam https://www.debugpoint.com/author/admin1/"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: "geekpi"
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
如何检查: 是 Xorg 还是 Wayland 显示服务器?
|
||||
======
|
||||
|
||||
**以下是快速检查在运行 Xorg 还是 Wayland 显示服务器的方法。**
|
||||
|
||||
随着时间的推移,现代 Wayland 显示服务器正在进入所有 Linux 发行版。尽管遗留的 Xorg 仍然相关并且会继续存在,但 Wayland 无疑在安全性和其他性能方面更好。
|
||||
|
||||
但是,Xorg 不会很快完全淘汰。可能永远不会。
|
||||
|
||||
如果你在运行任何 Linux 发行版,如何检查运行的是 Xorg 还是 Wayland?下面是方法。
|
||||
|
||||
### Wayland 或 Xorg:你在运行哪一个?
|
||||
|
||||
- 在你的 Linux 发行版(例如 Ubuntu、Fedora、Arch 等)中打开一个终端窗口 (CTRL+ALT+T)。
|
||||
|
||||
- 然后输入以下命令并回车。
|
||||
|
||||
```
|
||||
echo $XDG_SESSION_TYPE
|
||||
```
|
||||
|
||||
- 命令输出会告诉你当前会话是 Wayland 还是 Xorg (X11)。
|
||||
|
||||
```
|
||||
[debugpoint@fedora ~]$ echo $XDG_SESSION_TYPEwayland
|
||||
```
|
||||
|
||||
![此命令可以为您提供有关 Xorg 或 Wayland 的详细信息][1]
|
||||
|
||||
这很简单。但是,还有其他方法。
|
||||
|
||||
### 其他方法
|
||||
|
||||
#### 使用设置
|
||||
|
||||
如果你需要图形方法,请打开你的 Linux 发行版的设置应用。在关于部分,你应该看到某个标签下中的 Wayland/X11。
|
||||
|
||||
例如,在 GNOME 设置中,你可以在 “Windowing system” 下找到它,如下图所示。
|
||||
|
||||
![在 GNOME 设置中可以找到它][2]
|
||||
|
||||
#### 使用会话值
|
||||
|
||||
你还可以使用 [systemd][3] 登录管理器 `loginctl` 找到它。请记住,它仅适用于基于 systemd 的系统。
|
||||
|
||||
打开终端并运行以下命令。你可以看到会话 id 值。在此示例中为 `c2`。
|
||||
|
||||
```
|
||||
loginctl
|
||||
```
|
||||
|
||||
现在,将会话 ID 传递给以下命令以获取显示服务器类型。确保将 c2 更改为您的系统规格。
|
||||
|
||||
```
|
||||
loginctl show-session c2 -p Type
|
||||
```
|
||||
|
||||
![使用 loginctl 查找][4]
|
||||
|
||||
### 总结
|
||||
|
||||
这些是你可以确定在 Linux 系统中运行的是 Systemd 还是 Xorg 的一些方法。你还可以在 shell 脚本中使用上述命令来实现进一步的流程自动化。
|
||||
|
||||
干杯。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.debugpoint.com/check-wayland-or-xorg/
|
||||
|
||||
作者:[Arindam][a]
|
||||
选题:[lkxed][b]
|
||||
译者:[geekpi](https://github.com/geekpi)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://www.debugpoint.com/author/admin1/
|
||||
[b]: https://github.com/lkxed
|
||||
[1]: https://www.debugpoint.com/wp-content/uploads/2022/10/This-command-can-give-you-details-about-Xorg-or-Wayland-1024x612.jpg
|
||||
[2]: https://www.debugpoint.com/wp-content/uploads/2022/10/In-GNOME-Settings-you-can-find-it.jpg
|
||||
[3]: https://www.debugpoint.com/tag/systemd/
|
||||
[4]: https://www.debugpoint.com/wp-content/uploads/2022/10/Using-loginctl-to-find-out.jpg
|
Loading…
Reference in New Issue
Block a user