Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 169398

Summary: [terminal] There should be a way to remember terminal settings
Product: [Tools] Target Management Reporter: Michael Scharf <eclipse>
Component: TerminalAssignee: Michael Scharf <eclipse>
Status: CLOSED WORKSFORME QA Contact: Martin Oberhuber <mober.at+eclipse>
Severity: enhancement    
Priority: P3 CC: eclipse, mober.at+eclipse, wbprio, yevshif
Version: unspecifiedKeywords: helpwanted
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Michael Scharf CLA 2007-01-03 01:39:33 EST
- set up a terminal connection
- close the terminal
==> it would be great to remember the settings of previous terminal sessions
Comment 1 Martin Oberhuber CLA 2007-01-03 10:16:45 EST
Each terminal view remembers the settings for its connection even when Eclipse Workbench is quit and re-started.

So, in order to keep (n) terminal connections, users need to open (n) terminal views, connect each with the terminal target desired and keep the views open. Views can be hidden (e.g. as fast views) but must not be closed in order to keep the connection settings.

Since this covers the most typical use cases, this bug is considered an enhancement request. Part of this request will be covered by integrating the Terminal with RSE. Then connection settings will be stored as RSE connections.

For clients who don't want to use RSE but use the plain Terminal View instead, a combobox with a history of previous connections would still be nice.
Comment 2 Michael Scharf CLA 2007-05-22 10:25:33 EDT
In some sense, a terminal connection is something like a launch configurations:
- it starts something (a connection to a remote host)
- the user may want to persist terminal connections
- terminal connections might be shared

What do you think about using launch configurations to store terminal connections?

This would be optional. For a RCP based terminal, launch configurations would not be required.
Comment 3 Martin Oberhuber CLA 2007-05-22 10:30:39 EDT
I think that the terminal component should be very lightweight.

Connection sharing would be done by RSE at some point, or by the user application -- I've had numerous requests already by people who want to open terminal connections programmatically, so they would have the host info inside their application.

I'm not sure whether we'd want launch files just for the terminal. After all, there's not so many settings (just the host name and perhaps a port). I think that multiple users would typically login to different machines each. So I don't see very much value in sharing this, and I'd prefer a solution using Mementos or DialogSettings.
Comment 4 Martin Oberhuber CLA 2007-05-22 10:31:26 EDT
PS or what about a solution that always writes the settings into the metadata for now, and allowing to extend it in the future if required such that the settings can also be in the workspace?

I wouldn't do this with the 2.0 release however.
Comment 5 Martin Oberhuber CLA 2007-05-30 16:54:08 EDT
Michael, I noticed that with the recent ITerminalConnectorInfo changes, when I press the "Connect" or "New Terminal" button, I always get a connector selection dialog with an empty selection in the connector dropdown.

This is not user-friendly at all, and a regression, since previous versions always displayed the previous kind of connection with the previous settings. So if  I typically always do SSH connections I can create them much more easily.

Could you restore the previous behavior?
Comment 6 Martin Oberhuber CLA 2009-09-23 09:31:57 EDT
Ok, so here is a roll-up of the current situation as per TM 3.1.1 :

Since bug 172483 has been resolved for TM 3.0.1 to allow multiple terminal sessions in one terminal view, there is a possibility for storing multiple connection configurations even if they are currently unconnected (by means of multiple terminal pages in the one view).

The problem at this point is, when the Terminal View gets closed (accidentally) all those tabs and associated connection info is lost. As a workaround, one can open a Terminal view in any additional Perspective that's usually not used. Then, the Terminal view settings are remembered.

--> I think the request is to store Terminal settings as a Memento even if a 
    Terminal View is closed, such that opening a new view from scratch 
    restores the previous settings if there have been some.

Other proposed solutions such as "Named Save As" of Terminal Settings seem less in line with the way the Terminal View behaves today... although a "Save As" / "Load From" button in the Settings dialog would also be possible. For Launches integration, note that some code is attached to bug 196337.

Additional info / constraints:
* comment 5 has been addressed.
* We are only talking about the Terminal View here
* for Terminal Widget, we expect host apps (such as RSE) to care for storing.
Comment 7 Martin Oberhuber CLA 2013-03-06 07:16:51 EST
Note that this has been implemented in TCF Terminal .
Comment 8 Martin Oberhuber CLA 2014-05-15 16:07:04 EDT
I'm moving this bug into TCF Terminals since it's actually implemented there.
Comment 9 Martin Oberhuber CLA 2014-05-15 16:07:59 EDT
Marking Fixed:
- TCF Terminals remenbers and restores previous open connections on restart
- The SSH Connector has a dropdown for remembering previous sessions
Comment 10 Martin Oberhuber CLA 2014-05-17 09:41:25 EDT
Moved back the bug to TM: 

The fix is in TCF Terminals but the problem was never there. Marking as "WORKSFORME" since in TM the problem is not solved but in TCF Terminals it has always worked.