Tracking syslog events in X11

Tracking syslog events in X11

Post by David MILL » Wed, 06 Jul 1994 17:07:16



Hi,

I'm looking for a public domain package which can be interfaced with syslogd
so that when certain events occur an X window can be displayed with the
message on defined users terminals. It can't rely on some syslogd's ability to
pipe to a filter. (If I had a version that did that the problem would be
almost trivial).

Has anyone done this already? If so let me know where the code lives,
preferably an Australian ftp site.

Also an event driven performance monitor would be nice. Yes I know that
commercial packages exist.

Thanks

--
David Miller, Unix System Administrator
Easams Australia        
Direct +61-2-367 4572   Fax +61-2-367 4566
Unit 5, 2 Giffnock Ave, North Ryde, NSW 2113

 
 
 

1. Tracking Events On Another Window

I was on about this befor and I tried the suggestion that I got back and
some of it was good but SelectInput() causes errors when it is applied
to
the root window.  The root window seems to think that you are trying to
change its assributes so your program crashes.  The following was
something I came up with and for some reason it doesn't work the program
can process its own events but it gets nothing from the root window.  I
have not tried the function with any other window and I know that the
root
window is listening to ButtonPress events.

root_win = RootWindow(display, root_screen); /* Sets a window structure
equal to root window.  There is nothing wrong with this statement
because
I have used it in a QueryTre() function successfully */

/* there is a continuous loop here */
/* after the program has processed its own events it does the following
*/

 if(!XCheckWindowEvent(display, root_win,
ButtonPressMask|PointerMotionMask, &report2))

      {/* nothing to do because there are no events */}
/* XCheckWindowEvent() is used because it checks the event que and
if it doesn't find anything it returns False and doesn't balck allowing
the program to do what it has to do with out waiting for events. */

      else

      {

        printf("\n Something happended ont the root window \n");

        switch (report2.type)

        {
           case ButtonPress:

              printf("\nButton Press on root window \n");

           break;

           case MotionNotify:

               XQueryPointer (display, win, &rep_root, &rep_child,

                        &rep_rootx, &rep_rooty, &dx, &dy, &rep_mask);

                printf("\nThe pointer was queried %d, %d\n",dx, dy);

            break;

            default:

            break;

       } /* End of case for report2  */

    } /* Enf of if */

  } /* End of While loop that processes all the events */

If anyone can help I would be very grateful.

--
Name: Kieran O/ Sullivan
Project: BlindPenguin - access to X for users with sight problems.
Web: http://snet.wit.ie/BlindPenguin
http://snet.wit.ie/kieran

Sent via Deja.com http://www.deja.com/
Before you buy.

2. SUMMARY: Addtron Ethernet Cards

3. file event tracking

4. NFS mounted swapfile

5. How to track if an event's happened.

6. Forbidden errors for ServerRoot

7. Complete reference of all unix syslog events

8. chroot - Why segmentation fault ?

9. Tuning syslog/Syslog reporting/Syslog enhancement/replacements

10. I need SYSLOG to accept events from remote hosts..

11. openview/syslog events showing up extremely late

12. Q:solaris exec on syslog-event

13. creating different syslog file /var/log/syslog.0 /var/log/syslog.1...