Path: utzoo!attcan!uunet!peregrine!elroy!ames!mailrus!tut.cis.ohio-state.edu!bloom-beacon!EXPO.LCS.MIT.EDU!jim From: jim@EXPO.LCS.MIT.EDU (Jim Fulton) Newsgroups: comp.windows.x Subject: re: xlsclients Message-ID: <8903071726.AA03192@expo.lcs.mit.edu> Date: 7 Mar 89 17:26:35 GMT Sender: daemon@bloom-beacon.MIT.EDU Organization: X Consortium, MIT Laboratory for Computer Science Lines: 14 > X11 has programs such as "xlsfonts" and "xlswins". > > How would you write a program that would list the current clients of a > server? In other words, how would you write "xlsclients"? The core protocol provides no information about other connections to the server. However, the ICCCM does encourage clients to put various useful properties on their top level windows. The general idea would be to loop over windows finding the highest ones that have a WM_STATE property attached (the window manager puts this property on them to distinguish client windows from wm windows used for decoration and the like). For these windows you could then print out some combination of the WM_NAME, WM_ICON_NAME, WM_COMMAND, and WM_CLIENT_MACHINE properties.