xpra icon
Bug tracker and wiki

Version 1 (modified by Antoine Martin, 4 weeks ago) (diff)

--

https://xpra.org/icons/connect.png

Unix Domain Socket


See also wiki/Network.


Socket Locations

This type of transport does not usually require any specific bind command line option.

With a default configuration (bind=auto), starting a server will create unix domain sockets in all the socket-dirs specified.

Those sockets can be seen with xpra list.

The socket filename uses a combination of the $DISPLAY and hostname.

Socket Sharing / Group Access

For connecting locally using a different user, you can use the socket-dirs option to place the socket in a public location. You may also need to use mmap-group and socket-permissions to make the socket and mmap file accessible to other users.

By default, xpra includes the /run/xpra directory in socket-dirs. If the user is a member of the "xpra" group, a socket will be created there, otherwise a harmless warning will be shown. This socket is not accessible to other members of the "xpra" group without also setting a more permissive socket-permissions value.

Client Usage

When connecting locally, the client need only specify the display:

xpra attach :100

And if there is only one xpra session active, this can be omitted altogether:

xpra attach

When using this unix domain sockets locally, you should use mmap for maximum performance, this should be enabled by default. When using containers, the socket and mmap file may not be found automatically, see usage: Docker for more information.

You can also specify the location of the socket explicitly, which can be useful if the hostname has changed or when using containers:

xpra attach socket://path/to/my/server/socket

These sockets can also be used to connect over SSH.