public final void onOpen() throws SshException { if (!Util.nullOrTrimmedBlank(configuration.getX11Host())) { boolean singleConnection = Boolean.parseBoolean(configuration.getProperties().getProperty( GanymedSshProvider.CFG_SINGLE_X11_CONNECTION, "false")); try { session.requestX11Forwarding(configuration.getX11Host(), configuration.getX11Port(), configuration.getX11Cookie(), singleConnection); } catch (IOException e) { throw new SshException(SshException.IO_ERROR, e); } } onChannelOpen(); }
protected final void onChannelOpen() throws SshException { try { if (!Util.nullOrTrimmedBlank(getConfiguration().getX11Host())) { ((ChannelShell) getChannel()).setXForwarding(true); } ext = ((ChannelShell) getChannel()).getExtInputStream(); } catch (Exception ioe) { throw new SshException(SshException.IO_ERROR, ioe); } onShellOpen(); }
if (configuration.getX11Host() != null) { session.setX11Host(configuration.getX11Host());