# 使用 Homebrew, apk, dnf, MacPorts, Nix, zypper 安装 xwininfo

查看 xwininfo 的安装路径、可执行文件、元数据以及面向 AI 代理工作流的安全说明。

## 安装

```sh
sudo av install brew:xwininfo
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install xwininfo
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install xwininfo
```

  证据: MacPorts ports tree: x11/xwininfo/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- apk (92%):

```sh
sudo apk add xwininfo
```

  证据: Alpine Linux edge package indexes: xwininfo from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz

- dnf (92%):

```sh
sudo dnf install xwininfo
```

  证据: Fedora Rawhide package metadata: xwininfo from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/210a2053c8e007daf9ae39c2a21daaed9b2ddd07d63ecffa597050361e73650c-primary.xml.zst

- Nix (92%):

```sh
nix profile install nixpkgs#xwininfo
```

  证据: nixpkgs package indexes: pkgs/by-name/xw/xwininfo/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

- zypper (92%):

```sh
sudo zypper install xwininfo
```

  证据: openSUSE Tumbleweed package metadata: xwininfo from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst

## 软件包事实

- **软件包键:** brew:xwininfo
- **软件包管理器:** Homebrew
- **软件包管理器页面:** <https://formulae.brew.sh/formula/xwininfo>
- **版本:** 1.1.7
- **来源摘要:** Print information about windows on an X server
- **主页:** <https://gitlab.freedesktop.org/xorg/app/xwininfo>
- **上游文档:** <https://gitlab.freedesktop.org/xorg/app/xwininfo>
- **许可证:** MIT
- **源码归档:** <https://xorg.freedesktop.org/archive/individual/app/xwininfo-1.1.7.tar.xz>
- **最后更新:** 2026-07-19T21:12:39Z
- **已生成:** 2026-08-04T22:13:35+00:00

## 可执行文件

- xwininfo (cli)
- xwininfo (别名)

## 依赖

- libx11
- libxcb

## 构建依赖

- pkgconf

## 安装行为

- post-install 钩子: 未定义
- Bottle: 可用 于 arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux

## 版本和新鲜度

- 页面生成时间: 2026-08-04
- 管理器版本: 1.1.7
- 管理器更新时间: 2026-07-19
- 本地数据: OK
- 上游仓库: https://gitlab.freedesktop.org/xorg/app/xwininfo
- 信息: Release/tag comparison is only available for GitHub repositories.
## 项目历史与用法

xwininfo is the X.Org command-line utility for inspecting X windows. It prints selected window attributes such as id, geometry, depth, visual, children, window-manager hints, shape data, events, and recursive window trees.

### 项目历史

xwininfo belongs to the classic X11 application/tool set rather than to a separately branded application lineage. Its current X.Org README describes it plainly as a program that prints information about windows on an X server, with primary development in the xorg/app/xwininfo repository and questions directed to the Xorg mailing list.

The public cgit history shows the modern standalone module rooted in X.Org's early-2000s source imports: an X.Org baseline commit in 2003, XFree86 vendor imports in 2004, modular build-system work in 2005, and X11R7 packaging updates as X.Org split the monolithic tree into independently released modules.

Because xwininfo's job is to interrogate X server window state, its history follows X11's debugging culture: small tools such as xwininfo, xprop, xev, xlsclients, and xdpyinfo expose protocol and window-manager details that desktop users normally never see.

### 采用历史

xwininfo is widely packaged because it is basic X11 diagnostic equipment. Distributions ship it either as its own X.Org app package or as part of grouped X utilities; users reach for it when they need a window id, geometry, root-window data, child tree, or details for scripting around X clients.

Its adoption persists even as Wayland desktops grow, because Xwayland, remote X11, legacy window managers, CI display tests, and old Unix desktops still need simple command-line inspection of X windows.

### 使用方式

Without an id or name, xwininfo lets the user click a target window and then prints default stats. Common scripted forms include `xwininfo -id 0x...`, `xwininfo -root`, `xwininfo -tree -root`, `xwininfo -name TITLE`, and `xwininfo -all` for a broader dump.

The manpage documents options for children/tree traversal, geometry and size, bits, events, window-manager hints, shape extension data, root-window inspection, and integer-vs-hex window ids.

### 为什么软件包爱好者会关心

xwininfo is a package-nerd staple because it is one of the smallest ways to see the X server's model directly. It turns invisible protocol objects into text, which makes it useful in packaging tests, bug reports, shell scripts, window-manager debugging, and support docs.

It also illustrates the X.Org modularization story: a once-monolithic X utility became an independently versioned app module with its own repository, releases, and downstream package recipes.

### 时间线

- Pre-2000s: xwininfo exists as part of the traditional X/XFree86 utility set for inspecting X windows.
- 2003-11-14: X.Org cgit history records the R6.6 baseline import for this module.
- 2004: XFree86 vendor imports and X.Org merge history appear in the public repository lineage.
- 2005-07-08: Build-system work prepares xwininfo as an independent modular X.Org app package.
- 2005-12-21: Repository history records the X11R7 release package-version update.
- 2018: README is updated for the freedesktop.org GitLab migration.
- 2023-02-25: libxcb-errors support is added to improve X protocol error messages.
- 2025: Recent maintenance includes manpage fixes, `--help`/`--version` aliases, memory-leak fixes, and stdbool cleanup.

### Related projects

- X.Org and the X Window System: the display server/protocol stack inspected by xwininfo.
- xprop: companion utility for reading X window and root-window properties.
- xev: companion utility for observing X events.
- xdpyinfo, xlsclients, and xlsatoms: related X inspection utilities commonly referenced with xwininfo.
- Xlib, XCB, and libxcb-errors: libraries and protocol layers used around modern xwininfo behavior.

### 来源

- <https://cgit.freedesktop.org/xorg/app/xwininfo>
- <https://cgit.freedesktop.org/xorg/app/xwininfo/log/>
- <https://cgit.freedesktop.org/xorg/app/xwininfo/log/?ofs=100>
- <https://cgit.freedesktop.org/xorg/app/xwininfo/plain/README.md>
- <https://gitlab.freedesktop.org/xorg/app/xwininfo>
- <https://www.x.org/releases/current/doc/man/man1/xwininfo.1.xhtml>
- <https://www.x.org/wiki/>


## 安全说明

broad file, network, media, or database tool signal.

- **Geiger 风险:** blue / 中
- broad file, network, media, or database tool signal

## 源数据库详情

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** xwininfo
- **Version Scheme:** 0
- **Revision:** 0
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** stable

## 其他软件包管理器记录

- Nix - xwininfo: normalized package name match | nixpkgs package indexes: pkgs/by-name/xw/xwininfo/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- apk - xwininfo - 1.1.6-r0: normalized package name match | Alpine Linux edge package indexes: xwininfo from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Window information utility for X | https://cgit.freedesktop.org/xorg/app/xwininfo
- apk - xwininfo-doc - 1.1.6-r0: normalized package name match | Alpine Linux edge package indexes: xwininfo-doc from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Window information utility for X (documentation) | https://cgit.freedesktop.org/xorg/app/xwininfo
- dnf - xwininfo - 1.1.7-2.fc45: normalized package name match | Fedora Rawhide package metadata: xwininfo from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/210a2053c8e007daf9ae39c2a21daaed9b2ddd07d63ecffa597050361e73650c-primary.xml.zst | X window info utility | https://www.x.org
- zypper - xwininfo - 1.1.7-1.2: normalized package name match | openSUSE Tumbleweed package metadata: xwininfo from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | Window information utility for X | http://xorg.freedesktop.org/
- MacPorts - xwininfo: normalized package name match | MacPorts ports tree: x11/xwininfo/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1


## 相关链接

- [Secret-risk packages](https://pkg.so/zh-hans/secret-risk-packages/) - Has protected-tool coverage, approval-gate, or non-low Geiger security signals.
- [Terminal utility packages](https://pkg.so/zh-hans/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Networking and protocol packages](https://pkg.so/zh-hans/networking-protocol-tools/) - Matched network, protocol, or remote-service metadata.
- [Homebrew utility packages](https://pkg.so/zh-hans/brew-utility-packages/) - Matched Homebrew package provider.
- [pkgconf](https://pkg.so/zh-hans/brew/pkgconf/) - Build dependency declared by Homebrew.
- [xorg-server](https://pkg.so/zh-hans/brew/xorg-server/) - Shares pkgdb curated category or tags: cli, system, x11, xorg.
- [xinput](https://pkg.so/zh-hans/brew/xinput/) - Shares pkgdb curated category or tags: cli, system, x11, xorg.
- [xauth](https://pkg.so/zh-hans/brew/xauth/) - Shares pkgdb curated category or tags: cli, system, x11, xorg.
- [xkbcomp](https://pkg.so/zh-hans/brew/xkbcomp/) - Shares pkgdb curated category or tags: cli, system, x11, xorg.
- [libxcvt](https://pkg.so/zh-hans/brew/libxcvt/) - Shares pkgdb curated category or tags: cli, system, x11, xorg.
- [libxpm](https://pkg.so/zh-hans/brew/libxpm/) - Shares pkgdb curated category or tags: cli, system, x11, xorg.
- [xeyes](https://pkg.so/zh-hans/brew/xeyes/) - Shares pkgdb curated category or tags: cli, system, x11, xorg.
- [xinit](https://pkg.so/zh-hans/brew/xinit/) - Shares pkgdb curated category or tags: cli, system, x11, xorg.
- [quartz-wm](https://pkg.so/zh-hans/brew/quartz-wm/) - Local package facts share a topical domain. Shared terms: cli, libx11, system, window, x11.
- [twm](https://pkg.so/zh-hans/brew/twm/) - Local package facts share a topical domain. Shared terms: cli, libx11, system, window, x11.

## Combined YAML source

View the package source record on GitHub. [combined/xwininfo.yml](https://github.com/mxcl/pkgdb/blob/main/combined/xwininfo.yml)


## 来源

- pkg.so package database
- Geiger risk classifier
- package-page enrichment
- curated package history
- package version freshness
- pkgdb category and tag curation
- package relationship graph
- external package-manager database matches
- cross-ecosystem install command graph
