[SLUG] "Right" way to kill firefox from a script?

2008-07-31 Thread Amos Shapira
Hello,

Platforms: Linux, OS X, Windows
Firefox: 2 and 3

We have a test script which runx Firefox to visit a web site and after
a few seconds it stops it.

Right now we use "killall firefox" but this causes it to behave as if
it crashed the next time it comes up.

I found in http://tinyurl.com/5qk9so mentioning of "-kill" and
"-killAll" but without explanation of how to use it, and a simple
attempt to use it didn't cause the browser to quit so I'm not even
sure it does what I guess it does.

What's the "right way" to cause firefox to exit properly?

Otherwise - can I change something in Firefox's configuration to cause
it to ignore crashes?

Alternatively - what files on the disk should I change/remove to
"clean up" a crashed session?

Thanks,

--Amos
-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html


[SLUG] Re: Kill Firefox

2008-07-31 Thread bill

Isnt it ps ( in a terminal) to get the PID for Firefox, then kill "PID"?

Bill

Still a newbie


[EMAIL PROTECTED] wrote:

Send slug mailing list submissions to
slug@slug.org.au

To subscribe or unsubscribe via the World Wide Web, visit
http://lists.slug.org.au/listinfo/slug
or, via email, send a message with subject or body 'help' to
[EMAIL PROTECTED]

You can reach the person managing the list at
[EMAIL PROTECTED]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of slug digest..."
  



Today's Topics:

   1. "Right" way to kill firefox from a script? (Amos Shapira)
  




Subject:
[SLUG] "Right" way to kill firefox from a script?
From:
"Amos Shapira" <[EMAIL PROTECTED]>
Date:
Fri, 1 Aug 2008 09:26:19 +1000
To:
SLUG 

To:
SLUG 


Hello,

Platforms: Linux, OS X, Windows
Firefox: 2 and 3

We have a test script which runx Firefox to visit a web site and after
a few seconds it stops it.

Right now we use "killall firefox" but this causes it to behave as if
it crashed the next time it comes up.

I found in http://tinyurl.com/5qk9so mentioning of "-kill" and
"-killAll" but without explanation of how to use it, and a simple
attempt to use it didn't cause the browser to quit so I'm not even
sure it does what I guess it does.

What's the "right way" to cause firefox to exit properly?

Otherwise - can I change something in Firefox's configuration to cause
it to ignore crashes?

Alternatively - what files on the disk should I change/remove to
"clean up" a crashed session?

Thanks,

--Amos

  



--
SLUG - Sydney Linux User Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html


--
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html


Re: [SLUG] Re: Kill Firefox

2008-07-31 Thread Rick Welykochy

bill wrote:


Isnt it ps ( in a terminal) to get the PID for Firefox, then kill "PID"?

Bill

Still a newbie


killall -SIGNAL processname
kill -SIGNAL pid

work the same.

I have tried sending various signals to firefox

-TERM   firefox exits "unexpectedly"; restarts with an error warning
-HUPsame as -TERM
-INTsame as -TERM
-USR1   same as -TERM
etc.

-QUIT   firefox crashes and burns

It would be nice if there were a command-line arg that disables
the annoying warning on startup after a crash.

cheers
rickw


--

Rick Welykochy || Praxis Services || Internet Driving Instructor

When the power of love overcomes the love of power,
the world will know peace.
 -- Jimi Hendrix
--
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html


Re: [SLUG] Re: Kill Firefox

2008-07-31 Thread Henare Degan
> It would be nice if there were a command-line arg that disables
> the annoying warning on startup after a crash.

This[1] seems to be what you want:

1. Go to about:config
2. Set browser.sessionstore.resume_from_crash to false

Although killing the poor fox seems like an harsh way to do it, so
there's probably a better way to do this.

Cheers,

Henare

[1] http://kb.mozillazine.org/Browser.sessionstore.resume_from_crash
-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html


Re: [SLUG] Re: Kill Firefox

2008-07-31 Thread Peter Chubb
> "Henare" == Henare Degan <[EMAIL PROTECTED]> writes:

>> It would be nice if there were a command-line arg that disables the
>> annoying warning on startup after a crash.

Henare> This[1] seems to be what you want:

Henare> 1. Go to about:config 2. Set
Henare> browser.sessionstore.resume_from_crash to false

Once upon a time you could do
  mozilla -remote "xfeDoCommand(exit)"
but this seems disabled now.

Peter C
-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html


Re: [SLUG] "Right" way to kill firefox from a script?

2008-07-31 Thread Martin Barry
$quoted_author = "Amos Shapira" ;
> 
> We have a test script which runx Firefox to visit a web site and after
> a few seconds it stops it.

My first thought was "Why use a GUI app to test something automated?"...

Surely there are more elegant ways to achieve what you need...

cheers
Marty
-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html


Re: [SLUG] "Right" way to kill firefox from a script?

2008-07-31 Thread Amos Shapira
2008/8/1 Martin Barry <[EMAIL PROTECTED]>:
> $quoted_author = "Amos Shapira" ;
>>
>> We have a test script which runx Firefox to visit a web site and after
>> a few seconds it stops it.
>
> My first thought was "Why use a GUI app to test something automated?"...

Because it has to run all sorts of JavaScript, Flash, pull images etc.
and generally do what a browser does as part of the test.
We need a real browser (multiple browsers types and versions from
multiple platforms, actually) to access that web page, "wget" and
friends won't cut it.

> Surely there are more elegant ways to achieve what you need...

I'd be glad to hear about it.

Thanks,

--Amos
-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html


Re: [SLUG] Re: Kill Firefox

2008-07-31 Thread Amos Shapira
2008/8/1 Henare Degan <[EMAIL PROTECTED]>:
>> It would be nice if there were a command-line arg that disables
>> the annoying warning on startup after a crash.
>
> This[1] seems to be what you want:
>
> 1. Go to about:config
> 2. Set browser.sessionstore.resume_from_crash to false

Thanks. I imagined there must be something like this.

>
> Although killing the poor fox seems like an harsh way to do it, so
> there's probably a better way to do this.

I'm still looking.

Cheers,

--Amos
-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html


Re: [SLUG] "Right" way to kill firefox from a script?

2008-07-31 Thread Martin Barry
$quoted_author = "Amos Shapira" ;
> 
> Because it has to run all sorts of JavaScript, Flash, pull images etc.
> and generally do what a browser does as part of the test.
> We need a real browser (multiple browsers types and versions from
> multiple platforms, actually) to access that web page, "wget" and
> friends won't cut it.

Have you explored tools like Selenium?

"Selenium is a suite of tools to automate web app testing across many
 platforms. Selenium...
 * runs in many browsers and operating systems
 * can be controlled by many programming languages and testing frameworks."

http://selenium.openqa.org/

cheers
Marty
-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html


Re: [SLUG] Re: Kill Firefox

2008-07-31 Thread Amos Shapira
2008/8/1 Peter Chubb <[EMAIL PROTECTED]>:
> Once upon a time you could do
>  mozilla -remote "xfeDoCommand(exit)"
> but this seems disabled now.

Thanks. It gives me a direction to keep digging.

Cheers,

--Amos
-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html


Re: [SLUG] Re: Kill Firefox

2008-07-31 Thread Scott Ragen
[EMAIL PROTECTED] wrote on 01/08/2008 02:32:53 PM:

> 2008/8/1 Peter Chubb <[EMAIL PROTECTED]>:
> > Once upon a time you could do
> >  mozilla -remote "xfeDoCommand(exit)"
> > but this seems disabled now.
> 
> Thanks. It gives me a direction to keep digging.

Hi Amos,

wmctrl -c 'window name'
You need to make sure firefoxs has no prompts to save the pages, or close 
all tabs etc upon closing.

Cheers,

Scott

-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html


Re: [SLUG] Missing Dependency

2008-07-31 Thread Matthew Hannigan
On Wed, Jul 30, 2008 at 03:44:27PM +1000, Daryl Thompson wrote:
> [ .. ]
> gstreamer-plugins-bad-0.10.7-2.fc9.i386 from installed has depsolving
> problems [ .. ]

gstreamer-plugins-bad is not from the standard repos AFAIK.
You're always chancing when you include non standard yum repos.

That said, it could be just a case of waiting for it to sort
itself out.  That can even happen with standard repos.




-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html


Re: [SLUG] "Right" way to kill firefox from a script?

2008-07-31 Thread Amos Shapira
2008/8/1 Martin Barry <[EMAIL PROTECTED]>:
> Have you explored tools like Selenium?

I heard a lot about it and even downloaded it but never had time to
investigate it.
Hopefully next week we'll have more resources to look into it.

In the mean time, we have this crude script which *almost* does this,
and with the about:config tweak mentioned here before it might be just
enough for now.

Thanks,

--Amos
-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html