Parece que não há PID para a janela. Como você mata essa janela sem PID?

5

Estou tentando obter o PID de uma janela "A: Fluid Flow (Fluent) - Meshing" no lado direito desta imagem . Os comandos que encontrei estão abaixo. Eles não funcionam depois de eu ter clicado na janela. Eu quero matar a janela do lado direito que vem da janela do lado esquerdo "Test02 - bancada" sem matar as duas janelas. A janela do lado direito é obtida clicando duas vezes em Malha, localizada entre Geometria e Configuração da janela do lado direito. No entanto, posso obter o PID da janela do lado esquerdo.

$ xprop _NET_WM_PID _NET_WM_PID: not found. $ xprop _NET_WM_PID | cut -d' ' -f3 not $ xprop _NET_WM_ICON_GEOMETRY(CARDINAL) = 5, 694, 54, 54 _NET_FRAME_EXTENTS(CARDINAL) = 0, 0, 28, 0 WM_STATE(WM_STATE): window state: Normal icon window: 0x0 _NET_WM_DESKTOP(CARDINAL) = 0 _NET_WM_STATE(ATOM) = _NET_WM_STATE_MAXIMIZED_VERT WM_CLASS(STRING) = "Ansyswbu.exe", "MainWin" WM_NORMAL_HINTS(WM_SIZE_HINTS): specified location: 706, 52 program specified location: 706, 52 user specified size: 660 by 716 program specified size: 660 by 716 program specified minimum size: 2 by 2 program specified maximum size: 1356 by 734 WM_PROTOCOLS(ATOM): protocols WM_DELETE_WINDOW, WM_TAKE_FOCUS, WM_STATE, WM_CLASS, _MOTIF_WM_MESSAGES WM_HINTS(WM_HINTS): Client accepts input or input focus: True Initial state is Normal State. bitmap id # to use for icon: 0x4600122 bitmap id # of mask for icon: 0x4600120 _NET_WM_ALLOWED_ACTIONS(ATOM) = _NET_WM_ACTION_MOVE, _NET_WM_ACTION_RESIZE, _NET_WM_ACTION_STICK, _NET_WM_ACTION_MINIMIZE, _NET_WM_ACTION_MAXIMIZE_HORZ, _NET_WM_ACTION_MAXIMIZE_VERT, _NET_WM_ACTION_FULLSCREEN, _NET_WM_ACTION_CLOSE, _NET_WM_ACTION_SHADE, _NET_WM_ACTION_CHANGE_DESKTOP, _NET_WM_ACTION_ABOVE, _NET_WM_ACTION_BELOW WM_ICON_NAME(STRING) = "A : Fluid Flow (Fluent) - Meshing [ANSYS Academic Research]" WM_NAME(STRING) = "A : Fluid Flow (Fluent) - Meshing [ANSYS Academic Research]" _MW_WINDOW_HANDLE_0027d74c_v2(STRING) = "$ xprop _NET_WM_PID _NET_WM_PID: not found. $ xprop _NET_WM_PID | cut -d' ' -f3 not $ xprop _NET_WM_ICON_GEOMETRY(CARDINAL) = 5, 694, 54, 54 _NET_FRAME_EXTENTS(CARDINAL) = 0, 0, 28, 0 WM_STATE(WM_STATE): window state: Normal icon window: 0x0 _NET_WM_DESKTOP(CARDINAL) = 0 _NET_WM_STATE(ATOM) = _NET_WM_STATE_MAXIMIZED_VERT WM_CLASS(STRING) = "Ansyswbu.exe", "MainWin" WM_NORMAL_HINTS(WM_SIZE_HINTS): specified location: 706, 52 program specified location: 706, 52 user specified size: 660 by 716 program specified size: 660 by 716 program specified minimum size: 2 by 2 program specified maximum size: 1356 by 734 WM_PROTOCOLS(ATOM): protocols WM_DELETE_WINDOW, WM_TAKE_FOCUS, WM_STATE, WM_CLASS, _MOTIF_WM_MESSAGES WM_HINTS(WM_HINTS): Client accepts input or input focus: True Initial state is Normal State. bitmap id # to use for icon: 0x4600122 bitmap id # of mask for icon: 0x4600120 _NET_WM_ALLOWED_ACTIONS(ATOM) = _NET_WM_ACTION_MOVE, _NET_WM_ACTION_RESIZE, _NET_WM_ACTION_STICK, _NET_WM_ACTION_MINIMIZE, _NET_WM_ACTION_MAXIMIZE_HORZ, _NET_WM_ACTION_MAXIMIZE_VERT, _NET_WM_ACTION_FULLSCREEN, _NET_WM_ACTION_CLOSE, _NET_WM_ACTION_SHADE, _NET_WM_ACTION_CHANGE_DESKTOP, _NET_WM_ACTION_ABOVE, _NET_WM_ACTION_BELOW WM_ICON_NAME(STRING) = "A : Fluid Flow (Fluent) - Meshing [ANSYS Academic Research]" WM_NAME(STRING) = "A : Fluid Flow (Fluent) - Meshing [ANSYS Academic Research]" _MW_WINDOW_HANDLE_0027d74c_v2(STRING) = "%pre%2", "%pre%33" $ wmctrl -mlpx ... 0x0380000f 0 5159 . mymachine Test02 - Workbench 0x046000a4 0 0 Ansyswbu.exe.MainWin N/A A : Fluid Flow (Fluent) - Meshing [ANSYS Academic Research] ... 2", "%pre%33" $ wmctrl -mlpx ... 0x0380000f 0 5159 . mymachine Test02 - Workbench 0x046000a4 0 0 Ansyswbu.exe.MainWin N/A A : Fluid Flow (Fluent) - Meshing [ANSYS Academic Research] ...

Com o último comando wmctrl -mlpx, parece que o PID é 5159 para a janela do lado esquerdo e 0 para a janela do lado direito. Como poderia ser 0?

Obrigado.

    
por MisterX 13.03.2017 / 00:20

2 respostas

4

Funciona com o wmctrl e o id da janela.

Primeiro, instale o wmctrl se você não tiver:

sudo apt-get install wmctrl

Em segundo lugar, encontre o id da janela com:

$ wmctrl -mlpx
...
0x046000a4  0 0      Ansyswbu.exe.MainWin    N/A    A : Fluid Flow (Fluent) - Meshing [ANSYS Academic Research]
...

Por fim, mate a besta com um PID nulo wmctrl :

wmctrl -ic 0x046000a4
    
por MisterX 13.03.2017 / 03:16
1

O comando que você quer é:

xprop | grep _NET_WM_PID
    
por waltinator 13.03.2017 / 00:24