Click here to Skip to main content
11,567,926 members (43,763 online)
Rate this: bad
good
Please Sign up or sign in to vote.
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 :

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

2) Method 2 :
 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 7-May-11 10:12am
Comments
EdMan196 at 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 at 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)

  Print Answers RSS


Advertise | Privacy | Mobile
Web03 | 2.8.150624.2 | Last Updated 7 May 2011
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100