Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Eclipse Perl Remote Execution

Tags:

eclipse

perl

epic

This question is more to do with the eclipse than programming. But any programmer who has used eclipse should have some inputs for me. Here is my requirement:

  • I have eclipse (with EPIC) installed on my Windows 7 PC. I do not have any perl binary running on windows PC neither I am intending to install one.
  • I have perl and necessary modules installed on a remote Linux box.
  • So, my question is, Can I use the eclipse on my windows 7 PC to write/execute/debug perl programs on the remote Linux box ?

I have already been through below articles:

http://www.epic-ide.org/guide/ch06s02.php#N10812

Run Eclipse EPIC Perl Plugin on Remote Project/Files

But I am not able to interpret the information given in above links correctly. In other words, it is not working for me or my use case is different than what is described in those links.

So, is it feasible to configure eclipse per my requirement as described above? If Yes, then could please provide me the guidance on how to achieve it. If not, then is there any other workaounrd to achieve the same. I am pretty sure some one must have come accross similar situation.

Thanks

like image 209
slayedbylucifer Avatar asked Apr 18 '12 06:04

slayedbylucifer


2 Answers

So, I got it working after a long time as below. I am kind of learning Eclipse. So pasting the information here so that I won't forget it again :)

  1. Down load Eclipse on Windows

  2. NO need to install any windows Perl binaries like activestate, strawberry ...etc

  3. Install EPIC plugin for Perl: http://www.epic-ide.org/guide/ch01s02.php

  4. Make sure that the Remote System explorer is installed: File->other->Remote system explorer.

  5. If you do not find RSE in above location, then it is not installed and you need to install it: http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse.rse.doc.user/gettingstarted/g1installing.html

  6. Open the Remote System Explorer perspective (Window->open perspective->other->Remote System Explorer)

  7. Create a connection to the Linux box: under RSE perspective, click on the icon which looks like inverted "T"

  8. Follow the wizard and provide necessary information. (In this wizard, on few questions you have to choose from DStore, ssh and FTP)

  9. I have selected ssh everywhere as I do not know what DStore is

  10. Once complete, you should see the new connection on the left hand side

11.Right click on "SSH Terminals" and click on "connect / launch Terminal"

  1. Provide the password for the Linux user and you will get a shell below. This is the ssh shell of your Linux server and you can use it just like PuTTy.

  2. Now, on the left hand side, expand your server and you will get to browse the directory structure of the Linux Server. You can create a new Perl file and then go about writing your script

  3. Here, the EPIC Plug-in will help you from IDE standpoint (syntax color, auto completion ...etc)

  4. Save the file.

  5. Now, in order to execute it, go to the SSH shell which you have opened in above step and run "perl filename.pl". It will give you the output.

I love this method. This way you can run any script (Perl, python, shell...etc.) on the remote Linux server and can use the power of eclipse to help you write/edit the code. No need to install any Perl/python binaries on the local windows box.

Thanks.

like image 160
slayedbylucifer Avatar answered Sep 25 '22 18:09

slayedbylucifer


  1. Check whether you can write a simple perl script in your win box with eclipse. Don't need to run. This is to ensure that you can use epic without a perl interpreter.
  2. Copy all Perl source related to Project from remote box to local box.
  3. Create a Perl Project, instead of using default location point it to the location of source in local box.
  4. Now you can browse project files.
  5. Click on Debug->RemotePerlDebug, from here on follow the steps given in first url you have referenced. EPIC-IDE
like image 43
tuxuday Avatar answered Sep 24 '22 18:09

tuxuday