How do I gracefully exit an X11 event loop?

The problem lays in the communication between X Server and the Window Manager. When you call XCreateWindow or XCreateSimpleWindow, the X Server creates your window (not showing it until you explicitly map it on the screen by calling XMapWindow), and then the Window Manager is responsible for attaching all the decorations and buttons and system … Read more

Is there a linux command to determine the window IDs associated with a given process ID?

xwininfo and xprop permits to retrieve what you want, but it is a little tricky. xwininfo permits to retrieve all known windows, and xprop to query X about a single window ID for your _NET_WM_PID parameter. So far, a hacky way to do it would be: #!/bin/sh findpid=$1 known_windows=$(xwininfo -root -children|sed -e ‘s/^ *//’|grep -E … Read more

Mountain Lion rvm install 1.8.7 x11 error

Try to install X11 via http://xquartz.macosforge.org/landing/ set the correct path to the X11 library for the compiler with: export CPPFLAGS=-I/opt/X11/include then try to reinstall ruby, passing to the compiler where gcc-4.2 is: CC=/usr/local/bin/gcc-4.2 rvm reinstall 1.8.7 Without CC I got a lot of segmentation faults.

How to get an X11 Window from a Process ID?

The only way I know to do this is to traverse the tree of windows until you find what you’re looking for. Traversing isn’t hard (just see what xwininfo -root -tree does by looking at xwininfo.c if you need an example). But how do you identify the window you are looking for? Some applications set … Read more