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: 2017/05/01 08:11 by yehuda
Back to top
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0