Sponsored Content
Top Forums Programming cathcing `mozilla -remote ping()` within c++ Post 76263 by vino on Monday 27th of June 2005 08:07:14 AM
Old 06-27-2005
catching `mozilla -remote ping()` within c++

Here is my problem. An extension and alternative to my initial post https://www.unix.com/shell-programming-and-scripting/18043-browser-variable.html

This is what I have done so far to counter it.

In my application, I have used

Code:
/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,

Code:
/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:
1. Give a
Code:
/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

Last edited by vino; 12-17-2005 at 06:10 AM..
 

10 More Discussions You Might Find Interesting

1. SCO

Openserver 5.0.4 can't be ping or telnet into from a remote site

Hi, Can anybody help me out why l can't not ping my server with Openserver 5.0.4 with my windows machine from a remote site. The machine could see the local LAN with the Router however, i can't ping or telnet unto the server from another site on the WAN. The default gateway was configure on the... (0 Replies)
Discussion started by: kayode
0 Replies

2. Shell Programming and Scripting

issue a ping on a remote box

Hi there I am running a script on a central box (boxA) that will send a remote request to boxB to perform a ping test to an ip note: I am not pinging boxB from boxA but sending a request over ssh to get boxB to perform a ping test ! The thing is, I want the script back at boxA to know... (4 Replies)
Discussion started by: hcclnoodles
4 Replies

3. Solaris

Mozilla 1.7 and java 1.6

Hi community, I've a problem with mozilla 1.7. I'm working on Sun Workstation with Solaris10 and I just installed java 1.6_0 but when I start a GUI from a remote Server I see that the version is still 1.5. the output of " java -version" shows 1.6. Maybe is a problem with a mozilla link... (1 Reply)
Discussion started by: Sunb3
1 Replies

4. Programming

Ping remote UNIX machine from a java application

Hi Friends, Can some one please guide me on how to make a script run on a remote UNIX machine from a java application. Or may if you can just tell me how do u ping to the remote UNIX machine using java code. Been looking for the solution since 5-6 hrs, didn't got any where near :( Thanks. (1 Reply)
Discussion started by: Sanjay MD
1 Replies

5. Shell Programming and Scripting

Animation Ping on Solaris Like Cisco Ping

Hi, I develop simple animation ping script on Solaris Platform. It is like Cisco ping. Examples and source code are below. bash-3.00$ gokcell 152.155.180.8 30 Sending 30 Ping Packets to 152.155.180.8 !!!!!!!!!!!!!.!!!!!!!!!!!!!!!. % 93.33 success... % 6.66 packet loss...... (1 Reply)
Discussion started by: gokcell
1 Replies

6. Shell Programming and Scripting

How to get reason for ping failure using perls Net::Ping->new("icmp");?

Hi I am using perl to ping a list of nodes - with script below : $p = Net::Ping->new("icmp"); if ($p->ping($host,1)){ print "$host is alive.\n"; } else { print "$host is unreacheable.\n"; } $p->close();... (4 Replies)
Discussion started by: tavanagh
4 Replies

7. AIX

Ping to remote host failed

Actually. I was getting a ping to remote host failed for one of my etherchannel. When I checked it was in backup adapter and again I use to faileover and brought to primary channel. But it was again going to backup channel and giving me the alert ping to remotehost failed. When I checked the load... (3 Replies)
Discussion started by: Mohamed Thamim
3 Replies

8. BSD

Ping remote sever, nc, telnet, whatever

I put this thread to shell and bsd, because I want to resolve this matter on bsd. May somebody can explain to me how to ping a remote server, in unix. BTW the following code examples were tried on a linux system as well, with the same output, nothing. But on my bsd are not installed nmap neither... (4 Replies)
Discussion started by: 1in10
4 Replies

9. Shell Programming and Scripting

Ping the service with out port number on remote network

I got the service status through nc on remote network but 2 services doesn't have port number.how to get the other 2 services status with out port number .pls provide the solution to me. I need to develop with is in a script (2 Replies)
Discussion started by: kannansoft1985
2 Replies

10. Programming

Ping test sends mail when ping fails

help with bash script! im am working on this script to make sure my server will stay online, so i made this script.. HOSTS="192.168.138.155" COUNT=4 pingtest(){ for myhost in "$@" do ping -c "$COUNT" "$myhost" &&return 1 done return 0 } if pingtest $HOSTS #100% failed... (4 Replies)
Discussion started by: mort3924
4 Replies
FIREFOX(1)							Linux User's Manual							FIREFOX(1)

NAME
firefox - a Web browser for X11 derived from the Mozilla browser SYNOPSIS
firefox [OPTIONS] [URL] DESCRIPTION
Mozilla Firefox is an open-source web browser, designed for standards compliance, performance and portability. USAGE
firefox is a simple shell script that will set up the environment for the actual executable. OPTIONS
A summary of the options supported by firefox is included below. GTK options --gdk-debug=FLAGS Gdk debugging flags to set --gdk-no-debug=FLAGS Gdk debugging flags to unset --gtk-debug=FLAGS Gtk+ debugging flags to set --gtk-no-debug=FLAGS Gtk+ debugging flags to unset --gtk-module=MODULE Load an additional Gtk module X11 options --display=DISPLAY X display to use --sync Make X calls synchronous --no-xshm Don't use X shared memory extension --xim-preedit=STYLE --xim-status=STYLE --g-fatal-warnings Make all warnings fatal Firefox options -h, -help Show summary of options. -height value Set height of startup window to value. -width value Set width of startup window to value. -v, -version Print /usr/bin/firefox-bin version. -CreateProfile profile Create profile. -P profile Start with profile. -ProfileManager Start with profile manager. -UILocale lang-region Start with lang-region resources. -contentLocale lang-region Start with lang-region resources. -remote command Execute command in an already running Firefox process. For more info, see: http://www.mozilla.org/unix/remote.html -no-remote Don't try to control an already running instance. -jsconsole Start with Javascript Console -chrome url Load the specified chrome. -new-window url Open URL in a new window if Firefox is already running. -new-tab url Open URL in a new tab if Firefox is already running. -preferences Open Firefox preferences menu. -safe-mode Disables extensions and themes for this session. FILES /usr/bin/firefox - shell script wrapping firefox /usr/lib/firefox/firefox - firefox executable VERSION
3.0 BUGS
To report a bug, please visit http://bugzilla.mozilla.org/ SEE ALSO
mozilla(1) AUTHORS
The Mozilla Organization http://www.mozilla.org/about.html firefox January 04, 2006 FIREFOX(1)
All times are GMT -4. The time now is 06:56 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy