Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Dynamic Languages Toolkit (DLTK) » Launching Remote Files
Launching Remote Files [message #37628] Thu, 28 May 2009 05:58 Go to next message
Sheela is currently offline Sheela
Messages: 52
Registered: July 2009
Member
Hi,
I am using eclipse 3.4.1 with S1.0M4 DLTK and RSE-SDK-3.0.0

In my IDE,I am able to create a project in remote location (unix) with the
help of Remote System Explorer.I am able to create scripts under that
project in remote location. I have set interpreter details of remote
location and when I try to run the script , it succesfully forms the
command line and fires it.

I tried to debug RSEExecEnvironment.exec() method from
org.eclipse.dltk.rse.core plugin and added System.out.println() in
MyHostShellProcessAdapter.shellOutputChanged() method.

Here i observed that after logging to the unix terminal, it fires run
commandline immediately.
But in our case, loggin is a 2 step process:
1. It asks for login/password details
2. It shows a module area selection menu. We have to give module area
number as user input and press enter.
Only after these steps, the command prompt is made available. Hence, there
is a mismatch in firing command.

Effectively, the system hangs and we are not able to run/debug remote
scripts. Is there any solution to handle this situation? Can we somehow
get a handle at this point to customise the method to follow our 2 step
login procedure into unix terminal and then fire commands ?

Please help.

-Sheela
Re: Launching Remote Files [message #37700 is a reply to message #37628] Thu, 28 May 2009 07:56 Go to previous messageGo to next message
Alex Panchenko is currently offline Alex Panchenko
Messages: 342
Registered: July 2009
Senior Member
Hi Sheela,

I think this issue belongs to RSE level, though it should be possible to
implement workarounds in DLTK too.

Are you communicating to your host over the ssh protocol? Could you
please test if you are able to execute commands over ssh without
additional prompt using "ssh user@host command"

If it works then it means ssh "exec" channel should be used instead of
"shell" channel being used by RSE now.

Depending of the result of the check it should be possible to identify
the correct way to proceed with this issue.

Regards,
Alex

Sheela wrote:
>
> Hi,
> I am using eclipse 3.4.1 with S1.0M4 DLTK and RSE-SDK-3.0.0
>
> In my IDE,I am able to create a project in remote location (unix) with
> the help of Remote System Explorer.I am able to create scripts under
> that project in remote location. I have set interpreter details of
> remote location and when I try to run the script , it succesfully forms
> the command line and fires it.
>
> I tried to debug RSEExecEnvironment.exec() method from
> org.eclipse.dltk.rse.core plugin and added System.out.println() in
> MyHostShellProcessAdapter.shellOutputChanged() method.
>
> Here i observed that after logging to the unix terminal, it fires run
> commandline immediately.
> But in our case, loggin is a 2 step process:
> 1. It asks for login/password details
> 2. It shows a module area selection menu. We have to give module area
> number as user input and press enter.
> Only after these steps, the command prompt is made available. Hence,
> there is a mismatch in firing command.
>
> Effectively, the system hangs and we are not able to run/debug remote
> scripts. Is there any solution to handle this situation? Can we somehow
> get a handle at this point to customise the method to follow our 2 step
> login procedure into unix terminal and then fire commands ?
>
> Please help.
>
> -Sheela
>
Re: Launching Remote Files [message #38445 is a reply to message #37700] Wed, 17 June 2009 11:36 Go to previous messageGo to next message
Sheela is currently offline Sheela
Messages: 52
Registered: July 2009
Member
Hi,

I have worked on this issue and tried to debug RSEExecEnvironment.exec()
method from org.eclipse.dltk.rse.core plugin .consider the following code
of dltk framework:

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~
1. // Sometimes environment variables aren't set, so use export.
2. if (environment != null) {
3.
4. hostShell.writeToShell(SHELL_PATH);
5.
6. // TODO: Skip environment variables what is already in shell.
7. for (int i = 0; i < environment.length; i++) {
8. hostShell.writeToShell(EXPORT_CMD
9. + toShellArguments(environment[i]));
}
}
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~
Here, in our case we dont have any environment settings. However
environment is checked only for null condition at line 2.In our case, the
environment is an empty string array,in which case we want to bypass this
processing inside the if loop.
Here we observed that the SHELL_PATH which is "exec /bin/sh" ,which seems
to be a issue in our case.It destroys our current session and after that
any commands we fire does not work.Hence we want to bypass the if
condition.

Hence is it possible to change the "if condition" by adding a check for
empty string array?

Please Confirm.

Regards
Sheela
Re: Launching Remote Files [message #38545 is a reply to message #38445] Wed, 01 July 2009 06:05 Go to previous message
Sheela is currently offline Sheela
Messages: 52
Registered: July 2009
Member
Hi,
We have upgraded our IDE to eclipse 3.5 (galileo) which uses dltk1.0 and
RSE3.1.

Here, when we try to launch(run/debug) the remote files,it forms a command
line and write it to a temporary shell script on the unix terminal and
then log in to the unix and tries to run that shell script using "exec
/bin/sh <temp_file>.sh" command.

But in our case, loggin is a 2 step process:
1. It asks for login/password details
2. It shows a module area selection menu. We have to give module area
number as user input and press enter.
Only after these steps, the command prompt is made available. Hence, there
is a mismatch in firing command.

Is it possible to get handle to give the initial and final commands before
and after the actual "exec" command ? i.e if it is possible to customise
the command firing sequence ,so that after loggin in command firing
sequence will be :

<initial commands> (user will give this via some get method, say,
preFireCommandCheck()-optional)
"exec /bin/sh <temp_file>.sh" command.
<finalcommands> (user will give this via some get method, say,
postFireCommandCheck -optional)

Please Help.

Regards,
Sheela
Previous Topic:Error while opening editor
Next Topic:does DLTK support non-zip archive
Goto Forum:
  


Current Time: Tue Oct 21 03:58:03 GMT 2014

Powered by FUDForum. Page generated in 0.01622 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software