1

I have done the script with Mechanize::Firefox. I need to run the script in VNC server. I'm working on ubuntu. I have installed krdc software to run the scripts.

Before running the script I'm starting the vnc server by using the following command vncserver.

To connect the server via ssh I have using one password for example sshpassword. When open the krdc software there I'm using the vncpassword.

My problem is, I have trying to run the Mechanize::Firefox script using Net::SSH::perl script it is running but the firefox is not starting. So I cannot crawl the content.

How can I fix this issue.? I don't know from where need to start.

mkHun
  • 5,891
  • 8
  • 38
  • 85
  • Iirc WWW::Mechanize::Firefox doesn't start a browser instance. You need to start it yourself. You can try issuing a `firefox &` via SSH. – simbabque Jun 13 '17 at 09:57
  • @simbabque Ya I tried it but firefox is not starting in ssh. But as the same way I connect the server via `krdc` then type the `firefox &` it is started. – mkHun Jun 13 '17 at 09:59
  • Maybe because the SSH session is not the one that has the xserver attached. Can you maybe attach through the vnc? – simbabque Jun 13 '17 at 10:04
  • @simbabque When I'm starting firefox in ssh it is showing `Error: GDK_BACKEND does not match available displays` – mkHun Jun 13 '17 at 10:05
  • Yeah that's what I mean. Hmm. Try using https://metacpan.org/pod/Net::VNC to create the VNC connection with Perl. – simbabque Jun 13 '17 at 10:05

0 Answers0