Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community ForumsLaunching Remote Files
https://www.eclipse.org/forums/index.php/mv/msg/12077/37628/#msg_37628
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]]>Sheela2009-05-28T05:58:38-00:00Re: Launching Remote Files
https://www.eclipse.org/forums/index.php/mv/msg/12077/37700/#msg_37700
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
>]]>Alex Panchenko2009-05-28T07:56:35-00:00Re: Launching Remote Files
https://www.eclipse.org/forums/index.php/mv/msg/12077/38445/#msg_38445
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]]>Sheela2009-06-17T11:36:12-00:00Re: Launching Remote Files
https://www.eclipse.org/forums/index.php/mv/msg/12077/38545/#msg_38545
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)