Windows managers add some properties to windows and one of them is '_NET_WM_PID(CARDINAL)' which stores what PID created that window. In order to get that PID, we just have to execute the command below and click on the window we want to read info from :]
Seguro que más de una vez os habréis peleado con xorg.conf de vuestro ordenador para poder ver la película de turno en la tele de x-pulgadas del salón.
Pues bien, dejo por aquí mi pequeña aportación al cine doméstico, con la configuración que solucionó mis problemas ;)
#Añadimos lo siguiente a nuestro xorg.conf
Section "Device"## Dispositivo para pantalla del portátil + salida TV (Config de la TV)
Identifier "TV"
Driver"intel"
Option "MonitorLayout""TV,LFP"
Option "TVStandard""PAL"##Modo España PAL-B
Screen 1## La pantalla 1 será la TV
BusId "PCI:0:2:0"
EndSection
#En teoría debería ser suficiente pero en mi caso le costó#entender que quería "PAL", así que #tuve que tirar de xrand
agonzalez@isis:~$ xrandr --output TV--set TV_FORMAT PAL; xrandr --output TV--mode 1024x768