Click here to Skip to main content
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 11: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
0 OriginalGriff 390
1 Jochen Arndt 150
2 Richard MacCutchan 135
3 DamithSL 95
4 Garth J Lancaster 90
0 OriginalGriff 6,045
1 DamithSL 4,601
2 Maciej Los 4,087
3 Kornfeld Eliyahu Peter 3,480
4 Sergey Alexandrovich Kryukov 3,260


Advertise | Privacy | Mobile
Web02 | 2.8.141220.1 | Last Updated 7 May 2011
Copyright © CodeProject, 1999-2014
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