Xpra includes a start GUI capable of replacing most of the example command lines found below. \
These examples should work for the current
versions.
Use man xpra
to get the manual corresponding to the version
you have installed.
On MS Windows, please see windows
command line. \
This is how xpra is most often used.
This command will start an xterm
(or any graphical
application of your choice) on HOST
and display it to your
local desktop through an SSH
transport:
xpra start ssh://USERNAME@HOST/ --start-child=xterm
Instead of starting and attaching to the session using a single
command:
first connect to the server via ssh and start the xpra server instance
on a free display of your choice
(:100 in this example
):
xpra start :100 --start=xterm
then from the client, just connect to this xpra instance:
xpra attach ssh://USERNAME@HOST/100
(replace HOST
with the hostname or IP of the server)
If you are attaching from the same machine and using the same user account, this is sufficient:
xpra attach :100
And if there is only a single xpra session running, you can omit the display and simply run:
xpra attach
SSH is great, it provides host verification, secure authentication and encryption, it is available on all platforms and is well tested.
However, in some cases, you may not want to give remote users shell
access, or you may want to share sessions between multiple remote
users.
For this type of use case, you can use TCP sockets:
xpra start --start=xterm --bind-tcp=0.0.0.0:10000
Then, assuming that the port you have chosen (10000
in
the example above) is allowed through the firewall, you can connect from
the client using:
xpra attach tcp://SERVERHOST:10000/
Beware: this TCP socket is insecure in this example, see authentication.
Instead, you can create session files and just double-click on them to connect to the session:
cat > ~/Desktop/example.xpra
mode=ssh
host=YOURSERVER
speaker=off
For more information, see session files
Xpra can also forward a full desktop environment using the desktop mode:
xpra desktop --start-child=fluxbox
Just like above, you can connect via SSH, TCP or any other supported transport.
This mode allows you to access an existing display remotely.
Simply run:
xpra shadow ssh://SERVERHOST/
Xpra synchronizes the clipboard state between the client and server, so it can be used as a clipboard sharing tool:
xpra shadow --clipboard=yes --printing=no --windows=no --speaker=no ssh://SERVERHOST/
(other features are disabled to keep just the clipboard)
xpra shadow --printing=yes --windows=no --speaker=no ssh://SERVERHOST/
The local printers should be virtualized on the server.