Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[dsdp-tm-dev] RSE ssh terminal shell with X11 forwarding enabled

Dear all,

I just successfully implemented X11 forwarding in the RSE ssh terminal shell. Here are the code changes (only 3 additional lines in total):

diff -u -r1.26 SshConnectorService.java
--- src/org/eclipse/rse/internal/connectorservice/ssh/SshConnectorService.java	19 Mar 2009 23:16:03 -0000	1.26
+++ src/org/eclipse/rse/internal/connectorservice/ssh/SshConnectorService.java	8 Oct 2009 14:19:32 -0000
@@ -140,6 +142,10 @@
 		if (password != null)
 			session.setPassword(password);
 		session.setUserInfo(wrapperUI);
+		
+        session.setX11Host("localhost");
+	    session.setX11Port(6000);
+
 		return session;
 	}

and

diff -u -r1.3 SshTerminalShell.java
--- src/org/eclipse/rse/internal/services/ssh/terminal/SshTerminalShell.java	14 Dec 2008 18:28:46 -0000	1.3
+++ src/org/eclipse/rse/internal/services/ssh/terminal/SshTerminalShell.java	8 Oct 2009 14:24:20 -0000
@@ -74,7 +76,9 @@
 			fSessionProvider = sessionProvider;
 			fEncoding = encoding;
 		    fChannel = fSessionProvider.getSession().openChannel("shell"); //$NON-NLS-1$
+		    fChannel.setXForwarding(true);

		    if (ptyType != null && (fChannel instanceof ChannelShell)) {
 			    //By default, jsch always creates a vt100 connection sized
 			    //80x24 / 640x480 (dimensions can be changed).
 		    	((ChannelShell) fChannel).setPtyType(ptyType);

This is of course only a quick static fix. A final solution should allow interactively selecting the X11 forwarding option. Would it be possible to implement this in a future RSE release?

Best, Dominik Brunner


********************************
Dr. Dominik Brunner
Laboratory for Air Pollution / Environmental Technology
Empa - Materials Science & Technology
Überlandstrasse 129
CH-8600 Dübendorf
Tel +41 44 823 49 44
Fax +41 44 821 62 44
Dominik.Brunner@xxxxxxx
www.empa.ch
********************************




Back to the top