Como recuperar janelas X perdidas

0

De alguma forma, eu consegui travar meu gerenciador de janelas, dwm . Ao reiniciar o dwm (dentro da mesma sessão X), mais da metade das 90+ janelas que eu tinha aberto desapareceram. lsw reflete o que o dwm está mostrando (ou seja, metade das 90+ janelas estão ausentes), portanto, o dwm não está ocultando nada. No entanto, os processos que gerenciam essas janelas ainda existem, de acordo com ps . ps mostra zero processos interrompidos e as janelas ausentes não estão mostrando um status de zumbi (eles estão mostrando S e S +).

Existe alguma maneira de "reconectar" esses processos ao servidor X para que eu possa recuperar minhas janelas? Normalmente, é aqui que eu mostro o que tentei, mas não faço ideia de como isso seria feito, e o Google não apresenta nada além de janelas saindo do OS X.

Para reiterar, o que eu quero fazer é pegar os processos da GUI ainda em execução e recuperá-los no servidor X (exibir :1 ) para que eu possa salvar meu trabalho. Isso é possível?

Atualização 1

Aqui está a saída de lsw , xlsclients e 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

O número de janelas "não tem nome" parece ser aproximadamente equivalente ao número de janelas que eu perdi, por isso tenho certeza de que são elas. Agora: como recolocá-los no servidor. Essa é a verdadeira questão.

Atualização 2

Aqui está a saída de xwininfo para cada filho do 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.

Poucos deles têm filhos. De fato, apenas um:

$ ... | 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.

Nada disso é útil. Usando xwininfo sem argumentos e clicando por aí, descobri que 0xc00006 é gnome-terminal -e ranger , que abri após o evento de perda de janela.

Além disso, as outras janelas "não tem nome", aquelas com dimensões diferentes de 1x1, aquelas que provavelmente são minhas janelas perdidas, são filhos diretos da janela raiz.

Existe alguma possibilidade de eu ter minhas janelas de volta?

    
por Braden Best 04.10.2017 / 12:26

0 respostas