| 1 | .\" Man page for xpra |
|---|
| 2 | .\" |
|---|
| 3 | .\" Copyright (C) 2008 Nathaniel Smith <njs@pobox.com> |
|---|
| 4 | .\" |
|---|
| 5 | .\" You may distribute under the terms of the GNU General Public |
|---|
| 6 | .\" license, either version 2 or (at your option) any later version. |
|---|
| 7 | .\" See the file COPYING for details. |
|---|
| 8 | .\" |
|---|
| 9 | .TH XPRA 1 |
|---|
| 10 | .SH NAME |
|---|
| 11 | xpra \- viewer for remote, persistent X applications |
|---|
| 12 | .\" -------------------------------------------------------------------- |
|---|
| 13 | .SH SYNOPSIS |
|---|
| 14 | .PD 0 |
|---|
| 15 | .HP \w'xpra\ 'u |
|---|
| 16 | \fBxpra\fP \fBstart\fP \fI:DISPLAY\fP [\fB\-\-start\-child=CHILD\fP]\fB .\|.\|.\fP [\fB\-\-exit\-with\-children\fP] [\fB\-\-no\-daemon\fP] |
|---|
| 17 | .HP |
|---|
| 18 | \fBxpra\fP \fBattach\fP [\fI:DISPLAY\fP | \fIssh:HOST:DISPLAY\fP] [\fB\-\-remote\-xpra=CMD\fP] |
|---|
| 19 | .HP |
|---|
| 20 | \fBxpra\fP \fBstop\fP [\fI:DISPLAY\fP | \fIssh:HOST:DISPLAY\fP] [\fB\-\-remote\-xpra=CMD\fP] |
|---|
| 21 | .HP |
|---|
| 22 | \fBxpra\fP \fBlist\fP |
|---|
| 23 | .HP |
|---|
| 24 | \fBxpra\fP \fBupgrade\fP \fI:DISPLAY\fP [\fB\-\-no\-daemon\fP] |
|---|
| 25 | .PD |
|---|
| 26 | .\" -------------------------------------------------------------------- |
|---|
| 27 | .SH DESCRIPTION |
|---|
| 28 | Xpra is a tool which allows you to run X programs \(em usually on a |
|---|
| 29 | remote host \(em and then direct their display to your local machine, |
|---|
| 30 | disconnect from these programs, and reconnect from the same or another |
|---|
| 31 | machine, all without losing any state. It differs from standard X |
|---|
| 32 | forwarding in that it allows disconnection and reconnection without |
|---|
| 33 | disrupting the forwarded application; it differs from VNC and similar |
|---|
| 34 | remote display technologies in that xpra is \fIrootless\fP: i.e., |
|---|
| 35 | applications forwarded by xpra appear on your desktop as normal |
|---|
| 36 | windows managed by your window manager, rather than being all "trapped |
|---|
| 37 | in a box together". Xpra also uses a custom protocol that is |
|---|
| 38 | self-tuning and relatively latency-insensitive, and thus is usable |
|---|
| 39 | over worse links than standard X. |
|---|
| 40 | .\" -------------------------------------------------------------------- |
|---|
| 41 | .SH EXAMPLES |
|---|
| 42 | .TP \w'xpra\ 'u |
|---|
| 43 | \fBxpra start\fP \fI:7\fP |
|---|
| 44 | Start an xpra server using display number \fI:7\fP. |
|---|
| 45 | .TP |
|---|
| 46 | \fBDISPLAY=\fP\fI:7 firefox\fP |
|---|
| 47 | Start \fIfirefox\fP running inside the xpra server. No window will |
|---|
| 48 | appear. |
|---|
| 49 | .TP |
|---|
| 50 | \fBxpra list\fP |
|---|
| 51 | Show a list of xpra servers you have running on the current host. |
|---|
| 52 | .TP |
|---|
| 53 | \fBxpra attach\fP \fI:7\fP |
|---|
| 54 | Attach to the xpra server that is using local display number \fI:7\fP. |
|---|
| 55 | Any apps running on that server will appear on your screen. |
|---|
| 56 | .TP |
|---|
| 57 | \fBxpra attach\fP \fIssh:frodo:7\fP |
|---|
| 58 | Use ssh to attach to the xpra server that is running on machine |
|---|
| 59 | \fIfrodo\fP and using display \fI:7\fP. Any apps running on that |
|---|
| 60 | server will appear on your local screen. |
|---|
| 61 | .TP |
|---|
| 62 | \fBxpra start\fP \fI:7\fP \fB&& DISPLAY=\fP\fI:7\fP \fBscreen\fP |
|---|
| 63 | Start an xpra server and a \fBscreen\fP(1) session. If any of the |
|---|
| 64 | applications inside screen attempt to use X, they will be directed to |
|---|
| 65 | the xpra server. |
|---|
| 66 | .\" -------------------------------------------------------------------- |
|---|
| 67 | .SH DISPLAYS |
|---|
| 68 | Understanding the basic idea of displays is critical to using xpra |
|---|
| 69 | successfully. |
|---|
| 70 | |
|---|
| 71 | The idea comes from standard X. If you have multiple X servers |
|---|
| 72 | running on the same host, then there has to be some way to distinguish |
|---|
| 73 | them. X does this by assigning each server a small, unique integer |
|---|
| 74 | called (confusingly) its "display". In the common case of a desktop |
|---|
| 75 | machine that has only one X server running, that server uses display |
|---|
| 76 | ":0" (or sometimes you'll see ":0.0", which is effectively the same). |
|---|
| 77 | When an application starts under X, it needs to know how to find the |
|---|
| 78 | right X server to use; it does this by checking the environment |
|---|
| 79 | variable \fB$DISPLAY\fP. |
|---|
| 80 | |
|---|
| 81 | Xpra faces a similar problem \(em there may be multiple xpra servers |
|---|
| 82 | running on the same host, as well as well as multiple X servers. It |
|---|
| 83 | solves this problem by re-using X's solution \(em each xpra server has |
|---|
| 84 | a display associated with it. This display functions as both an X |
|---|
| 85 | display (for when xpra is talking to X applications) and as an |
|---|
| 86 | identifier by which xpra clients (like \fBxpra attach\fP) can locate |
|---|
| 87 | the xpra server. |
|---|
| 88 | |
|---|
| 89 | When starting an xpra server, you must specify the name of the display |
|---|
| 90 | to use. To do this, simply pick any number you like and stick a colon |
|---|
| 91 | in front of it \(em :7, :12, :3117, etc., are all valid display names. |
|---|
| 92 | Just keep in mind that: |
|---|
| 93 | .IP \(bu |
|---|
| 94 | Every X or xpra server that is running on a single machine must use a |
|---|
| 95 | different display name. If you pick a number that is already in use |
|---|
| 96 | then xpra will not work. |
|---|
| 97 | .IP \(bu |
|---|
| 98 | The first few numbers (0, 1, 2) are commonly used by real X servers. |
|---|
| 99 | .IP \(bu |
|---|
| 100 | Everyone who connects to a given machine using \fBssh\fP(1) with X |
|---|
| 101 | forwarding enabled will also use a display number; ssh generally picks |
|---|
| 102 | numbers near ten (10, 11, 12, ...). |
|---|
| 103 | .PP |
|---|
| 104 | When specifying an xpra server to a client program like \fBxpra |
|---|
| 105 | attach\fP or \fBxpra stop\fP, then you can use a display of the form |
|---|
| 106 | \fB:\fP\fINUMBER\fP to refer to a server on the local host, or one of |
|---|
| 107 | the form \fBssh:\fP\fIHOST\fP\fB:\fP\fINUMBER\fP to refer to a server |
|---|
| 108 | on a remote host; xpra will automatically connect to the remote host |
|---|
| 109 | using \fBssh\fP(1). Generally, if you have only one xpra server |
|---|
| 110 | running on a machine, then you can omit the number entirely; \fBxpra |
|---|
| 111 | attach\fP alone will attach to the lone xpra server on the current |
|---|
| 112 | machine regardless of its number, \fBxpra attach ssh:frodo\fP will |
|---|
| 113 | similarly attach to the lone xpra server on a remote machine. |
|---|
| 114 | .\" -------------------------------------------------------------------- |
|---|
| 115 | .SH SUBCOMMANDS |
|---|
| 116 | .SS xpra start |
|---|
| 117 | This command starts a new xpra server, including any necessary setup. |
|---|
| 118 | .SS xpra attach |
|---|
| 119 | This command attachs to a running xpra server, and forwards any |
|---|
| 120 | applications using that server to appear on your current screen. |
|---|
| 121 | .SS xpra stop |
|---|
| 122 | This command attachs to a running xpra server, and requests that it |
|---|
| 123 | terminate immediately. This generally causes any applications using |
|---|
| 124 | that server to terminate as well. |
|---|
| 125 | .SS xpra list |
|---|
| 126 | This command finds all xpra servers that have been started by the |
|---|
| 127 | current user on the current machine, and lists them. |
|---|
| 128 | .SS xpra upgrade |
|---|
| 129 | This command starts a new xpra server, but instead of creating it from |
|---|
| 130 | scratch, it attaches to another existing server, tells it to exit, and |
|---|
| 131 | takes over managing the applications that it was managing before. As |
|---|
| 132 | the name suggests, the main use case is to replace a server running |
|---|
| 133 | against an older version of xpra with a newer version, without having |
|---|
| 134 | to restart your session. Any currently-running \fBxpra attach\fP |
|---|
| 135 | command will exit and need to be restarted. |
|---|
| 136 | .\" -------------------------------------------------------------------- |
|---|
| 137 | .SH OPTIONS |
|---|
| 138 | .SS General options |
|---|
| 139 | .TP |
|---|
| 140 | \fB\-\-version\fP |
|---|
| 141 | Displays xpra's version number. |
|---|
| 142 | .TP |
|---|
| 143 | \fB\-h, \-\-help\fP |
|---|
| 144 | Displays a summary of command line usage. |
|---|
| 145 | .TP |
|---|
| 146 | \fB\-d\fP \fIFILTER1,FILTER2,...\fP, \fB\-\-debug=\fP\fIFILTER1,FILTER2,...\fP |
|---|
| 147 | Enable debug logging. The special value \fBall\fP enables all |
|---|
| 148 | debugging; alternatively, debugging logs for particular systems can be |
|---|
| 149 | enabled by specifying one or more filters (separated by commas). In |
|---|
| 150 | general, check the source to determine filter names \(em but they will |
|---|
| 151 | look something like \fBxpra.protocol.raw\fP or \fBwimpiggy\fP |
|---|
| 152 | (wimpiggy is the name of one of xpra's underlying libraries). A |
|---|
| 153 | filter like \fBxpra.protocol.raw\fP is more specific than one like |
|---|
| 154 | \fBxpra.protocol\fP. |
|---|
| 155 | .SS Options for start, upgrade |
|---|
| 156 | .TP |
|---|
| 157 | \fB\-\-start\-child=\fP\fICMD\fP |
|---|
| 158 | After starting the server, runs the command \fICMD\fP using the |
|---|
| 159 | default shell. The command is run with its $DISPLAY set to point to |
|---|
| 160 | the newly-started server. This option may be given multiple times to |
|---|
| 161 | start multiple children. |
|---|
| 162 | .TP |
|---|
| 163 | \fB\-\-exit\-with\-children\fP |
|---|
| 164 | This option may only be used if \fB\-\-start\-child\fP is also |
|---|
| 165 | given. If it is given, then the xpra server will monitor the status |
|---|
| 166 | of the children started by \fB\-\-start\-child\fP, and will |
|---|
| 167 | automatically terminate itself when the last of them has exited. |
|---|
| 168 | .TP |
|---|
| 169 | \fB\-\-no\-daemon\fP |
|---|
| 170 | By default, the xpra server puts itself into the background, |
|---|
| 171 | i.e. 'daemonizes', and redirects its output to a log file. This |
|---|
| 172 | prevents that behavior (useful mostly for debugging). |
|---|
| 173 | .SS Options for attach, stop |
|---|
| 174 | .TP |
|---|
| 175 | \fB\-\-remote\-xpra=\fP\fICMD\fP |
|---|
| 176 | When connecting to a remote server over ssh, xpra needs to be able to |
|---|
| 177 | find and run the xpra executable on the remote host. If this |
|---|
| 178 | executable is in a non-standard location, or requires special |
|---|
| 179 | environment variables to be set before it can run, then accomplishing |
|---|
| 180 | this may be non-trivial. If running \fBxpra attach ssh:something\fP |
|---|
| 181 | fails because it cannot find the remote xpra, then you can use this |
|---|
| 182 | option to specify how to run xpra on the remote host. |
|---|
| 183 | |
|---|
| 184 | That said, this option should not be needed in normal usage, as xpra |
|---|
| 185 | tries quite hard to work around the above problems. If you find |
|---|
| 186 | yourself needing it often, then that may indicate a bug that we would |
|---|
| 187 | appreciate hearing about. |
|---|
| 188 | .\" -------------------------------------------------------------------- |
|---|
| 189 | .SH ENVIRONMENT |
|---|
| 190 | .TP |
|---|
| 191 | \fBDISPLAY\fP |
|---|
| 192 | \fBxpra start --with-child=...\fP sets this variable in the |
|---|
| 193 | environment of the child to point to the xpra display. |
|---|
| 194 | |
|---|
| 195 | \fBxpra attach\fP, on the other hand, uses this variable to determine |
|---|
| 196 | which display the remote applications should be shown on. |
|---|
| 197 | .\" -------------------------------------------------------------------- |
|---|
| 198 | .SH FILES |
|---|
| 199 | Xpra uses the directory \fI~/.xpra\fP to store a number of files. |
|---|
| 200 | .TP |
|---|
| 201 | \fI~/.xpra/:7\fP |
|---|
| 202 | The unix domain socket that clients use to contact the xpra server. |
|---|
| 203 | .TP |
|---|
| 204 | \fI~/.xpra/:7.log\fP |
|---|
| 205 | When run in daemon mode (the default), the xpra server directs all |
|---|
| 206 | output to this file. This includes all debugging output, if debugging |
|---|
| 207 | is enabled. |
|---|
| 208 | .TP |
|---|
| 209 | \fI~/.xpra/run-xpra\fP |
|---|
| 210 | A shell script that, when run, starts up xpra with the correct python |
|---|
| 211 | interpreter, PYTHONPATH, PATH, location of the main xpra script, etc. |
|---|
| 212 | Automatically generated by \fBxpra start\fP and used by \fBxpra |
|---|
| 213 | attach\fP (see also the discussion of \fB\-\-remote\-xpra\fP). |
|---|
| 214 | .\" -------------------------------------------------------------------- |
|---|
| 215 | .SH BUGS |
|---|
| 216 | Xpra has no test suite. |
|---|
| 217 | |
|---|
| 218 | Xpra does not fully handle all aspects of the X protocol; for |
|---|
| 219 | instance, as of September 2008 it does not yet forward window icons, |
|---|
| 220 | clipboards, custom cursors, beeps, fancy input features like |
|---|
| 221 | pressure-sensitivity on tablets, some window manager hints, and |
|---|
| 222 | probably other more obscure parts of the X protocol. It does, |
|---|
| 223 | however, degrade gracefully, and patches for each feature would be |
|---|
| 224 | gratefully accepted. |
|---|
| 225 | |
|---|
| 226 | The mapping between local and remote keyboard events is not very |
|---|
| 227 | robust; in particular, it is possible in some situations for modifier |
|---|
| 228 | keys to get "stuck" in xpra, and it is usually impossible to type |
|---|
| 229 | characters outside of the standard US keyboard range. |
|---|
| 230 | |
|---|
| 231 | The xpra server allocates an over-large framebuffer; this wastes |
|---|
| 232 | memory, and can cause applications to misbehave (e.g., by letting |
|---|
| 233 | menus go off-screen). Conversely, if the framebuffer is ever |
|---|
| 234 | insufficiently large, clients will misbehave in other ways (e.g., |
|---|
| 235 | input events will be misdirected). |
|---|
| 236 | |
|---|
| 237 | The need to choose display numbers by hand is annoying. |
|---|
| 238 | .\" -------------------------------------------------------------------- |
|---|
| 239 | .SH REPORTING BUGS |
|---|
| 240 | Send any questions or bugs reports to <parti-discuss@partiwm.org>. |
|---|
| 241 | .\" -------------------------------------------------------------------- |
|---|
| 242 | .SH SEE ALSO |
|---|
| 243 | \fBscreen\fP(1) |
|---|