Grim
Group: Members
Posts: 284
Joined: Mar. 2004 |
|
Posted: April 13 2004,07:29 |
|
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?)
-------------- No good deed goes unpunished...
|