Skip to content
Permalink
master
Switch branches/tags
Go to file
@totaam
Latest commit 939d805 Sep 10, 2022 History
1 contributor

Users who have contributed to this file

Command line usage Examples

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.

Simple seamless application forwarding

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
Step by step

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)

Connecting locally

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
Access without SSH

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.

Attach with a session file Typing the same attach commands over and over again can be tedious, especially if you tweak the command line options.

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


Forwarding a full desktop

Xpra can also forward a full desktop environment using the start-desktop mode:

xpra start-desktop --start-child=fluxbox

Just like above, you can connect via SSH, TCP or any other supported transport.


Cloning / Shadowing an existing display

This mode allows you to access an existing display remotely.
Simply run:

xpra shadow ssh://SERVERHOST/

Clipboard sharing tool

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)


Printer forwarder

xpra shadow --printing=yes --windows=no --speaker=no ssh://SERVERHOST/

The local printers should be virtualized on the server.

Other Documentation Links

  • Client - launching the xpra client
  • Client OpenGL - for better window rendering performance
  • OpenGL - running accelerated OpenGL application on the server
  • Configuration - using configuration files
  • Encodings - advanced picture encoding configuration, ie: NVENC
  • Logging - debugging
  • Security - hardening, options and using xpra for better security
  • Proxy Server - using the proxy server as a single entry point
  • Apache Proxy Server - using the apache http server as a proxy
  • WSL - Windows Subsystem for Linux
  • Xdummy - the alternative virtual framebuffer