Blame waypipe.1

Olivier Fourdan 0955a6
.\" Generated by scdoc 1.11.2
Olivier Fourdan 0877ab
.\" Complete documentation for this program is not available as a GNU info page
Olivier Fourdan 0877ab
.ie \n(.g .ds Aq \(aq
Olivier Fourdan 0877ab
.el       .ds Aq '
Olivier Fourdan 0877ab
.nh
Olivier Fourdan 0877ab
.ad l
Olivier Fourdan 0877ab
.\" Begin generated content:
Olivier Fourdan 0955a6
.TH "waypipe" "1" "2022-11-02"
Olivier Fourdan 0877ab
.P
Olivier Fourdan 0877ab
.SH NAME
Olivier Fourdan 0877ab
.P
Olivier Fourdan 0877ab
waypipe - A transparent proxy for Wayland applications
Olivier Fourdan 0877ab
.P
Olivier Fourdan 0877ab
.SH SYNOPSIS
Olivier Fourdan 0877ab
.P
Olivier Fourdan 0955a6
\fBwaypipe\fR [options.\&.\&.\&] \fBssh\fR [ssh options] \fIdestination\fR \fIcommand.\&.\&.\&\fR
Olivier Fourdan 0955a6
.P
Olivier Fourdan 0955a6
\fBwaypipe\fR [options.\&.\&.\&] \fBclient\fR
Olivier Fourdan 0877ab
.br
Olivier Fourdan 0955a6
\fBwaypipe\fR [options.\&.\&.\&] \fBserver\fR -- \fIcommand.\&.\&.\&\fR
Olivier Fourdan 0877ab
.br
Olivier Fourdan 0955a6
\fBwaypipe\fR \fBrecon\fR \fIcontrol_pipe\fR \fInew_socket_path\fR
Olivier Fourdan 0877ab
.br
Olivier Fourdan 0955a6
\fBwaypipe\fR \fBbench\fR \fIbandwidth\fR
Olivier Fourdan 0877ab
.br
Olivier Fourdan 0955a6
\fBwaypipe\fR [\fB--version\fR] [\fB-h\fR, \fB--help\fR]
Olivier Fourdan 0955a6
.P
Olivier Fourdan 0955a6
[options.\&.\&.\&] = [\fB-c\fR, \fB--compress\fR C] [\fB-d\fR, \fB--debug\fR] [\fB-n\fR, \fB--no-gpu\fR] [\fB-o\fR, \fB--oneshot\fR] [\fB-s\fR, \fB--socket\fR S] [\fB--allow-tiled\fR] [\fB--control\fR C] [\fB--display\fR D] [\fB--drm-node\fR R] [\fB--remote-node\fR R] [\fB--remote-bin\fR R] [\fB--login-shell\fR] [\fB--threads\fR T] [\fB--unlink-socket\fR] [\fB--video\fR[=V]]
Olivier Fourdan 0955a6
.P
Olivier Fourdan 0877ab
.P
Olivier Fourdan 0877ab
.SH DESCRIPTION
Olivier Fourdan 0877ab
.P
Olivier Fourdan 0955a6
Waypipe is a proxy for Wayland clients, with the aim of supporting behavior
Olivier Fourdan 0877ab
like \fBssh -X\fR.\&
Olivier Fourdan 0877ab
.P
Olivier Fourdan 0955a6
Prefixing an \fBssh .\&.\&.\&\fR command to become \fBwaypipe ssh .\&.\&.\&\fR will automatically
Olivier Fourdan 0955a6
run \fBwaypipe\fR both locally and remotely, and modify the ssh command to set up
Olivier Fourdan 0955a6
forwarding between the two instances of \fBwaypipe\fR.\& The remote instance
Olivier Fourdan 0955a6
will act like a Wayland compositor, letting Wayland applications that are
Olivier Fourdan 0955a6
run remotely be displayed locally.\&
Olivier Fourdan 0955a6
.P
Olivier Fourdan 0877ab
When run as \fBwaypipe client\fR, it will open a socket (by default at
Olivier Fourdan 0877ab
\fI/tmp/waypipe-client.\&sock\fR) and will connect to the local Wayland compositor
Olivier Fourdan 0877ab
and forward all Wayland applications which were linked to it over the socket
Olivier Fourdan 0877ab
by a matching \fBwaypipe server\fR instance.\&
Olivier Fourdan 0877ab
.P
Olivier Fourdan 0877ab
When run as \fBwaypipe server\fR, it will run the command that follows in its
Olivier Fourdan 0877ab
command line invocation, set up its own Wayland compositor socket, and
Olivier Fourdan 0877ab
try to connect to its matching \fBwaypipe client\fR socket (by default
Olivier Fourdan 0877ab
\fI/tmp/waypipe-server.\&sock\fR) and try to forward all the Wayland clients
Olivier Fourdan 0877ab
that connect to fake compositor socket to the matching \fBwaypipe client\fR.\&
Olivier Fourdan 0877ab
.P
Olivier Fourdan 0877ab
The \fBwaypipe recon\fR mode is used to reconnect a \fBwaypipe server\fR instance
Olivier Fourdan 0877ab
which has had a control pipe (option \fB--control\fR) set.\& The new socket path
Olivier Fourdan 0877ab
should indicate a Unix socket whose connections are forwarded to the \fBwaypipe
Olivier Fourdan 0877ab
client\fR that the \fBwaypipe server\fR was initially connected to.\&
Olivier Fourdan 0877ab
.P
Olivier Fourdan 0955a6
The \fBwaypipe bench\fR mode can be used to estimate, given a specific
Olivier Fourdan 0877ab
connection \fIbandwidth\fR in MB/sec, which compression options produce the
Olivier Fourdan 0877ab
lowest latency.\& It tests two synthetic images, one made to be roughly as
Olivier Fourdan 0877ab
compressible as images containing text, and one made to be roughly as
Olivier Fourdan 0877ab
compressible as images containing pictures.\&
Olivier Fourdan 0877ab
.P
Olivier Fourdan 0877ab
.SH OPTIONS
Olivier Fourdan 0877ab
.P
Olivier Fourdan 0877ab
\fB-c C, --compress C\fR
Olivier Fourdan 0877ab
.RS 4
Olivier Fourdan 0877ab
Select the compression method applied to data transfers.\& Options are
Olivier Fourdan 0877ab
\fInone\fR (for high-bandwidth networks), \fIlz4\fR (intermediate), \fIzstd\fR
Olivier Fourdan 0955a6
(slow connection).\& The default compression is \fInone\fR.\&† The compression
Olivier Fourdan 0877ab
level can be chosen by appending = followed by a number.\& For example,
Olivier Fourdan 0877ab
if \fBC\fR is \fIzstd=7\fR, waypipe will use level 7 Zstd compression.\&
Olivier Fourdan 0877ab
.P
Olivier Fourdan 0955a6
† In a future version, the default will change to \fIlz4\fR.\&
Olivier Fourdan 0955a6
.P
Olivier Fourdan 0877ab
.RE
Olivier Fourdan 0877ab
\fB-d, --debug\fR
Olivier Fourdan 0877ab
.RS 4
Olivier Fourdan 0877ab
Print debug log messages.\&
Olivier Fourdan 0877ab
.P
Olivier Fourdan 0877ab
.RE
Olivier Fourdan 0877ab
\fB-h, --help\fR
Olivier Fourdan 0877ab
.RS 4
Olivier Fourdan 0877ab
Show help message and quit.\&
Olivier Fourdan 0877ab
.P
Olivier Fourdan 0877ab
.RE
Olivier Fourdan 0877ab
\fB-n, --no-gpu\fR
Olivier Fourdan 0877ab
.RS 4
Olivier Fourdan 0877ab
Block protocols like wayland-drm and linux-dmabuf which require access
Olivier Fourdan 0877ab
to e.\&g.\& render nodes.\&
Olivier Fourdan 0877ab
.P
Olivier Fourdan 0877ab
.RE
Olivier Fourdan 0877ab
\fB-o, --oneshot\fR
Olivier Fourdan 0877ab
.RS 4
Olivier Fourdan 0877ab
Only permit a single connection, and exit when it is closed.\&
Olivier Fourdan 0877ab
.P
Olivier Fourdan 0877ab
.RE
Olivier Fourdan 0877ab
\fB-s S, --socket S\fR
Olivier Fourdan 0877ab
.RS 4
Olivier Fourdan 0877ab
Use \fBS\fR as the path for the Unix socket.\& The default socket path for
Olivier Fourdan 0877ab
server mode is \fI/tmp/waypipe-server.\&sock\fR; for client mode, it is
Olivier Fourdan 0877ab
\fI/tmp/waypipe-client.\&sock\fR; and in ssh mode, \fBS\fR gives the prefix used by
Olivier Fourdan 0955a6
both the client and the server for their socket paths.\& The default prefix
Olivier Fourdan 0955a6
in ssh mode is \fI/tmp/waypipe\fR.\&
Olivier Fourdan 0877ab
.P
Olivier Fourdan 0877ab
.RE
Olivier Fourdan 0955a6
\fB--version\fR
Olivier Fourdan 0877ab
.RS 4
Olivier Fourdan 0955a6
Briefly describe Waypipe'\&s version and the features it was built with,
Olivier Fourdan 0955a6
then quit.\& Possible features: LZ4 compression support, ZSTD compression
Olivier Fourdan 0955a6
support, ability to transfer DMABUFs, video compression support, VAAPI
Olivier Fourdan 0955a6
hardware video de/encoding support.\&
Olivier Fourdan 0877ab
.P
Olivier Fourdan 0877ab
.RE
Olivier Fourdan 0877ab
\fB--allow-tiled\fR
Olivier Fourdan 0877ab
.RS 4
Olivier Fourdan 0877ab
By default, waypipe filters out all advertised DMABUF formats which have
Olivier Fourdan 0877ab
format layout modifiers, as CPU access to these formats may be very slow.\&
Olivier Fourdan 0877ab
Setting this flag disables the filtering.\& Since tiled images often permit
Olivier Fourdan 0877ab
faster GPU operations, most OpenGL applications will select tiling modifiers
Olivier Fourdan 0877ab
when they are available.\&
Olivier Fourdan 0877ab
.P
Olivier Fourdan 0877ab
.RE
Olivier Fourdan 0877ab
\fB--control C\fR
Olivier Fourdan 0877ab
.RS 4
Olivier Fourdan 0877ab
For server or ssh mode, provide the path to the "control pipe" that will
Olivier Fourdan 0877ab
be created the the server.\& Writing (with \fBwaypipe recon C T\fR, or
Olivier Fourdan 0955a6
\&'\&echo -n T > C'\&) a new socket path to this pipe will make the server
Olivier Fourdan 0877ab
instance replace all running connections with connections to the new
Olivier Fourdan 0877ab
Unix socket.\& The new socket should ultimately forward data to the same
Olivier Fourdan 0877ab
waypipe client that the server was connected to before.\&
Olivier Fourdan 0877ab
.P
Olivier Fourdan 0877ab
.RE
Olivier Fourdan 0877ab
\fB--display D\fR
Olivier Fourdan 0877ab
.RS 4
Olivier Fourdan 0877ab
For server or ssh mode, provide \fIWAYLAND_DISPLAY\fR and let waypipe configure
Olivier Fourdan 0877ab
its Wayland display socket to have a matching path.\& (If \fBD\fR is not an
Olivier Fourdan 0877ab
absolute path, the socket will be created in the folder given by the
Olivier Fourdan 0877ab
environment variable \fIXDG_RUNTIME_DIR\fR.\&)
Olivier Fourdan 0877ab
.P
Olivier Fourdan 0877ab
.RE
Olivier Fourdan 0877ab
\fB--drm-node R\fR
Olivier Fourdan 0877ab
.RS 4
Olivier Fourdan 0877ab
Specify the path \fBR\fR to the drm device that this instance of waypipe should
Olivier Fourdan 0877ab
use and (in server mode) notify connecting applications about.\&
Olivier Fourdan 0877ab
.P
Olivier Fourdan 0877ab
.RE
Olivier Fourdan 0877ab
\fB--remote-node R\fR
Olivier Fourdan 0877ab
.RS 4
Olivier Fourdan 0877ab
In ssh mode, specify the path \fBR\fR to the drm device that the remote instance
Olivier Fourdan 0877ab
of waypipe (running in server mode) should use.\&
Olivier Fourdan 0877ab
.P
Olivier Fourdan 0877ab
.RE
Olivier Fourdan 0877ab
\fB--remote-bin R\fR
Olivier Fourdan 0877ab
.RS 4
Olivier Fourdan 0877ab
In ssh mode, specify the path \fBR\fR to the waypipe binary on the remote
Olivier Fourdan 0877ab
computer, or its name if it is available in \fIPATH\fR.\& It defaults to
Olivier Fourdan 0877ab
\fBwaypipe\fR if this option isn’t passed.\&
Olivier Fourdan 0877ab
.P
Olivier Fourdan 0877ab
.RE
Olivier Fourdan 0877ab
\fB--login-shell\fR
Olivier Fourdan 0877ab
.RS 4
Olivier Fourdan 0877ab
Only for server mode; if no command is being run, open a login shell.\&
Olivier Fourdan 0877ab
.P
Olivier Fourdan 0877ab
.RE
Olivier Fourdan 0877ab
\fB--threads T\fR
Olivier Fourdan 0877ab
.RS 4
Olivier Fourdan 0877ab
Set the number of total threads (including the main thread) which a \fBwaypipe\fR
Olivier Fourdan 0877ab
instance will create.\& These threads will be used to parallelize compression
Olivier Fourdan 0877ab
operations.\& This flag is passed on to \fBwaypipe server\fR when given to \fBwaypipe
Olivier Fourdan 0955a6
ssh\fR.\& The flag also controls the thread count for \fBwaypipe bench\fR.\& The default
Olivier Fourdan 0955a6
behavior (choosable by setting \fBT\fR to \fI0\fR) is to use half as many threads
Olivier Fourdan 0955a6
as the computer has hardware threads available.\&
Olivier Fourdan 0877ab
.P
Olivier Fourdan 0877ab
.RE
Olivier Fourdan 0877ab
\fB--unlink-socket\fR
Olivier Fourdan 0877ab
.RS 4
Olivier Fourdan 0877ab
Only for server mode; on shutdown, unlink the Unix socket that waypipe connects to.\&
Olivier Fourdan 0877ab
.P
Olivier Fourdan 0877ab
.RE
Olivier Fourdan 0955a6
\fB--video[=V]\fR
Olivier Fourdan 0877ab
.RS 4
Olivier Fourdan 0877ab
Compress specific DMABUF formats using a lossy video codec.\& Opaque, 10-bit, and
Olivier Fourdan 0955a6
multiplanar formats, among others, are not supported.\& \fBV\fR is a comma separated 
Olivier Fourdan 0955a6
list of options to control the video encoding.\& Using the \fB--video\fR flag without
Olivier Fourdan 0955a6
setting any options is equivalent to using the default setting of:
Olivier Fourdan 0955a6
\fB--video=sw,bpf=120000,h264\fR.\& Later options supersede earlier ones.\&
Olivier Fourdan 0955a6
.P
Olivier Fourdan 0955a6
\fBsw\fR
Olivier Fourdan 0955a6
.RS 4
Olivier Fourdan 0955a6
Use software encoding and decoding.\&
Olivier Fourdan 0877ab
.P
Olivier Fourdan 0877ab
.RE
Olivier Fourdan 0955a6
\fBhw\fR
Olivier Fourdan 0877ab
.RS 4
Olivier Fourdan 0955a6
Use hardware (VAAPI) encoding and decoding, if available.\& This can be finicky
Olivier Fourdan 0955a6
and may only work with specific window buffer formats and sizes.\&
Olivier Fourdan 0877ab
.P
Olivier Fourdan 0955a6
.RE
Olivier Fourdan 0955a6
\fBh264\fR
Olivier Fourdan 0955a6
.RS 4
Olivier Fourdan 0955a6
Use H.\&264 encoded video.\&
Olivier Fourdan 0955a6
.P
Olivier Fourdan 0955a6
.RE
Olivier Fourdan 0955a6
\fBvp9\fR
Olivier Fourdan 0955a6
.RS 4
Olivier Fourdan 0955a6
Use VP9 encoded video.\&
Olivier Fourdan 0955a6
.P
Olivier Fourdan 0955a6
.RE
Olivier Fourdan 0955a6
\fBbpf=B\fR
Olivier Fourdan 0955a6
.RS 4
Olivier Fourdan 0955a6
Set the target bit rate of the video encoder, in units of bits per frame.\&
Olivier Fourdan 0955a6
\fBB\fR can be written as an integer or with exponential notation; thus
Olivier Fourdan 0955a6
\fB--video=bpf=7.\&5e5\fR is equivalent to \fB--video=bpf=750000\fR.\&
Olivier Fourdan 0955a6
.P
Olivier Fourdan 0955a6
.RE
Olivier Fourdan 0955a6
.RE
Olivier Fourdan 0955a6
\fB--hwvideo\fR
Olivier Fourdan 0955a6
.RS 4
Olivier Fourdan 0955a6
Deprecated option, equivalent to --video=hw .\&
Olivier Fourdan 0877ab
.P
Olivier Fourdan 0877ab
.RE
Olivier Fourdan 0877ab
.SH EXAMPLE 
Olivier Fourdan 0877ab
.P
Olivier Fourdan 0877ab
The following \fBwaypipe ssh\fR subcommand will attempt to run \fBweston-flower\fR on
Olivier Fourdan 0877ab
the server \fIexserv\fR, displaying the result on the local system.\&
Olivier Fourdan 0877ab
.P
Olivier Fourdan 0877ab
.nf
Olivier Fourdan 0877ab
.RS 4
Olivier Fourdan 0877ab
	waypipe ssh user@exserv weston-flower
Olivier Fourdan 0877ab
.fi
Olivier Fourdan 0877ab
.RE
Olivier Fourdan 0877ab
.P
Olivier Fourdan 0877ab
One can obtain similar behavior by explicitly running waypipe and ssh:
Olivier Fourdan 0877ab
.P
Olivier Fourdan 0877ab
.nf
Olivier Fourdan 0877ab
.RS 4
Olivier Fourdan 0877ab
	waypipe --socket /tmp/socket-client client  &
Olivier Fourdan 0877ab
	ssh -R /tmp/socket-server:/tmp/socket-client user@exserv \\
Olivier Fourdan 0877ab
		waypipe --socket /tmp/socket-server server -- weston-flower
Olivier Fourdan 0877ab
	kill %1
Olivier Fourdan 0877ab
.fi
Olivier Fourdan 0877ab
.RE
Olivier Fourdan 0877ab
.P
Olivier Fourdan 0955a6
Waypipe may be run locally without an SSH connection by specifying matching
Olivier Fourdan 0877ab
socket paths.\& For example:
Olivier Fourdan 0877ab
.P
Olivier Fourdan 0877ab
.nf
Olivier Fourdan 0877ab
.RS 4
Olivier Fourdan 0877ab
	waypipe --socket /tmp/waypipe\&.sock client &
Olivier Fourdan 0877ab
	waypipe --socket /tmp/waypipe\&.sock server weston-simple-dmabuf-egl
Olivier Fourdan 0877ab
	kill %1
Olivier Fourdan 0877ab
	rm /tmp/waypipe\&.sock
Olivier Fourdan 0877ab
.fi
Olivier Fourdan 0877ab
.RE
Olivier Fourdan 0877ab
.P
Olivier Fourdan 0955a6
Using transports other than SSH is a bit more complicated.\& A recipe with ncat
Olivier Fourdan 0955a6
to connect to \fIremote\fR from computer \fIlocal\fR:
Olivier Fourdan 0955a6
.P
Olivier Fourdan 0955a6
.nf
Olivier Fourdan 0955a6
.RS 4
Olivier Fourdan 0955a6
    $ waypipe --socket /tmp/waypipe-remote\&.sock client &
Olivier Fourdan 0955a6
    $ ncat --ssl -lk 12345 --sh-exec \&'ncat -U /tmp/waypipe-remote\&.sock\&' &
Olivier Fourdan 0955a6
    $ ssh user@remote
Olivier Fourdan 0955a6
Olivier Fourdan 0955a6
    > ncat -lkU /tmp/waypipe-local\&.sock --sh-exec \&'ncat --ssl local 12345\&' &
Olivier Fourdan 0955a6
    > waypipe --display wayland-local \\
Olivier Fourdan 0955a6
                --socket /tmp/waypipe-local\&.sock server -- sleep inf &
Olivier Fourdan 0955a6
    > WAYLAND_DISPLAY=wayland-local application
Olivier Fourdan 0955a6
.fi
Olivier Fourdan 0955a6
.RE
Olivier Fourdan 0955a6
.P
Olivier Fourdan 0955a6
Given a certificate file, socat can also provide an encrypted connection
Olivier Fourdan 0955a6
(remove '\&verify=0'\& to check certificates):
Olivier Fourdan 0955a6
.P
Olivier Fourdan 0955a6
.nf
Olivier Fourdan 0955a6
.RS 4
Olivier Fourdan 0955a6
    $ waypipe --socket /tmp/waypipe-remote\&.sock client &
Olivier Fourdan 0955a6
    $ socat openssl-listen:12345,reuseaddr,cert=certificate\&.pem,verify=0,fork \\
Olivier Fourdan 0955a6
        unix-connect:/tmp/waypipe-remote\&.sock
Olivier Fourdan 0955a6
    $ ssh user@remote
Olivier Fourdan 0955a6
Olivier Fourdan 0955a6
    > socat unix-listen:/tmp/waypipe-local\&.sock,reuseaddr,fork \\
Olivier Fourdan 0955a6
        openssl-connect:local:12345,verify=0 &
Olivier Fourdan 0955a6
    > waypipe --socket /tmp/waypipe-local\&.sock server -- application
Olivier Fourdan 0955a6
.fi
Olivier Fourdan 0955a6
.RE
Olivier Fourdan 0955a6
.P
Olivier Fourdan 0877ab
Many applications require specific environment variables to use Wayland instead
Olivier Fourdan 0955a6
of X11.\& If ssh isn'\&t configured to support loading \fI~/.\&ssh/environment\fR, or
Olivier Fourdan 0955a6
to allow specific variables to be set with \fIAcceptEnv\fR/\fISetEnv\fR, one can run
Olivier Fourdan 0955a6
\fBwaypipe ssh\fR without a command (and thereby open a login shell), or use \fBenv\fR
Olivier Fourdan 0955a6
to set the needed variables each time:
Olivier Fourdan 0877ab
.P
Olivier Fourdan 0877ab
.nf
Olivier Fourdan 0877ab
.RS 4
Olivier Fourdan 0877ab
	 waypipe ssh user@host env XDG_SESSION_TYPE=wayland dolphin
Olivier Fourdan 0877ab
.fi
Olivier Fourdan 0877ab
.RE
Olivier Fourdan 0877ab
.P
Olivier Fourdan 0955a6
In some cases, one may wish to set environment variables for the \fBwaypipe
Olivier Fourdan 0955a6
server\fR process itself; the above trick with \fBenv\fR will not do this, because the
Olivier Fourdan 0955a6
\fBenv\fR process will be a child of \fBwaypipe server\fR, not the other way around.\&
Olivier Fourdan 0955a6
Instead, one can use \fI~/.\&ssh/environment\fR, or use the \fB--remote-bin\fR option to
Olivier Fourdan 0955a6
change the remote Waypipe instance to a shell script that sets the environment
Olivier Fourdan 0955a6
before running the actual \fBwaypipe\fR program.\&
Olivier Fourdan 0955a6
.P
Olivier Fourdan 0877ab
Waypipe has support for reconnecting a \fBwaypipe client\fR and a \fBwaypipe server\fR
Olivier Fourdan 0877ab
instance when whatever was used to transfer data between their sockets fails.\&
Olivier Fourdan 0877ab
For this to work, waypipe must still be running on both sides of the connection.\&
Olivier Fourdan 0877ab
As the \fBwaypipe ssh\fR wrapper will automatically close both the \fBwaypipe client\fR
Olivier Fourdan 0877ab
and the \fBwaypipe server\fR when the connection fails, the client and server modes
Olivier Fourdan 0877ab
must be run seprately.\& For example, to persistently forward applications running
Olivier Fourdan 0877ab
on server \fIrserv\fR to a local Wayland compositor running on \fIlserv\fR, one would
Olivier Fourdan 0877ab
first set up a waypipe client instance on \fIlserv\fR,
Olivier Fourdan 0877ab
.P
Olivier Fourdan 0877ab
.nf
Olivier Fourdan 0877ab
.RS 4
Olivier Fourdan 0877ab
	waypipe -s /tmp/waypipe\&.sock client &
Olivier Fourdan 0877ab
.fi
Olivier Fourdan 0877ab
.RE
Olivier Fourdan 0877ab
.P
Olivier Fourdan 0877ab
and on server \fIrserv\fR, establish socket forwarding and run the server
Olivier Fourdan 0877ab
.P
Olivier Fourdan 0877ab
.nf
Olivier Fourdan 0877ab
.RS 4
Olivier Fourdan 0877ab
	ssh -fN -L /tmp/waypipe-lserv\&.sock:/tmp/waypipe\&.sock user@lserv
Olivier Fourdan 0877ab
	waypipe -s /tmp/waypipe-lserv\&.sock --control /tmp/ctrl-lserv\&.pipe \\
Olivier Fourdan 0877ab
		--display wayland-lserv server -- sleep inf &
Olivier Fourdan 0877ab
.fi
Olivier Fourdan 0877ab
.RE
Olivier Fourdan 0877ab
.P
Olivier Fourdan 0877ab
then set \fIWAYLAND_DISPLAY=wayland-lserv\fR and run the desired applications.\&
Olivier Fourdan 0877ab
When the ssh forwarding breaks, on \fIrserv\fR, reconnect with
Olivier Fourdan 0877ab
.P
Olivier Fourdan 0877ab
.nf
Olivier Fourdan 0877ab
.RS 4
Olivier Fourdan 0877ab
	ssh -fN -L /tmp/waypipe-lserv-2\&.sock:/tmp/waypipe\&.sock user@lserv
Olivier Fourdan 0877ab
	waypipe recon /tmp/ctrl-lserv\&.pipe /tmp/waypipe-lserv-2\&.sock
Olivier Fourdan 0877ab
.fi
Olivier Fourdan 0877ab
.RE
Olivier Fourdan 0877ab
.P
Olivier Fourdan 0877ab
.SH ENVIRONMENT
Olivier Fourdan 0877ab
.P
Olivier Fourdan 0877ab
When running as a server, by default \fIWAYLAND_DISPLAY\fR will be set for the
Olivier Fourdan 0877ab
invoked process.\&
Olivier Fourdan 0877ab
.P
Olivier Fourdan 0877ab
If the \fB--oneshot\fR flag is set, waypipe will instead set \fIWAYLAND_SOCKET\fR and
Olivier Fourdan 0877ab
inherit an already connected socketpair file descriptor to the invoked (child)
Olivier Fourdan 0877ab
process.\& Some programs open and close a Wayland connection repeatedly as part
Olivier Fourdan 0877ab
of their initialization, and will not work correctly with this flag.\&
Olivier Fourdan 0877ab
.P
Olivier Fourdan 0877ab
.SH EXIT STATUS
Olivier Fourdan 0877ab
.P
Olivier Fourdan 0877ab
\fBwaypipe ssh\fR will exit with the exit status code from the remote command, or
Olivier Fourdan 0877ab
with return code 1 if there has been an error.\&
Olivier Fourdan 0877ab
.P
Olivier Fourdan 0955a6
.SH BUGS
Olivier Fourdan 0955a6
.P
Olivier Fourdan 0955a6
File bug reports at: https://gitlab.\&freedesktop.\&org/mstoeckl/waypipe/
Olivier Fourdan 0955a6
.P
Olivier Fourdan 0955a6
Some programs (gnome-terminal, firefox, kate, among others) have special
Olivier Fourdan 0955a6
mechanisms to ensure that only one process is running at a time.\& Starting
Olivier Fourdan 0955a6
those programs under Waypipe while they are running under a different
Olivier Fourdan 0955a6
Wayland compositor may silently open a window or tab in the original
Olivier Fourdan 0955a6
instance of the program.\& Such programs may have a command line argument
Olivier Fourdan 0955a6
to create a new instance.\&
Olivier Fourdan 0955a6
.P
Olivier Fourdan 0877ab
.SH SEE ALSO
Olivier Fourdan 0877ab
.P
Olivier Fourdan 0955a6
\fBweston\fR(1), \fBssh\fR(1), \fBsocat(1)\fR, \fBncat(1)\fR