ultimatepp/reference/SshBasics/X11Shell.cpp
oblivion 36804053e3 SshBasics (a reference example set for the SSH package) is added, and SFtpGet & SshExec examples are removed.
git-svn-id: svn://ultimatepp.org/upp/trunk@12171 f0d560ea-af0d-0410-9eb7-867de7ffcac7
2018-08-17 20:14:36 +00:00

19 lines
No EOL
429 B
C++

#include "SshBasics.h"
// X11Forwarding:
// Demonstrates an interactive shell with X11 forwarding, in console mode.
// This example requires a running X server.
void X11Forwarding(SshSession& session)
{
SshShell x11shell(session);
x11shell.Timeout(Null);
session.WhenX11 = [&x11shell](SshX11Handle xhandle)
{
x11shell.AcceptX11(xhandle);
};
if(!x11shell.ForwardX11().Console("ansi"))
LOG(x11shell.GetErrorDesc());
}