On Wed, May 26, 2004 at 02:24:19PM +0200, stu wrote: > Hi everyone > > I have an app - multi-gnome-terminal - that can be started up in two > modes - 'factory' or 'client'. I want the first instance started of this > app to always be the 'factory', and all other instances to be the > 'clients' ( doing it this way reduces memory usage ). > > Unfortunately, this app is not intuitive enough to start a 'factory' if > one doesn't exist, and to connect to one if it does, with the same > command. Therefore I need to write a function to invoke this app that > checks if the 'factory' is running, and invokes it if it is not, and > invokes the 'client' if the factory is running ie > > if (an instance of multi-gnome-terminal is running) > # Start client > Exec exec multi-gnome-terminal --use-factory > else > # Start factory > Exec exec multi-gnome-terminal --start-factory-server > fi
Have you considered using a wrapper script? This is what I do with Mozilla. If there is no Mozilla process running, my wrapper launches Mozilla; if Mozilla is already running, then the wrapper sends a command to the running Mozilla process using the -remote interface to perform the requested action. -- .********* Fight Back! It may not be just YOUR life at risk. *********. : phil stracchino : unix ronin : renaissance man : mystic zen biker geek : : [EMAIL PROTECTED]|[EMAIL PROTECTED]|[EMAIL PROTECTED] : : 2000 CBR929RR, 1991 VFR750F3 (foully murdered), 1986 VF500F (sold) : : Linux Now! ...Because friends don't let friends use Microsoft. : -- Visit the official FVWM web page at <URL: http://www.fvwm.org/>. To unsubscribe from the list, send "unsubscribe fvwm" in the body of a message to [EMAIL PROTECTED] To report problems, send mail to [EMAIL PROTECTED]
