mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-28 11:25:35 +02:00
Set terminal type to xterm if X11 forwarding is used.
Change-Id: Ic7c46a47772edb584abdb3bfa9d28a901cb495cc Signed-off-by: Greg Watson <g.watson@computer.org>
This commit is contained in:
parent
2340a50b07
commit
b55197097f
1 changed files with 8 additions and 3 deletions
|
@ -165,14 +165,19 @@ public class JSchProcessBuilder extends AbstractRemoteProcessBuilder {
|
||||||
try {
|
try {
|
||||||
if (fShell) {
|
if (fShell) {
|
||||||
fChannel = fConnection.getShellChannel();
|
fChannel = fConnection.getShellChannel();
|
||||||
((ChannelShell) fChannel).setPty((flags & ALLOCATE_PTY) == ALLOCATE_PTY);
|
if ((flags & ALLOCATE_PTY) == ALLOCATE_PTY) {
|
||||||
((ChannelShell) fChannel).setPtyType("vt100"); //$NON-NLS-1$
|
((ChannelShell) fChannel).setPty(true);
|
||||||
|
((ChannelShell) fChannel).setPtyType((flags & FORWARD_X11) == FORWARD_X11 ? "xterm" : "vt100"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||||
|
}
|
||||||
RemoteDebugOptions.trace(RemoteDebugOptions.DEBUG_REMOTE_COMMANDS, "executing shell"); //$NON-NLS-1$
|
RemoteDebugOptions.trace(RemoteDebugOptions.DEBUG_REMOTE_COMMANDS, "executing shell"); //$NON-NLS-1$
|
||||||
} else {
|
} else {
|
||||||
fChannel = fConnection.getExecChannel();
|
fChannel = fConnection.getExecChannel();
|
||||||
String command = buildCommand(remoteCmd, env, clearEnv);
|
String command = buildCommand(remoteCmd, env, clearEnv);
|
||||||
((ChannelExec) fChannel).setCommand(command);
|
((ChannelExec) fChannel).setCommand(command);
|
||||||
((ChannelExec) fChannel).setPty((flags & ALLOCATE_PTY) == ALLOCATE_PTY);
|
if ((flags & ALLOCATE_PTY) == ALLOCATE_PTY) {
|
||||||
|
((ChannelExec) fChannel).setPty(true);
|
||||||
|
((ChannelExec) fChannel).setPtyType((flags & FORWARD_X11) == FORWARD_X11 ? "xterm" : "vt100"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||||
|
}
|
||||||
RemoteDebugOptions.trace(RemoteDebugOptions.DEBUG_REMOTE_COMMANDS, "executing command: " + command); //$NON-NLS-1$
|
RemoteDebugOptions.trace(RemoteDebugOptions.DEBUG_REMOTE_COMMANDS, "executing command: " + command); //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
fChannel.setXForwarding((flags & FORWARD_X11) == FORWARD_X11);
|
fChannel.setXForwarding((flags & FORWARD_X11) == FORWARD_X11);
|
||||||
|
|
Loading…
Add table
Reference in a new issue