您可以使用xprop
的,可用的xorg-xprop
软件包。
只需运行xprop
并选择密码提示窗口即可。例如,xprop
为我的终端仿真器输出以下信息。
WM_STATE(WM_STATE):
window state: Normal
icon window: 0x0
WM_LOCALE_NAME(STRING) = "en_US.UTF-8"
WM_CLASS(STRING) = "screen-256color", "screen-256color"
WM_HINTS(WM_HINTS):
Client accepts input or input focus: True
WM_NORMAL_HINTS(WM_SIZE_HINTS):
program specified size: 564 by 340
program specified resize increment: 7 by 14
program specified base size: 4 by 4
WM_CLIENT_MACHINE(STRING) = "paradark"
WM_NAME(STRING) = "st"
WM_PROTOCOLS(ATOM): protocols WM_DELETE_WINDOW
该WM_NAME
字段在您的情况下可能特别有用。
xprop
如果无法选择窗口,将无法使用。您可以
xwininfo
改用。xwininfo
可在xorg-xwininfo
包装中找到。这是一个用法示例:
$ xwininfo -display :0 -tree -root
xwininfo: Window id: 0x286 (the root window) "LG3D"
Root window id: 0x286 (the root window) "LG3D"
Parent window id: 0x0 (none)
21 children:
...
0x1a00001 "st": ("screen-256color" "screen-256color") 862x532+1056+546 +1056+546
0x1600001 "st": ("screen-256color" "screen-256color") 1054x1065+-2112+13 +-2112+13
0x600001 "st": ("screen-256color" "screen-256color") 862x532+-1728+546 +-1728+546
0x400004 (has no name): () 1x1+0+0 +0+0
如果您需要有关该窗口的其他信息,请使用xprop
该窗口的ID。
$ xprop -display :0 -id 0x600001
WM_STATE(WM_STATE):
window state: Normal
icon window: 0x0
WM_LOCALE_NAME(STRING) = "en_US.UTF-8"
WM_CLASS(STRING) = "screen-256color", "screen-256color"
WM_HINTS(WM_HINTS):
Client accepts input or input focus: True
WM_NORMAL_HINTS(WM_SIZE_HINTS):
program specified size: 564 by 340
program specified resize increment: 7 by 14
program specified base size: 4 by 4
WM_CLIENT_MACHINE(STRING) = "paradark"
WM_NAME(UTF8_STRING) = "st"
WM_PROTOCOLS(ATOM): protocols WM_DELETE_WINDOW