HowTo:Get window pid by mouse click (Gnome)

#!/bin/sh
 
WINID=`xwininfo | sed -n 's/.*Window\ id:\ \(0x[0-9A-Fa-f]*\).*/\1/p'`
echo "Found winid: ${WINID}"
WINPID=`xprop -id ${WINID} _NET_WM_PID | sed -n 's/.*_NET_WM_PID.*=\s\([0-9]*\).*/\1/p'`
echo "Found window pid: ${WINPID}"
ps -aux | grep $WINPID
howto/get_window_pid_by_mouse_click_gnome.txt · Last modified: 2022/01/03 16:03 by 127.0.0.1
Back to top
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0