Click here to Skip to main content
15,887,214 members
Please Sign up or sign in to vote.
4.00/5 (2 votes)
Hi All,

I was trying an auto login script for facebook using perl, and I encountered an error message while i was trying to launch the browser from the script.

I have pasted below the module that I was using to launch the browser. Looks to me like its a bug. Can anyone please suggest me a workaround ?

1) First Method I used :

PERL
my $launchBrowser = 'firefox -remote \"openURL($linkURL)\"';
if ( fork() == 0)
{
   exec($launchBrowser);
}


2) Method 2 :
PERL
 my $launchBrowser = '/usr/bin/firefox -a firefox -remote  \"openURL('$linkURL',new-tab)\"';
if ( fork() == 0 )
{
    exec ( $launchBrowser);
}


Both these method return the same error message,
Error: No running window found

Thanks,
Harsha
Posted
Comments
Ed Nutting 7-May-11 17:30pm    
Hmm.. I don't know Perl but perhaps it is because you are trying to open a new tab. Your second attempt says openURL(...., new-tab which would suggest an instance of Firefox would already have to be running? Perhaps try searching Google or CP for how to start up Firefox from Perl?
ZeeroC00l 8-May-11 1:41am    
@EdMan :

I did keep an instance of firefox open when i was trying the second method and I still end up getting the same error message.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900