Difference between revisions of "Remote System Explorer Shell and Terminal Setup"

From wiki.emacinc.com
Jump to: navigation, search
 
(7 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{todo|<strike>Polish this and mark it as OE 4; add ending</strike>(11.13.13-19:00->MG+)|Michael Gloff|project=oe 4,mg,ky, Review}}
+
{{todo|SEOKWREV (11.13.13-19:00->MG+)(11.18.13-18:46->KY+)(11.21.13-00:45->MD+)(03.04.14-16:55->BS-)(03.25.14-16:55->BS+)|Michael Gloff|project=oe 4,mg,ky,md,bs,SEOKWREV}}
  
 +
{{#seo:
 +
|title=Remote System Explorer Shell and Terminal Setup
 +
|titlemode=append
 +
|keywords=Remote System Explorer,Shell,Terminal,SSH Shell,Terminal Connection
 +
|description=There are two methods for using SSH in Eclipse: the SSH Terminal and the SSH Shell.
 +
}}
 
There are two methods for using SSH in Eclipse: the SSH Terminal and the SSH Shell. From the perspective of the target board, there is little difference between the two. However, from the perspective of the development machine, the Eclipse Shell has the additional capability of storing command and output history and specifying environmental variables locally to be passed to the remote machine with each connection. The SSH Terminal provided by the RSE plugin provides a complete terminal implementation suitable for interactive applications such as editing files. In contrast, the SSH Shell is better suited to entering simple commands and viewing the output.
 
There are two methods for using SSH in Eclipse: the SSH Terminal and the SSH Shell. From the perspective of the target board, there is little difference between the two. However, from the perspective of the development machine, the Eclipse Shell has the additional capability of storing command and output history and specifying environmental variables locally to be passed to the remote machine with each connection. The SSH Terminal provided by the RSE plugin provides a complete terminal implementation suitable for interactive applications such as editing files. In contrast, the SSH Shell is better suited to entering simple commands and viewing the output.
  
Line 16: Line 22:
 
The method for opening SSH Shells and SSH Terminals is very similar:
 
The method for opening SSH Shells and SSH Terminals is very similar:
 
<cl>
 
<cl>
1. First, create a connection to a remote system according to the [[Remote System Explorer Setup for EMAC Eclipse#Create a Remote Connection|RSE Setup guide]].
+
1. First, create a connection to a remote system according to the [[Remote System Explorer Setup for Eclipse#Create a Remote Connection|RSE Setup guide]].
 
* In the Remote Systems View, expand ''connection_name'' as shown in Figure 1 below.  
 
* In the Remote Systems View, expand ''connection_name'' as shown in Figure 1 below.  
  
Line 41: Line 47:
 
=== Save Command History and Shell Output ===
 
=== Save Command History and Shell Output ===
 
This feature enables the command history or the output of a particular shell session to be logged for future reference. The steps to save the command history and output are as follows:
 
This feature enables the command history or the output of a particular shell session to be logged for future reference. The steps to save the command history and output are as follows:
# Open the RSE Perspective as described in the [[Remote System Explorer Setup for EMAC Eclipse#Open the RSE Perspective|RSE Setup guide]].
+
# Open the RSE Perspective as described in the [[Remote System Explorer Setup for Eclipse#Open the RSE Perspective|RSE Setup guide]].
 
# Expand ''connection_name''.
 
# Expand ''connection_name''.
 
# Expand ''Ssh Shells''. If a shell does not currently exist, follow the [[#Creating an SSH Shell or Terminal Connection|steps above]] to open a shell connection.
 
# Expand ''Ssh Shells''. If a shell does not currently exist, follow the [[#Creating an SSH Shell or Terminal Connection|steps above]] to open a shell connection.
# Right-click on the Ssh Shell connected to the target board. This should be labeled ''connection_name'', the same as the remote connection assuming no deviation from the [[Remote System Explorer Setup for EMAC Eclipse|RSE Setup]].
+
# Right-click on the Ssh Shell connected to the target board. This should be labeled ''connection_name'', the same as the remote connection assuming no deviation from the [[Remote System Explorer Setup for Eclipse|RSE Setup]].
 
# To save the displayed output, click ''Export Shell Output...'' as shown in Figure 4.
 
# To save the displayed output, click ''Export Shell Output...'' as shown in Figure 4.
 
# To save the command history, click ''Export Shell History...'' also shown in Figure 4.  
 
# To save the command history, click ''Export Shell History...'' also shown in Figure 4.  
Line 63: Line 69:
 
<br clear=all>
 
<br clear=all>
 
==Next Steps==
 
==Next Steps==
Learn more about executing remote applications by following the [[Executing_Remote_Applications_with_EMAC_Eclipse|Executing Remote Applications with Eclipse]] guide.
+
Learn more about executing remote applications by following the [[Executing_Remote_Applications_with_Eclipse|Executing Remote Applications with Eclipse]] guide.
  
[[Category:EMAC Eclipse]]
+
<!--[[Category:Eclipse]]-->

Latest revision as of 15:54, 25 March 2014

TODO: {{#todo:SEOKWREV (11.13.13-19:00->MG+)(11.18.13-18:46->KY+)(11.21.13-00:45->MD+)(03.04.14-16:55->BS-)(03.25.14-16:55->BS+)|Michael Gloff|oe 4,mg,ky,md,bs,SEOKWREV}}

There are two methods for using SSH in Eclipse: the SSH Terminal and the SSH Shell. From the perspective of the target board, there is little difference between the two. However, from the perspective of the development machine, the Eclipse Shell has the additional capability of storing command and output history and specifying environmental variables locally to be passed to the remote machine with each connection. The SSH Terminal provided by the RSE plugin provides a complete terminal implementation suitable for interactive applications such as editing files. In contrast, the SSH Shell is better suited to entering simple commands and viewing the output.

Table 1: Conventions
connection_name Refers to the name of the connection used to connect to the target board.
app_name Refers to the target name of the application being developed.
target_board Refers to the name of the device for which the application is being developed.

Creating an SSH Shell or Terminal Connection

The method for opening SSH Shells and SSH Terminals is very similar:

  1. First, create a connection to a remote system according to the RSE Setup guide.

  2. In the Remote Systems View, expand connection_name as shown in Figure 1 below.

    Figure 1: Eclipse RSE View


  3. To open an SSH Terminal as in Figure 2, right-click Ssh Terminals and select Launch Terminal.

    Figure 2: RSE SSH Terminal


  4. To open an SSH Shell as in Figure 3, right-click Ssh Shells and select Launch Shell.

    Figure 3: RSE SSH Shell



The SSH Shell has the added benefits of advanced formatting, setting environment variables for the remote shell, and logging the shell output to a file on the development machine. See the following sections for additional SSH Shell usage options.

SSH Shell Additional Options

The RSE SSH Shell has the following additional features:

Save Command History and Shell Output

This feature enables the command history or the output of a particular shell session to be logged for future reference. The steps to save the command history and output are as follows:

  1. Open the RSE Perspective as described in the RSE Setup guide.
  2. Expand connection_name.
  3. Expand Ssh Shells. If a shell does not currently exist, follow the steps above to open a shell connection.
  4. Right-click on the Ssh Shell connected to the target board. This should be labeled connection_name, the same as the remote connection assuming no deviation from the RSE Setup.
  5. To save the displayed output, click Export Shell Output... as shown in Figure 4.
  6. To save the command history, click Export Shell History... also shown in Figure 4.
Figure 4: RSE SSH Shell Context Menu


Selecting either of the context menu items shown in Figure 4 will bring up a Save dialog to allow the user to enter a filename and choose a directory for the log file.

Set Environment Variables from within Eclipse

The RSE SSH Shell has the capability of storing environment variables across sessions. Follow the instructions below to access the SSH Shell properties dialog.

  1. Open the RSE Perspective.
  2. Expand connection_name in the Remote Systems View.
  3. Right-click on Ssh Shells and select Properties.
  4. Within the Ssh Shells Properties dialog, select Environment Variables from the type list. This should result in a screen similar to that in Figure 5 which provides the functionality of adding, changing, deleting, or moving environment variables which will be set when the SSH Shell is launched.
Figure 5: RSE Environment Variables


Next Steps

Learn more about executing remote applications by following the Executing Remote Applications with Eclipse guide.