After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 313480 - Integration with ssh and telnet
Integration with ssh and telnet
Status: RESOLVED WONTFIX
Product: gnome-terminal
Classification: Core
Component: general
git master
Other Linux
: Normal enhancement
: ---
Assigned To: GNOME Terminal Maintainers
GNOME Terminal Maintainers
[decision][chpe:wontfix]
Depends on: 108711
Blocks:
 
 
Reported: 2005-08-14 18:12 UTC by Martin Ejdestig
Modified: 2016-02-14 09:54 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch that adds connect to server dialog. (128.17 KB, patch)
2005-08-14 18:13 UTC, Martin Ejdestig
none Details | Review
Window icon used when terminal is connected. Rename to gnome-terminal-connect.png (3.26 KB, image/png)
2005-08-14 18:14 UTC, Martin Ejdestig
  Details
Screenshot showing new menu entries. (20.51 KB, image/png)
2005-08-14 18:17 UTC, Martin Ejdestig
  Details
Screenshot showing connect dialog with some servers. (23.75 KB, image/png)
2005-08-14 18:22 UTC, Martin Ejdestig
  Details
Screenshot showing three servers beeing edited. (59.39 KB, image/png)
2005-08-14 18:25 UTC, Martin Ejdestig
  Details
Screenshot showing a terminal tab connected to a server. (15.08 KB, image/png)
2005-08-14 18:27 UTC, Martin Ejdestig
  Details

Description Martin Ejdestig 2005-08-14 18:12:07 UTC
The patch I'll commit shortly adds a connect to server dialog to the terminal.
Comment 1 Martin Ejdestig 2005-08-14 18:13:20 UTC
Created attachment 50689 [details] [review]
Patch that adds connect to server dialog.
Comment 2 Martin Ejdestig 2005-08-14 18:14:58 UTC
Created attachment 50691 [details]
Window icon used when terminal is connected. Rename to gnome-terminal-connect.png

Place in src dir. Someone with more graphics-fu then me needs to come up with
something better.
Comment 3 Martin Ejdestig 2005-08-14 18:17:42 UTC
Created attachment 50692 [details]
Screenshot showing new menu entries.
Comment 4 Martin Ejdestig 2005-08-14 18:22:27 UTC
Created attachment 50693 [details]
Screenshot showing connect dialog with some servers.

Servers with the network stock icon to the left are servers that have been
discovered via Zeroconf. Servers with a lock icon are partially or completely
locked down by the system administrator and can't be removed by the user.
Comment 5 Martin Ejdestig 2005-08-14 18:25:46 UTC
Created attachment 50694 [details]
Screenshot showing three servers beeing edited.

A Zeroconf server, a server partially locked down by the administrator and a
server created by the user with "Optional Settings" expanded. The Zeroconf and
partially locked servers have text in their dialogs explaining why all settings
can't be edited. All according to the HIG
http://developer.gnome.org/projects/gup/hig/2.0/controls-sensitivity.html#controls-locked
.
Comment 6 Martin Ejdestig 2005-08-14 18:27:27 UTC
Created attachment 50695 [details]
Screenshot showing a terminal tab connected to a server.

Notice the connect icon to the left of the tab label, also recommended by the
HIG
http://developer.gnome.org/projects/gup/hig/2.0/controls-notebooks.html#controls-tab-status
, and that the window icon has changed to indicate that you are connected.
Comment 7 Martin Ejdestig 2005-08-14 18:32:39 UTC
Other nifty things worth mentioning:

* Customizations made to Zeroconf servers are remembered so you don't have to do
it all over again when they reappear.

* Changing encoding/profile in the menu while connected will update the server.

* There is a --connect-to-server argument that brings up the connect dialog.
This makes it possible to have a "Remote Terminal" entry in the Applications
menu (though I feel it adds clutter) or an icon on your panel.

* There is a "Add or Remove..." entry in the encoding combo-box and a "Edit
profiles..." entry in the profile combo box.

* The state of the Optional Settings expander is remembered

* Server being edited and has it's name changed is scrolled to if it moves out
of view in the connect dialog.


Open issues and stuff we might do (feel free to chip in):

* Why doesn't pressing return in the connect dialog activate the connect button
even if has_default property is set to true?

* Height of window is decreased when connect icon is added to a tab.

* "connection refused" etc from ssh/telnet isn't always outputted (VTE bug?)

* Would be nice if "Connecting to <server>..." och "Disconnected from <server>"
was printed in the terminal. I don't know how to output text without it being
fed to the child though.

* Nicer gnome-terminal-connect.png icon (I'm no good at this).

* Documentation (another weakness of mine).

* --geometry etc. (not all of them makes sense to pass on) is ignored when using
--connect-to-server

* Integration with gnome-keyring (don't know if this is a good idea).

* 100% CPU when starting gnome-terminal, opening a second tab with the menu,
closing the first tab and connecting to server. Nothing is outputted to the
terminal. When the terminal widget is clicked, cpu usage goes back to normal and
output is placed in terminal. If first terminal is left open everything works
fins. I suspect this is a VTE bug. Would appreciate help with tracking this down.

* When a profile is created in the profile editor the profile list is
temporarily set to contain only the newly created profile (see
new_profile_response_callback in terminal.c). The result is that all servers
that are being edited have their profile set to that profile. This also has
other implications not related to this patch. Is this a feature or a bug? Was
stuff like this the intention behind the temp. change? If not, I'll file a
separate bug.
Comment 8 Olav Vitters 2005-08-14 20:40:13 UTC
Not sure if this is the best way to integrate this. Seems to have some overlap
with the profiles. CC'ing usability.
Comment 9 Martin Ejdestig 2005-08-14 21:13:26 UTC
Hum, overlap with profiles? Not really. The only thing that's really overridden
in the profile is the execution command and what to do when the command exits.
The modifications to title and window icon doesn't override what's in the
profile since they are set as dynamic.  But conceptually, profiles and servers
aren't even remotely the same thing. At least that's how I look at it. :)

Some time way, waaaaay, back I remember there was a discussion to add the GNOME
Network Remote Shell utility to the desktop. But having it directly in the
terminal allows for a level of integration not possible if it's put in a
completely separate program. (I also believe that was one of the reasons it
wasn't included.)

Could you please be a bit more specific about the overlap you are talking about?
Comment 10 Martin Ejdestig 2005-08-14 21:36:00 UTC
Btw, I would like to hear from some usability people what they think about
always connecting in the current window/tab. I tried some different approaches
(always current window/tab, always new window, combo box in connect dialog to
select new window, new tab or current).
Comment 11 Vidar Braut Haarr 2005-08-15 02:25:47 UTC
As the HIG says in table 4.1 [1]:

"[The File->Open menu item ...] Opens an existing document in a new window.
Present the user with a standard Open File dialog from which they can choose an
existing file. If the chosen file is already open in the application, raise that
window instead of opening a new one."

Really only the first sentence applies here, but the general concept is the same
- you open something.

Anyway, I'm not sure this behavior is consistent even among GNOME applications.
How does Epiphany behave (I'm not in GNOME at the moment, so I can't check) ?

1: http://developer.gnome.org/projects/gup/hig/2.0/menus-standard.html#the-file-menu
Comment 12 Martin Ejdestig 2005-08-15 22:39:25 UTC
I don't know how pertinent the comparison to the Open menu item is.

The most "object oriented" and spatial thing to do, I think, would be to open
each server in a new window and save the size of the window in the server when
it's closed etc. But I don't think that fits in with how many people use the
terminal (often one window with many tabs).

And yes, this very much involves the "tabs is a band-aid for shortcomings in
window management" debacle we all have come to love and appreciate so much. :)
Comment 13 Martin Ejdestig 2005-08-17 05:18:58 UTC
I added some comments about encoding in profiles vs servers to bug 108711
(comment #24 and #25). 

Basically, if the use case in mind when adding encoding to profiles is "because
I connect to ssh/telnet servers with different encodings", it's IMHO _much_
better suited in something like the server editor dialog in this patch.
Comment 14 Matias Piipari 2005-08-17 08:28:24 UTC
I agree with that. It's more of a per-server than a per-profile thing.
Comment 15 Martin Ejdestig 2005-08-17 14:42:30 UTC
Gah, wanted to modify comment #2 to add that the name of the icon should be
gnome-terminal-connect.png .

I'll stop spamming you now... sorry :(
Comment 16 Mathias Hasselmann (IRC: tbf) 2006-03-02 10:01:54 UTC
Guess we have similiar aims: Bug 332148.
Comment 17 Martin Ejdestig 2006-03-02 15:33:31 UTC
I plan to update this patch against CVS in two/three weeks with some of the issues mentioned in comment #7 fixed, use of Avahi directly instead of gnome_vfs_dns_sd_*(), break out some code into server.[ch] etc...

It would be nice to get some feedback and to know if there's a chance to get this integrated so I don't do all this work for naught. ;)
Comment 18 Martin Ejdestig 2006-03-02 18:59:15 UTC
In response to bug 332148 comment #23:

Humm... if you remove the part that creates connect-to-server.[ch], modifies the Glade file and GConf schema the patch is actually pretty small and not that invasive at all IMO.

I guess there could be a point in breaking it up in smaller patches (one that adds the encoding argument to terminal_app_new_terminal(), one that creates the new files, one that modifies the Glade file, one that modifies the GConf schema etc, one that adds the menu entries etc)... but that's much more work for something that's fairly contained in two new files (four when I've broken out the Server "object" to server.[ch]). I am willing to do that work if that's what it takes to get the patch accepted though.
Comment 19 Ryan Lovett 2006-03-20 21:21:07 UTC
(In reply to comment #17)
> It would be nice to get some feedback and to know if there's a chance to get
> this integrated so I don't do all this work for naught. ;)

As an end user, I'd love to have this feature. The Mac's Terminal.app has this and it is quite useful.

Out of curiosity, why do you plan on using Avahi directly rather than GNOME VFS?

Comment 20 Martin Ejdestig 2006-03-20 22:09:20 UTC
When I put it in the todo I guess I had the notion that using Avahi directly was the general direction in which things where going... that was a long time ago and I'm not so sure any more...

But it's worth thinking about. I.e. what's the recommended way to add zeroconf support in GNOME in general? Do you want to pull in all of gnome-vfs just for this? (gnome_vfs_get_mime_type() is also used in the terminal so gnome-vfs is already pulled in. But isn't there something similar in glib? If there isn't there should be... ;)

I'll leave it as is (gnome_vfs_dns_sd_*()) for now.
Comment 21 Martin Ejdestig 2006-03-20 22:20:13 UTC
Bug 319597 talks about xdgmime and glib. Only mentioning it here since it might be relevant when it comes to if gnome-terminal should depend on gnome-vfs or not.
Comment 22 Mathias Hasselmann (IRC: tbf) 2006-03-21 09:29:01 UTC
Don't see a reason for avoiding GNOME-VFS.
Comment 23 Ryan Lovett 2007-03-08 18:48:14 UTC
Ping. Any plans to integrate this niftyness?
Comment 24 Martin Ejdestig 2007-03-09 01:04:45 UTC
I have dropped it since there was no reply whatsoever from the maintainer when asking (once or twice on IRC and maybe once or twice via email) if he was interested (wanted to know if it was worth syncing and improving the patch). Not even a simple "yes" or "no".

I've worked on and off on a completely new terminal since a couple of months back but it's on my low (very much so) priority list so I don't even know if I'll ever release it. Maybe this summer, who knows.
Comment 25 Martin Ejdestig 2007-03-10 00:09:07 UTC
Oh well, keep it open if you want.

I changed the title since I don't necessarily think always bringing up a dialog is the best way to go.

I also think most of the patch needs to be refactored (create a proper Server class (or at least create server.[ch]), separate the dialogs from the "model", don't use GNOME vfs, create names automatically and move the Name entry to optional settings, don't duplicate glade code, etc etc...)

<rant>
I now also agree somewhat with comment 8. But my solution to that problem would be to ditch profiles completely (seriously, how common is it with more than one profile?) and at the same time remove many of the useless settings while I'm at it (people who really care which side the scrollbar is on can use their old terminal :). But I imagine that would be pretty hard to get through so I won't even bother.
</rant>
Comment 26 Martin Ejdestig 2007-03-10 00:16:36 UTC
Btw, can someone also mark all the attachments as obsolete? I don't think I'm allowed to do that (or at least it isn't immediately obvious how to do it).
Comment 27 Gabriel Lavoie 2008-03-16 14:03:59 UTC
Will this ever be integrated with Gnome Terminal? I'm looking for a solution for having to always switch encoding of my GT each time I connect to my FreeBSD server. This kind of saved remote sessions is a nice idea and wouldn't interfere too much with the standard way of using GT.
Comment 28 Albert Bicchi 2008-08-26 20:56:47 UTC
I would like this feature implemented/committed. I currently manage over 30 servers and use multiple tabs to navigate thought each server. I always have to open a new tab, rename it to show the server name and then fire up ssh to connect to the desired machine. Having this done with a mouse click would be beneficial and time saving.
Comment 29 Tom Metro 2010-01-24 03:26:18 UTC
I've pitched the idea of ssh integration to downstream projects (ROXTerm, which uses VTE):
https://sourceforge.net/tracker/?func=detail&aid=2810009&group_id=124080&atid=698431

and just ran across this ticket.

What I don't follow from the prior discussion is why this feature was so closely tied to auto-discovery. It seems like that would be a "nice to have" incremental feature to be added later, after basic ssh integration is accomplished.

Can the prior work be reduced in scope to cover just the ssh integration aspect (with manual configuration)? Might that increase its chances of getting accepted into the trunk?