如何恢复丢失的 X windows

如何恢复丢失的 X windows

不知何故,我设法使我的窗口管理器崩溃dwm。重新启动 dwm 后(在同一个 X 会话中),我打开的 90 多个窗口中有一半以上消失了。lsw反映了 dwm 显示的内容(即 90 多个窗口中的一半丢失了),因此 dwm 没有隐藏任何内容。然而,这些过程管理据报道,这些窗户仍然存在ps。 ps 显示零个停止的进程,并且丢失的窗口没有显示僵尸状态(它们显示 S 和 S+)。

有没有办法将这些进程“重新附加”到 X 服务器,以便我可以恢复我的 Windows?通常情况下,我会在此处展示我所尝试过的内容,但我实际上不知道如何完成这样的事情,而 Google 除了在 OS X 上将窗口移出屏幕外,什么也没有提出。

重申一下,我想要做的是获取仍在运行的 GUI 进程并将它们返回到 X 服务器(显示:1),以便我可以保存我的工作。这可能吗?

更新1

lsw这是、xlsclients和的输出xwininfo -tree -root

$ lsw
0x0600001 braden@braden-Leopard-WS: ~
0xa800041 Edit - Unix & Linux Stack Exchange - Chromium
0x2200001 [No Name] + - VIM
0xa80142c New Tab - Chromium
0xa800078 New Tab - Chromium
0xa80144e New Tab - Chromium
0x7000001 [No Name] + - VIM
0xa80138b New Tab - Chromium

$ xlsclients
braden-Leopard-WS  gnome-screensaver
braden-Leopard-WS  kded4
braden-Leopard-WS  kded4
braden-Leopard-WS  /usr/bin/kglobalaccel
braden-Leopard-WS  /usr/bin/kglobalaccel
braden-Leopard-WS  /usr/bin/knotify4
braden-Leopard-WS  /usr/bin/knotify4
braden-Leopard-WS  chromium-browser
braden-Leopard-WS  notify-osd

$ xwininfo -tree -root
xwininfo: Window id: 0x1df (the root window) "/:94 . ~:53 . V:11 | D 2017.10.04 | T 14:31:16"

  Root window id: 0x1df (the root window) "/:94 . ~:53 . V:11 | D 2017.10.04 | T 14:31:16"
  Parent window id: 0x0 (none)
     38 children:
     0x600001 "braden@braden-Leopard-WS: ~": ("xterm-256color" "xterm-256color")  1138x1040+1071+248  +1071+248
     0xa800048 (has no name): ()  60x26+470+153  +470+153
     0xa80142e (has no name): ()  147x26+1056+66  +1056+66
     0xa80007a (has no name): ()  156x26+1275+356  +1275+356
     0x40000e (has no name): ()  1920x22+0+-22  +0+-22
     0x40000d (has no name): ()  1920x22+0+0  +0+0
     0xa800041 "Edit - Unix & Linux Stack Exchange - Chromium": ("chromium-browser" "Chromium-browser")  1912x1050+0+22  +0+22
     0x2200001 "[No Name] + - VIM": ("xterm-256color" "xterm-256color")  1912x1050+-3840+22  +-3840+22
     0xa80142c "New Tab - Chromium": ("chromium-browser" "Chromium-browser")  1144x1050+-2304+22  +-2304+22
     0xa800078 "New Tab - Chromium": ("chromium-browser" "Chromium-browser")  760x256+-1536+286  +-1536+286
     0xa80144e "New Tab - Chromium": ("chromium-browser" "Chromium-browser")  760x257+-1536+550  +-1536+550
     0x7000001 "[No Name] + - VIM": ("xterm-256color" "xterm-256color")  760x257+-1536+815  +-1536+815
     0xa80138b "New Tab - Chromium": ("chromium-browser" "Chromium-browser")  760x256+-1536+22  +-1536+22
     0x2600001 "VIM": ("VIM" "Vim_xterm")  1x1+0+0  +0+0
     0x1800008 (has no name): ()  1x1+-1+-1  +-1+-1
     0x1800001 "notify-osd": ("notify-osd" "Notify-osd")  10x10+10+10  +10+10
     0xa801454 (has no name): ()  409x215+1006+773  +1006+773
     0x9a00001 "VIM": ("VIM" "Vim_xterm")  1x1+0+0  +0+0
     0x980000f (has no name): ()  1x1+-1+-1  +-1+-1
     0xa80138d (has no name): ()  140x26+707+837  +707+837
     0x9800002 "chromium-browser": ()  10x10+-100+-100  +-100+-100
     0xa800015 "Chromium clipboard": ()  10x10+-100+-100  +-100+-100
     0xb000001 (has no name): ()  1x1+0+0  +0+0
     0xa800005 (has no name): ()  1x1+0+0  +0+0
     0x9800001 "chromium-browser": ("chromium-browser" "Chromium-browser")  10x10+10+10  +10+10
     0x920000a "knotify4": ("knotify4" "Knotify4")  960x432+0+0  +0+0
     0x9200004 (has no name): ()  1x1+0+0  +0+0
     0x9200002 "knotify4": ("knotify4" "Knotify4")  960x432+0+0  +0+0
     0x8e00001 (has no name): ()  1x1+0+0  +0+0
     0x900000a "kglobalaccel": ("kglobalaccel" "Kglobalaccel")  960x432+0+0  +0+0
     0x9000004 (has no name): ()  1x1+0+0  +0+0
     0x9000002 "kglobalaccel": ("kglobalaccel" "Kglobalaccel")  960x432+0+0  +0+0
     0x840000a "kded4": ("kded4" "Kded4")  960x432+0+0  +0+0
     0x8400004 (has no name): ()  1x1+0+0  +0+0
     0x8400002 "kded4": ("kded4" "Kded4")  960x432+0+0  +0+0
     0x1000002 "gnome-screensaver": ()  10x10+-100+-100  +-100+-100
     0x1000001 "gnome-screensaver": ("gnome-screensaver" "Gnome-screensaver")  10x10+10+10  +10+10
     0x800001 (has no name): ()  10x10+-20+-20  +-20+-20

$ xwininfo -tree -root | grep "has no name"
     0xa800048 (has no name): ()  60x26+470+153  +470+153
     0xa80142e (has no name): ()  147x26+1056+66  +1056+66
     0xa80007a (has no name): ()  156x26+1275+356  +1275+356
     0x40000e (has no name): ()  1920x22+0+-22  +0+-22
     0x40000d (has no name): ()  1920x22+0+0  +0+0
     0x1800008 (has no name): ()  1x1+-1+-1  +-1+-1
     0xa801454 (has no name): ()  409x215+1006+773  +1006+773
     0x980000f (has no name): ()  1x1+-1+-1  +-1+-1
     0xa80138d (has no name): ()  140x26+707+837  +707+837
     0xb000001 (has no name): ()  1x1+0+0  +0+0
     0xa800005 (has no name): ()  1x1+0+0  +0+0
     0x9200004 (has no name): ()  1x1+0+0  +0+0
     0x8e00001 (has no name): ()  1x1+0+0  +0+0
     0x9000004 (has no name): ()  1x1+0+0  +0+0
     0x8400004 (has no name): ()  1x1+0+0  +0+0
     0x800001 (has no name): ()  10x10+-20+-20  +-20+-20

“无名”窗口的数量似乎与我丢失的窗口数量大致相当,所以我很确定这些就是它们。现在:如何将它们重新连接到服务器。这才是真正的问题。

更新2

xwininfo以下是root 的每个子节点的输出:

$ xwininfo -tree -root | egrep "^ +0x" | while read line; do xwininfo -tree -id $(echo $line | awk '{print $1}'); done
xwininfo: Window id: 0xa800048 (has no name)

  Root window id: 0x1df (the root window) "/:94 . ~:53 . V:11 | D 2017.10.05 | T 09:42:06"
  Parent window id: 0x1df (the root window) "/:94 . ~:53 . V:11 | D 2017.10.05 | T 09:42:06"
     0 children.

xwininfo: Window id: 0xc0000c (has no name)

  Root window id: 0x1df (the root window) "/:94 . ~:53 . V:11 | D 2017.10.05 | T 09:42:06"
  Parent window id: 0x1df (the root window) "/:94 . ~:53 . V:11 | D 2017.10.05 | T 09:42:06"
     0 children.

xwininfo: Window id: 0xc00002 "Terminal"

  Root window id: 0x1df (the root window) "/:94 . ~:53 . V:11 | D 2017.10.05 | T 09:42:06"
  Parent window id: 0x1df (the root window) "/:94 . ~:53 . V:11 | D 2017.10.05 | T 09:42:06"
     0 children.

xwininfo: Window id: 0xc00001 "Terminal"

  Root window id: 0x1df (the root window) "/:94 . ~:53 . V:11 | D 2017.10.05 | T 09:42:06"
  Parent window id: 0x1df (the root window) "/:94 . ~:53 . V:11 | D 2017.10.05 | T 09:42:06"
     0 children.

xwininfo: Window id: 0xa80142e (has no name)

  Root window id: 0x1df (the root window) "/:94 . ~:53 . V:11 | D 2017.10.05 | T 09:42:06"
  Parent window id: 0x1df (the root window) "/:94 . ~:53 . V:11 | D 2017.10.05 | T 09:42:06"
     0 children.

xwininfo: Window id: 0xa80007a (has no name)

  Root window id: 0x1df (the root window) "/:94 . ~:53 . V:11 | D 2017.10.05 | T 09:42:06"
  Parent window id: 0x1df (the root window) "/:94 . ~:53 . V:11 | D 2017.10.05 | T 09:42:06"
     0 children.

xwininfo: Window id: 0x40000e (has no name)

  Root window id: 0x1df (the root window) "/:94 . ~:53 . V:11 | D 2017.10.05 | T 09:42:06"
  Parent window id: 0x1df (the root window) "/:94 . ~:53 . V:11 | D 2017.10.05 | T 09:42:06"
     0 children.

xwininfo: Window id: 0x40000d (has no name)

  Root window id: 0x1df (the root window) "/:94 . ~:53 . V:11 | D 2017.10.05 | T 09:42:06"
  Parent window id: 0x1df (the root window) "/:94 . ~:53 . V:11 | D 2017.10.05 | T 09:42:06"
     0 children.

xwininfo: Window id: 0xa800041 "Edit - Unix & Linux Stack Exchange - Chromium"

  Root window id: 0x1df (the root window) "/:94 . ~:53 . V:11 | D 2017.10.05 | T 09:42:06"
  Parent window id: 0x1df (the root window) "/:94 . ~:53 . V:11 | D 2017.10.05 | T 09:42:06"
     0 children.

xwininfo: Window id: 0x600001 "braden@braden-Leopard-WS: ~"

  Root window id: 0x1df (the root window) "/:94 . ~:53 . V:11 | D 2017.10.05 | T 09:42:06"
  Parent window id: 0x1df (the root window) "/:94 . ~:53 . V:11 | D 2017.10.05 | T 09:42:06"
     0 children.

xwininfo: Window id: 0xc00006 "Terminal"

  Root window id: 0x1df (the root window) "/:94 . ~:53 . V:11 | D 2017.10.05 | T 09:42:06"
  Parent window id: 0x1df (the root window) "/:94 . ~:53 . V:11 | D 2017.10.05 | T 09:42:06"
     1 child:
     0xc00007 (has no name): ()  1x1+-1+-1  +-3837+25

xwininfo: Window id: 0xc00007 (has no name)

  Root window id: 0x1df (the root window) "/:94 . ~:53 . V:11 | D 2017.10.05 | T 09:42:06"
  Parent window id: 0xc00006 "Terminal"
     0 children.

xwininfo: Window id: 0xa80144e "New Tab - Chromium"

  Root window id: 0x1df (the root window) "/:94 . ~:53 . V:11 | D 2017.10.05 | T 09:42:06"
  Parent window id: 0x1df (the root window) "/:94 . ~:53 . V:11 | D 2017.10.05 | T 09:42:06"
     0 children.

xwininfo: Window id: 0xa800078 "New Tab - Chromium"

  Root window id: 0x1df (the root window) "/:94 . ~:53 . V:11 | D 2017.10.05 | T 09:42:06"
  Parent window id: 0x1df (the root window) "/:94 . ~:53 . V:11 | D 2017.10.05 | T 09:42:06"
     0 children.

xwininfo: Window id: 0xa80138b "New Tab - Chromium"

  Root window id: 0x1df (the root window) "/:94 . ~:53 . V:11 | D 2017.10.05 | T 09:42:06"
  Parent window id: 0x1df (the root window) "/:94 . ~:53 . V:11 | D 2017.10.05 | T 09:42:06"
     0 children.

xwininfo: Window id: 0xa80142c "New Tab - Chromium"

  Root window id: 0x1df (the root window) "/:94 . ~:53 . V:11 | D 2017.10.05 | T 09:42:06"
  Parent window id: 0x1df (the root window) "/:94 . ~:53 . V:11 | D 2017.10.05 | T 09:42:06"
     0 children.

xwininfo: Window id: 0x7000001 "[No Name] + - VIM"

  Root window id: 0x1df (the root window) "/:94 . ~:53 . V:11 | D 2017.10.05 | T 09:42:06"
  Parent window id: 0x1df (the root window) "/:94 . ~:53 . V:11 | D 2017.10.05 | T 09:42:06"
     0 children.

xwininfo: Window id: 0x2200001 "[No Name] + - VIM"

  Root window id: 0x1df (the root window) "/:94 . ~:53 . V:11 | D 2017.10.05 | T 09:42:06"
  Parent window id: 0x1df (the root window) "/:94 . ~:53 . V:11 | D 2017.10.05 | T 09:42:06"
     0 children.

xwininfo: Window id: 0x2600001 "VIM"

  Root window id: 0x1df (the root window) "/:94 . ~:53 . V:11 | D 2017.10.05 | T 09:42:06"
  Parent window id: 0x1df (the root window) "/:94 . ~:53 . V:11 | D 2017.10.05 | T 09:42:06"
     0 children.

xwininfo: Window id: 0x1800008 (has no name)

  Root window id: 0x1df (the root window) "/:94 . ~:53 . V:11 | D 2017.10.05 | T 09:42:06"
  Parent window id: 0x1df (the root window) "/:94 . ~:53 . V:11 | D 2017.10.05 | T 09:42:06"
     0 children.

xwininfo: Window id: 0x1800001 "notify-osd"

  Root window id: 0x1df (the root window) "/:94 . ~:53 . V:11 | D 2017.10.05 | T 09:42:07"
  Parent window id: 0x1df (the root window) "/:94 . ~:53 . V:11 | D 2017.10.05 | T 09:42:07"
     0 children.

xwininfo: Window id: 0xa801454 (has no name)

  Root window id: 0x1df (the root window) "/:94 . ~:53 . V:11 | D 2017.10.05 | T 09:42:07"
  Parent window id: 0x1df (the root window) "/:94 . ~:53 . V:11 | D 2017.10.05 | T 09:42:07"
     0 children.

xwininfo: Window id: 0x9a00001 "VIM"

  Root window id: 0x1df (the root window) "/:94 . ~:53 . V:11 | D 2017.10.05 | T 09:42:07"
  Parent window id: 0x1df (the root window) "/:94 . ~:53 . V:11 | D 2017.10.05 | T 09:42:07"
     0 children.

xwininfo: Window id: 0x980000f (has no name)

  Root window id: 0x1df (the root window) "/:94 . ~:53 . V:11 | D 2017.10.05 | T 09:42:07"
  Parent window id: 0x1df (the root window) "/:94 . ~:53 . V:11 | D 2017.10.05 | T 09:42:07"
     0 children.

xwininfo: Window id: 0xa80138d (has no name)

  Root window id: 0x1df (the root window) "/:94 . ~:53 . V:11 | D 2017.10.05 | T 09:42:07"
  Parent window id: 0x1df (the root window) "/:94 . ~:53 . V:11 | D 2017.10.05 | T 09:42:07"
     0 children.

xwininfo: Window id: 0x9800002 "chromium-browser"

  Root window id: 0x1df (the root window) "/:94 . ~:53 . V:11 | D 2017.10.05 | T 09:42:07"
  Parent window id: 0x1df (the root window) "/:94 . ~:53 . V:11 | D 2017.10.05 | T 09:42:07"
     0 children.

xwininfo: Window id: 0xa800015 "Chromium clipboard"

  Root window id: 0x1df (the root window) "/:94 . ~:53 . V:11 | D 2017.10.05 | T 09:42:07"
  Parent window id: 0x1df (the root window) "/:94 . ~:53 . V:11 | D 2017.10.05 | T 09:42:07"
     0 children.

xwininfo: Window id: 0xb000001 (has no name)

  Root window id: 0x1df (the root window) "/:94 . ~:53 . V:11 | D 2017.10.05 | T 09:42:07"
  Parent window id: 0x1df (the root window) "/:94 . ~:53 . V:11 | D 2017.10.05 | T 09:42:07"
     0 children.

xwininfo: Window id: 0xa800005 (has no name)

  Root window id: 0x1df (the root window) "/:94 . ~:53 . V:11 | D 2017.10.05 | T 09:42:07"
  Parent window id: 0x1df (the root window) "/:94 . ~:53 . V:11 | D 2017.10.05 | T 09:42:07"
     0 children.

xwininfo: Window id: 0x9800001 "chromium-browser"

  Root window id: 0x1df (the root window) "/:94 . ~:53 . V:11 | D 2017.10.05 | T 09:42:07"
  Parent window id: 0x1df (the root window) "/:94 . ~:53 . V:11 | D 2017.10.05 | T 09:42:07"
     0 children.

xwininfo: Window id: 0x920000a "knotify4"

  Root window id: 0x1df (the root window) "/:94 . ~:53 . V:11 | D 2017.10.05 | T 09:42:07"
  Parent window id: 0x1df (the root window) "/:94 . ~:53 . V:11 | D 2017.10.05 | T 09:42:07"
     0 children.

xwininfo: Window id: 0x9200004 (has no name)

  Root window id: 0x1df (the root window) "/:94 . ~:53 . V:11 | D 2017.10.05 | T 09:42:07"
  Parent window id: 0x1df (the root window) "/:94 . ~:53 . V:11 | D 2017.10.05 | T 09:42:07"
     0 children.

xwininfo: Window id: 0x9200002 "knotify4"

  Root window id: 0x1df (the root window) "/:94 . ~:53 . V:11 | D 2017.10.05 | T 09:42:07"
  Parent window id: 0x1df (the root window) "/:94 . ~:53 . V:11 | D 2017.10.05 | T 09:42:07"
     0 children.

xwininfo: Window id: 0x8e00001 (has no name)

  Root window id: 0x1df (the root window) "/:94 . ~:53 . V:11 | D 2017.10.05 | T 09:42:07"
  Parent window id: 0x1df (the root window) "/:94 . ~:53 . V:11 | D 2017.10.05 | T 09:42:07"
     0 children.

xwininfo: Window id: 0x900000a "kglobalaccel"

  Root window id: 0x1df (the root window) "/:94 . ~:53 . V:11 | D 2017.10.05 | T 09:42:07"
  Parent window id: 0x1df (the root window) "/:94 . ~:53 . V:11 | D 2017.10.05 | T 09:42:07"
     0 children.

xwininfo: Window id: 0x9000004 (has no name)

  Root window id: 0x1df (the root window) "/:94 . ~:53 . V:11 | D 2017.10.05 | T 09:42:07"
  Parent window id: 0x1df (the root window) "/:94 . ~:53 . V:11 | D 2017.10.05 | T 09:42:07"
     0 children.

xwininfo: Window id: 0x9000002 "kglobalaccel"

  Root window id: 0x1df (the root window) "/:94 . ~:53 . V:11 | D 2017.10.05 | T 09:42:07"
  Parent window id: 0x1df (the root window) "/:94 . ~:53 . V:11 | D 2017.10.05 | T 09:42:07"
     0 children.

xwininfo: Window id: 0x840000a "kded4"

  Root window id: 0x1df (the root window) "/:94 . ~:53 . V:11 | D 2017.10.05 | T 09:42:07"
  Parent window id: 0x1df (the root window) "/:94 . ~:53 . V:11 | D 2017.10.05 | T 09:42:07"
     0 children.

xwininfo: Window id: 0x8400004 (has no name)

  Root window id: 0x1df (the root window) "/:94 . ~:53 . V:11 | D 2017.10.05 | T 09:42:07"
  Parent window id: 0x1df (the root window) "/:94 . ~:53 . V:11 | D 2017.10.05 | T 09:42:07"
     0 children.

xwininfo: Window id: 0x8400002 "kded4"

  Root window id: 0x1df (the root window) "/:94 . ~:53 . V:11 | D 2017.10.05 | T 09:42:07"
  Parent window id: 0x1df (the root window) "/:94 . ~:53 . V:11 | D 2017.10.05 | T 09:42:07"
     0 children.

xwininfo: Window id: 0x1000002 "gnome-screensaver"

  Root window id: 0x1df (the root window) "/:94 . ~:53 . V:11 | D 2017.10.05 | T 09:42:07"
  Parent window id: 0x1df (the root window) "/:94 . ~:53 . V:11 | D 2017.10.05 | T 09:42:07"
     0 children.

xwininfo: Window id: 0x1000001 "gnome-screensaver"

  Root window id: 0x1df (the root window) "/:94 . ~:53 . V:11 | D 2017.10.05 | T 09:42:07"
  Parent window id: 0x1df (the root window) "/:94 . ~:53 . V:11 | D 2017.10.05 | T 09:42:07"
     0 children.

xwininfo: Window id: 0x800001 (has no name)

  Root window id: 0x1df (the root window) "/:94 . ~:53 . V:11 | D 2017.10.05 | T 09:42:07"
  Parent window id: 0x1df (the root window) "/:94 . ~:53 . V:11 | D 2017.10.05 | T 09:42:07"
     0 children.

他们中很少有人有孩子。其实只有一个:

$ ... | grep child: -A 1 -B 4
xwininfo: Window id: 0xc00006 "Terminal"

  Root window id: 0x1df (the root window) "/:94 . ~:53 . V:11 | D 2017.10.05 | T 10:02:55"
  Parent window id: 0x1df (the root window) "/:94 . ~:53 . V:11 | D 2017.10.05 | T 10:02:55"
     1 child:
     0xc00007 (has no name): ()  1x1+-1+-1  +-3837+25

$ xwininfo -tree -id 0xc00007
xwininfo: Window id: 0xc00007 (has no name)

  Root window id: 0x1df (the root window) "/:94 . ~:53 . V:11 | D 2017.10.05 | T 10:04:07"
  Parent window id: 0xc00006 "Terminal"
     0 children.

这些都没有什么帮助。通过使用xwininfo不带参数并单击周围,我发现0xc00006是 a gnome-terminal -e ranger,我打开了它窗口丢失事件。

此外,其他“没有名称”窗口,即尺寸不是 1x1 的窗口,最有可能是我丢失的窗口,是根窗口的直接子窗口。

我有可能拿回我的窗户吗?

相关内容