Here is my problem. An extension and alternative to my initial post $BROWSER variable
This is what I have done so far to counter it.
In my application, I have used
/usr/bin/mozilla -remote "openURL(URL)"
The -remote makes sure that I go and open the URL in an existing instance of mozilla.
This is what is happening inside. I start the server. Login with a user. Sync the data on the client. After that the server restarts itself and gives a login page to the user who just did the sync.
If I am user U1 and have the server running in the context of U1, then the above will work.
But if I am user U2 on the same machine, using the server running on U1, then while doing an execv on the above shows me the following at the prompt of U1.
No running window found.
This message is shown when mozilla doesnt find a running instance of the /usr/bin/mozilla.
Now, there is another option,
/usr/bin/mozilla -remote "ping()"
which will tell me if there is an instance of mozilla running or not. My problem is how can I capture the result of the above ping command inside my application.(if it possible).
Possible work-arounds that you may come up is:
- Give a
/usr/bin/mozilla "openURL(URL)"
. I know that and do not want to use that.
2. Use /usr/bin/mozilla -remote "ping()" in a shell script. I need to run the whole thing within the context of the application. No using external scripts.
uname -a is
Linux xxxxxxx 2.4.21-27.ELsmp #1 SMP Wed Dec 1 21:59:02 EST 2004 i686 i686 i386 GNU/Linux
I will try to give you as much details(if needed), but I cant give out the code. Company policy.
Thanks,
vino