Batch file

Bill Stanley bstanle at wowway.com
Wed Jun 29 16:05:31 UTC 2011


A friend of mine has a bad habit of opening too many instances of the firefox 
browser.   I've told her that it is unnecessary to create a new instance when it 
is easier and faster to just create a new tab.  She tries to open a tab instead 
and likes it.  The problem is that it is an ingrained habit with her and she 
reverts back to opening a new instance instead of opening a new tab.  As a 
result, she often runs short on memory and the computer slows down when forced 
to use swap memory.  (Her computer is a mid-aged laptop with the RAM maxed out 
to 2 GBytes.)

That is the background.  A possible solution is to replace the launcher for 
Firefox with a batch file (or script) which will launch Firefox after checking 
if the Firefox program is running.  I envision a batch file (or script) that 
would run ps to check if it firefox is a running process.  If it is a running 
process, the batch file would ask if she really wants another instance of 
firefox.  It seems like an easy thing to do.  (I often created old DOS batch 
files and these should be very similar to Linux batch files (or scripts).  Any 
ideas about better ways of doing this or suggestions on how to implement this?




More information about the ubuntu-users mailing list