X and Fluxbox :: disable right click



yeah that was kinda what I was thinking.  Will this script use much cpu in running?
The only way to know for sure is to try it out.  My guess is that CPU usage will be minimal.  RAM usage on an older computer (say 16-32MB RAM systems) could be an issue because each bash session is over 1MB of RAM.  But for a 64MB RAM or higher computer I would guess that it would be just fine.
For a windowmanager, I'd suggest either Ratpoison or Ion. I don't think ratpoison uses the mouse at all (I could be wrong), and ion doesn't rely on it heavily, which is good because you've mostly got the right-click menu gone right there.  Both are heavily customizable and both have minimum window decorations.  And I believe both use fewer resources than fluxbox (don't hold me to that).  

Quote
I was looking for something along the lines of a background app that can check if x is running, if it isn't it will run startx.  Would that work?  And whats the best way to do this...


Perl to the rescue...

Code Sample
#!/usr/bin/perl
$x=0;
while ($x<1 ) {
@xrunnin=`ps aux`;
@xrunnin=grep(/startx/,@xrunnin);
$a=@xrunnin;
if ($a <2) {
system (" startx&");
}
sleep 3;
}


Save this out as, I dunno, checktoseeifXisrunning.pl.  It really needs to execute before X starts.  If it starts as a child process of the X session, then whenever X dies so will the script.  

You will need to modify some existing scripts to get this to run before X and, right off the top of my head, I can't think of what they might be.  Maybe if you ask John or Roberts nicely and promise 'em a pony, they can point you in the right direction.

Anyways, this script is set up to check to see if X is running every 3 seconds.  If you want to wait longer change the 3 after sleep to however many seconds you want.

It doesn't impact system resources (not that I could discern at any rate) and could be incorporated into your startup scripts.

It's a really ugly hack but I'm sure now that I've shown a little effort, the Perl guru's will come out of the woodwork to make me look bad.  (Where have they been all this time?)

I haven't had a chance to try anything yet... we may be scrapping the initial configuration.  At least I think we should... since the hardware is complete crap.  But then of course thinking is expressly forbidden in my job description.

original here.