LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   getting back at xeyes (https://www.linuxquestions.org/questions/linux-newbie-8/getting-back-at-xeyes-624013/)

tbttfox 02-26-2008 01:26 PM

getting back at xeyes
 
A couple times a day, my entire screen is filled with xeyes, and I'm trying to figure out a way to have that backfire on the perpetrator.

I've got a snippet of code that, if xeyes exists, will shut it down and send it back to the person that created it. However, my coworkers have gotten smarter and only leave the eyes up a short time so I can't fire off my command in time.

So my problem is this: Is there a daemon/process/something that I can use to execute my "backfire" command?

I've already tried a bash script:
Code:

#!/bin/bash
while true ; do
  check=`ps aux | grep -c xeyes`
    if [ $check -ge 1 ] ; then
    python ~/backfire.py
  fi
  sleep 1
done

However, this noticeably hits the processor on my sys monitor (which matters at work), and I'm looking for a much more efficient way to do this.

Any suggestions from the hive mind?
Thanks!

aus9 02-28-2008 08:07 AM

until you get a better reply, why not concentrate on stopping people logging in to your computer.

how are they getting in?

ssh?

telnet?

chrism01 02-28-2008 06:16 PM

That was my response too...

tbttfox 02-28-2008 11:18 PM

In xeyes, there's the option to set the display and I honestly don't know how it works/what protocol it uses.
So typing something like "xeyes -display lw465:0" would pop up the eyes on whatever machine on the network was lw465.

Also, this is work, so I (obviously) don't have root access and I need to keep most of my home directory readable.

chrism01 02-29-2008 12:30 AM

iirc, it's the X-win protocol, hence the name...


All times are GMT -5. The time now is 11:35 AM.