xpra icon
Bug tracker and wiki

This bug tracker and wiki are being discontinued
please use https://github.com/Xpra-org/xpra instead.

Version 10 (modified by Antoine Martin, 7 years ago) (diff)

Xnest as alternative to Xephyr


Here are just some of the most common usage scenarios.

Simple session/application forwarding

As per the home page "get started" instructions, this is how xpra is most often used:

  • on the server which will export the application (xterm in the example), start an xpra server instance on a free display of your choice (:100 in the example):
    xpra start :100 --start-child=xterm
  • then from the client, just connect to this xpra instance:
    xpra attach ssh:SERVERHOST:100

(replace SERVERHOST with the hostname or IP of the server)

Access without SSH

SSH is great, it provides 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.
In this case, use TCP sockets:

xpra start :100 --start-child=xterm --bind-tcp=

Then, assuming that the port you have chosen (10000 in the example above) is allowed through the firewall (if any), you can connect from the client using:

xpra attach tcp:SERVERHOST:10000

Beware: by default, TCP sockets are insecure. At the very least, you should use the "--password-file" option to protect those sessions.

Forwarding a whole desktop

Xpra normally forwards just the windows of the application you are interested in. If you want to forward a full desktop instead (including its start menu, background, task bar, etc...) use a nested X11 server:

xpra start --start-child="Xephyr :200 -ac -screen 800x600" :100
DISPLAY=:200 fluxbox&

Or if Xephyr is not installed or does not work properly (you can verify by running it directly without xpra - there seems to be some problems with some GL driver conflicts, ie: nvidia drivers..), you can also use Xnest:

xpra start --start-child="Xnest :200 -ac -geometry 800x600+24" :100
DISPLAY=:200 fluxbox&


  • you can start a window manager of your choice (here fluxbox) or none at all..
  • to get the session to terminate when you exit the window manager, modify the command line and add -terminate to Xephyr (or Xnest) and --exit-with-children to xpra's
  • beware: some desktop environments may show options to shutdown/reboot the system from their start menu, which may or may not be appropriate
  • you can resize the desktop using the standard "randr" desktop tools (and not by resizing the window at present)

Cloning / Shadowing an existing display

This allows you to access an existing desktop remotely. Simply:

xpra shadow :0

And as usual, ie:

xpra attach ssh:SERVERHOST:0

(on posix systems, the default X11 session is usually ":0" or ":1")

  • this also works for MS Windows and OSX, in which case the display argument is mostly meaningless (only used for naming the log file and identifying the session)
  • on MS Windows, which does not have regular "unix domain sockets", you will need to use TCP sockets to connect (see above, "bind-tcp=").
  • the display being shadowed must be active (not locked or turned off)

Xpra as a clipboard sharing tool

Xpra can forward sound, clipboard and cursors as well as the application's windows. Each one of these feature can also be disabled, so one can use xpra as a clipboard synchronization tool:

  • on the display exporting its clipboard:
    xpra shadow :0
  • On the client:
    xpra attach --no-windows --no-speaker --no-cursors ssh:SERVERHOST:0