On Mon, Dec 19, 2005, Omer Zak wrote about "Re: Generating events in X":
> Using apropos -r XWindow\.\*event
> I found:  XSendEvent and XPutBackEvent

Yes, XSendEvent is the most standard way to send "fake" events to other
applications.

But it does have one significant problem you must be aware of: the XEvent
data structure has a "send_event" field, which is set to 1 if this event
was sent by another client using XSendEvent, and is not a "real" event from
the server. Historically, some applications considered accepting such events
a security risk, and ignored such events. XTerm is one of these "paranoid"
applications: it has a "allowSendEvents" option (see xterm(1)), which defaults
to false.

The XTEST extension (that many other people mentioned) for the X server is a
much later invention, but nowadays it is present in most X servers (run
dpyinfo to see if yours supports it).
Check out
        http://www.xfree86.org/current/xtestlib.pdf on how to use it.
        http://ftp.xfree86.org/pub/XFree86/4.5.0/doc/xtest.txt

I don't have enough experience with XTEST to tell whether the synthetic
events it generates have the send_event bit test. If they do, then just
using XSendEvent is easier. If they don't, then xterm's paranoia and its
not accepting XSendEvent events, is unjustified, given that the eV1l cracker
can use XTEST instead...


-- 
Nadav Har'El                        |      Monday, Dec 19 2005, 19 Kislev 5766
[EMAIL PROTECTED]             |-----------------------------------------
Phone +972-523-790466, ICQ 13349191 |This signature was intentionally left
http://nadav.harel.org.il           |boring.

=================================================================
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]

Reply via email to