Skip to content

Latest commit

 

History

History
116 lines (98 loc) · 4.46 KB

README.md

File metadata and controls

116 lines (98 loc) · 4.46 KB

Usage Examples

The examples below should work for the current versions.
The online manual is for the current development version, use man xpra to get the version corresponding to the version you have installed.
On MS Windows, the command you should use with the examples below is Xpra_cmd.exe rather than plain Xpra. (the former will print messages whereas the latter will use a log file)

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:
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 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 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 --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, see authentication.

Attach with session files 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

These session files accept all the same options that you would normally specify on the command line.
The html5 client can also generate them.


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