Okay nearly there.. I was able to get the pid of some windows (namely, xterm), but when I tried it on chrome or nedit, getproperty returns with nitems == 0. Is there a reason why, and would there be workarounds for this? I just need a way to identify a window as "xterm", or "nedit" or "chrome".<div>
<br></div><div>My nedit windows, right now, don't have "nedit" as title. Then again I guess I could make it so it does, but that seems like a "hacky" solution..<br><br><div class="gmail_quote">On Sun, Mar 7, 2010 at 12:26 AM, Terry Barnaby <span dir="ltr"><<a href="mailto:terry1@beam.ltd.uk">terry1@beam.ltd.uk</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">It would be worthwhile looking at the XRecord extension.<br>
<a href="http://www.xfree86.org/current/recordlib.pdf" target="_blank">http://www.xfree86.org/current/recordlib.pdf</a><br>
<br>
This is designed to record all XEvents as well as XRequests. It will<br>
probably do most of what you required. We used it for a Blind/Visually<br>
impaired XTerminal some time back.<br>
<br>
Terry<div class="im"><br>
<br>
On 06/03/10 11:30, Yose Widjaja wrote:<br>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">
Also, while I'm at it.. is there an easy way to print keysyms? I mean,<br>
looking at keysymdef.h there seems to be 2300 of them. Is there an X<br>
function to return the string of the name, or should I just go ahead and<br>
convert all those #defines into a switch statement?<br>
<br>
On Sat, Mar 6, 2010 at 10:19 PM, Yose Widjaja <<a href="mailto:ywid062@gmail.com" target="_blank">ywid062@gmail.com</a><br></div><div class="im">
<mailto:<a href="mailto:ywid062@gmail.com" target="_blank">ywid062@gmail.com</a>>> wrote:<br>
<br>
Ah, thanks. Will be taking a look at that.<br>
<br>
As for intercepting keyboards, I've hacked up something that uses<br>
XQueryKeymap, and it seems to be working pretty well. Now only for<br>
mouse movement detection (for idling check)<br>
<br>
Cheers<br>
<br>
p.s is making a keylogger meant to be this easy?<br>
<br>
<br>
On Sat, Mar 6, 2010 at 10:11 PM, Tomasz Torcz <<a href="mailto:tomek@pipebreaker.pl" target="_blank">tomek@pipebreaker.pl</a><br></div><div class="im">
<mailto:<a href="mailto:tomek@pipebreaker.pl" target="_blank">tomek@pipebreaker.pl</a>>> wrote:<br>
<br>
On Sat, Mar 06, 2010 at 06:22:29PM +1100, Yose Widjaja wrote:<br>
> Hi All,<br>
><br>
> Is this possible using Xlib? I'm trying to implement<br>
something like<br>
> RescueTime, an app to measure productivity, but for linux.<br>
The main purpose<br>
> of this is to measure how much time (and keypresses and<br>
clicks) I spend in<br>
> xterm and nedit compared to firefox..<br>
><br>
> So is it possible to 1) get the actual binary name behind a<br>
window, 2)<br>
> intercept keypresses/mouse movements and re-relay them? Any<br>
info will be<br>
> much appreciated.<br>
<br>
You could try to find som esource of Mugshot application by<br>
Red Hat.<br>
It was collecting information like that and making statistics of<br>
most<br>
used applications. IIRC, it was using libwnck to do the X11 part.<br>
<br>
--<br>
Tomasz Torcz "God, root, what's the difference?"<br></div>
xmpp: <a href="mailto:zdzichubg@chrome.pl" target="_blank">zdzichubg@chrome.pl</a> <mailto:<a href="mailto:zdzichubg@chrome.pl" target="_blank">zdzichubg@chrome.pl</a>> "God is<div class="im"><br>
more forgiving."<br>
<br>
_______________________________________________<br>
xorg mailing list<br></div>
<a href="mailto:xorg@lists.freedesktop.org" target="_blank">xorg@lists.freedesktop.org</a> <mailto:<a href="mailto:xorg@lists.freedesktop.org" target="_blank">xorg@lists.freedesktop.org</a>><div class="im">
<br>
<a href="http://lists.freedesktop.org/mailman/listinfo/xorg" target="_blank">http://lists.freedesktop.org/mailman/listinfo/xorg</a><br>
<br>
<br>
<br>
<br>
--<br>
-- -- -- -- -- -- -- -- -- -- -- -- -- --<br>
Yose Widjaja<br>
Supreme Emperor @ Jormy Games<br></div>
<a href="http://www.jormy.com" target="_blank">www.jormy.com</a> <<a href="http://www.jormy.com" target="_blank">http://www.jormy.com</a>><br>
<a href="mailto:yose@jormy.com" target="_blank">yose@jormy.com</a> <mailto:<a href="mailto:yose@jormy.com" target="_blank">yose@jormy.com</a>><div class="im"><br>
-- -- -- -- -- -- -- -- -- -- -- -- -- --<br>
<br>
<br>
<br>
<br>
--<br>
-- -- -- -- -- -- -- -- -- -- -- -- -- --<br>
Yose Widjaja<br>
Supreme Emperor @ Jormy Games<br>
</div><a href="http://www.jormy.com" target="_blank">www.jormy.com</a> <<a href="http://www.jormy.com" target="_blank">http://www.jormy.com</a>><br>
<a href="mailto:yose@jormy.com" target="_blank">yose@jormy.com</a> <mailto:<a href="mailto:yose@jormy.com" target="_blank">yose@jormy.com</a>><br>
-- -- -- -- -- -- -- -- -- -- -- -- -- --<div class="im"><br>
<br>
<br>
<br>
_______________________________________________<br>
xorg mailing list<br>
<a href="mailto:xorg@lists.freedesktop.org" target="_blank">xorg@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/xorg" target="_blank">http://lists.freedesktop.org/mailman/listinfo/xorg</a><br>
</div></blockquote>
<br>
</blockquote></div><br><br clear="all"><br>-- <br>-- -- -- -- -- -- -- -- -- -- -- -- -- --<br>Yose Widjaja<br>Supreme Emperor @ Jormy Games<br><a href="http://www.jormy.com">www.jormy.com</a><br><a href="mailto:yose@jormy.com">yose@jormy.com</a><br>
-- -- -- -- -- -- -- -- -- -- -- -- -- --<br>
</div>